CmmToC: Always cast arguments as unsigned
As noted in Note [When in doubt, cast arguments as unsigned], we must ensure that arguments have the correct signedness since some operations (e.g. `%`) have different semantics depending upon signedness. (cherry picked from commit 0aeaa8f3)
Showing
- compiler/GHC/CmmToC.hs 28 additions, 4 deletionscompiler/GHC/CmmToC.hs
- testsuite/tests/cmm/should_run/machops/MachOps1.cmm 3 additions, 0 deletionstestsuite/tests/cmm/should_run/machops/MachOps1.cmm
- testsuite/tests/cmm/should_run/machops/MachOps1.stdout 1 addition, 0 deletionstestsuite/tests/cmm/should_run/machops/MachOps1.stdout
- testsuite/tests/cmm/should_run/machops/all.T 1 addition, 0 deletionstestsuite/tests/cmm/should_run/machops/all.T
Loading
Please register or sign in to comment