NCG: Fix 64bit int comparisons on 32bit x86
We no compare these by doing 64bit subtraction and checking the resulting flags. We used to do this differently but the old approach was broken when the high bits compared equal and the comparison was one of >= or <=. The new approach should be both correct and faster.
Showing
- compiler/GHC/CmmToAsm/X86/CodeGen.hs 84 additions, 14 deletionscompiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/Cond.hs 16 additions, 16 deletionscompiler/GHC/CmmToAsm/X86/Cond.hs
- testsuite/tests/cmm/should_run/all.T 16 additions, 0 deletionstestsuite/tests/cmm/should_run/all.T
- testsuite/tests/cmm/should_run/cmp64.hs 156 additions, 0 deletionstestsuite/tests/cmm/should_run/cmp64.hs
- testsuite/tests/cmm/should_run/cmp64.stdout 207363 additions, 0 deletionstestsuite/tests/cmm/should_run/cmp64.stdout
- testsuite/tests/cmm/should_run/cmp64_cmm.cmm 31 additions, 0 deletionstestsuite/tests/cmm/should_run/cmp64_cmm.cmm
Loading
Please register or sign in to comment