New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JitIL: Fix a bug in floatpoint load/store instructions. #2272
Conversation
The regBuildMemAddress function already clears the address register. Not only is clearing it again pointless, regBuildMemAddress uses the bits in IInfo slightly diffrently and the second clear can clear the wrong registers causing bugs if something else actually needs to use those registers.
Add some comments, could you check them @magumagu? |
@@ -420,6 +433,7 @@ static void regNormalRegClear(RegInfo& RI, InstLoc I) | |||
regClearInst(RI, getOp2(I)); | |||
} | |||
|
|||
// Clear any floating point registers which end their lifetime at I |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
The change looks correct... as far as it goes. Ideally, the code would be changed so there's only one place where we decide which instructions are actually "used" by an instruction, as in regMarkMemAddress etc. |
@@ -412,6 +423,8 @@ static X64Reg regBinLHSReg(RegInfo& RI, InstLoc I) | |||
return reg; | |||
} | |||
|
|||
// Clear any registers which end their lifetime at I | |||
// Don't use this for special instructions like memory load/stores |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Bump? |
We need someone to review this? @FioraAeterna @magumagu ? It's important for JITIL to at least be functional. |
JitIL: Fix a bug in floatpoint load/store instructions.
The regBuildMemAddress function already clears the address register.
Not only is clearing it again pointless, regBuildMemAddress uses the bits in IInfo slightly differently and the second clear can clear the wrong register, causing bugs if something else actually needs to use those registers.
Fixes issue 8437 and #2166