Fix codegen bug in PIC version of genSwitch (#12433)
Summary: * getNonClobberedReg instead of getSomeReg, because the reg needs to survive across t_code * Use a new reg for the table offset calculation instead of clobbering the reg returned by expr (this was the bug affecting #12433) Test Plan: New unit test; validate Reviewers: rwbarton, bgamari, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2529 GHC Trac Issues: #12433
Showing
- compiler/nativeGen/X86/CodeGen.hs 6 additions, 3 deletionscompiler/nativeGen/X86/CodeGen.hs
- testsuite/tests/codeGen/should_run/T12433.stdout 1 addition, 0 deletionstestsuite/tests/codeGen/should_run/T12433.stdout
- testsuite/tests/codeGen/should_run/all.T 1 addition, 1 deletiontestsuite/tests/codeGen/should_run/all.T
Loading
Please register or sign in to comment