I try optimize source code for experimental from 2 years ago, but I found some bug in code, again. Someone dolphin developer, please check.
================================
[1] Lucid bug (as logic)
================================
(1) BPWritten() in BPStructs.cpp:
Line 342,349,353 might delete as well.
if (!GetConfig(CONFIG_DISABLEFOG))
Because fix toggle fog at GraphicsConfigurarion and press OSDkey'6' in playing game.
--------------------------------
(2) VertexShaderManager::SetConstants() in VertexShaderManager.cpp:
Line 210 insert to:
nPostTransformMatricesChanged[0] = nPostTransformMatricesChanged[1] = -1;
--------------------------------
(3) Interpreter:
tswx() in Interpreter_LoadStore.cpp:
Line 793 insert to:
r &= 31;
--------------------------------
(4) Line 381 in AudioInterface.cpp:
pcm_r = (pcm_r * lvolume >> 8) + (int)(*_pDestBuffer);
Replace to:
pcm_r = (pcm_r * rvolume >> 8) + (int)(*_pDestBuffer);
--------------------------------
(5) Jit64::twx() in Jit_Integer.cpp:
Line 2163 and 2165 is inverse. But bug yet, Line 2163 is CMP(mem, mem);....
--------------------------------
*** Basicaly I report 'single line bug' only. Because who have found these bugs, fix is to same. (I don't report 'GUI bug' and 'newer bug' and 'multiline bug or bug related multifile'. Previous reports is the same too.)
================================
[2] More better code
================================
(1) Line 255 in Jit_FloatingPoint.cpp:
fpr.BindToRegister(b, true);
Replace to:
fpr.BindToRegister(b, true, false);
================================
[3] Might solve bug (much more important!)
================================
(1) FlushToZeroAsFloat() Line 82 in MathUtil.h:
if ((x.i & DOUBLE_EXP) < 0x3800000000000000ULL)
I think, this code is not correct.
if ((x.i & DOUBLE_EXP) <= 0x3800000000000000ULL)
Probably this is correct.
(Reference 'If the exponent is not greater than 896, this conversion requires denormalization.' in IBM's manual)
I think, DAZ range is '-FLT_MIN < d < FLT_MIN'. (FLT_MIN = 1.175494351e-38F(0x3810000000000000ULL))
Ideal for code is:
if ((x.i & DOUBLE_EXP) < 0x3810000000000000ULL)
If it is correct, also need modify to Line 1544 or 1545 in IR_X86.cpp.(but unused)
================================
This report is created based on 'dolphin 3.0-863'.
If I found anothor bug, report again. (If it's not too much trouble.)
If you have question or impressions, please reply to this by 'easy english'.
But I may not be able to write a reply with poor english.
Sorry, my bad english from japan.
================================
[1] Lucid bug (as logic)
================================
(1) BPWritten() in BPStructs.cpp:
Line 342,349,353 might delete as well.
if (!GetConfig(CONFIG_DISABLEFOG))
Because fix toggle fog at GraphicsConfigurarion and press OSDkey'6' in playing game.
--------------------------------
(2) VertexShaderManager::SetConstants() in VertexShaderManager.cpp:
Line 210 insert to:
nPostTransformMatricesChanged[0] = nPostTransformMatricesChanged[1] = -1;
--------------------------------
(3) Interpreter:

Line 793 insert to:
r &= 31;
--------------------------------
(4) Line 381 in AudioInterface.cpp:
pcm_r = (pcm_r * lvolume >> 8) + (int)(*_pDestBuffer);
Replace to:
pcm_r = (pcm_r * rvolume >> 8) + (int)(*_pDestBuffer);
--------------------------------
(5) Jit64::twx() in Jit_Integer.cpp:
Line 2163 and 2165 is inverse. But bug yet, Line 2163 is CMP(mem, mem);....
--------------------------------
*** Basicaly I report 'single line bug' only. Because who have found these bugs, fix is to same. (I don't report 'GUI bug' and 'newer bug' and 'multiline bug or bug related multifile'. Previous reports is the same too.)
================================
[2] More better code
================================
(1) Line 255 in Jit_FloatingPoint.cpp:
fpr.BindToRegister(b, true);
Replace to:
fpr.BindToRegister(b, true, false);
================================
[3] Might solve bug (much more important!)
================================
(1) FlushToZeroAsFloat() Line 82 in MathUtil.h:
if ((x.i & DOUBLE_EXP) < 0x3800000000000000ULL)
I think, this code is not correct.
if ((x.i & DOUBLE_EXP) <= 0x3800000000000000ULL)
Probably this is correct.
(Reference 'If the exponent is not greater than 896, this conversion requires denormalization.' in IBM's manual)
I think, DAZ range is '-FLT_MIN < d < FLT_MIN'. (FLT_MIN = 1.175494351e-38F(0x3810000000000000ULL))
Ideal for code is:
if ((x.i & DOUBLE_EXP) < 0x3810000000000000ULL)
If it is correct, also need modify to Line 1544 or 1545 in IR_X86.cpp.(but unused)
================================
This report is created based on 'dolphin 3.0-863'.
If I found anothor bug, report again. (If it's not too much trouble.)
If you have question or impressions, please reply to this by 'easy english'.
But I may not be able to write a reply with poor english.
Sorry, my bad english from japan.