diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2015-03-02 22:24:36 +0100 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2015-03-02 22:27:45 +0100 |
commit | d2625192e56dbee1f320172c593c9f0653f72bb0 (patch) | |
tree | 7b73337048c8992f8d4d766ce479eb188c9fb84e /compiler/nativeGen/X86/CodeGen.hs | |
parent | c5977c2e2951e9e346a8f4990d5a6bbdbf9cee0b (diff) | |
download | haskell-wip/D694.tar.gz |
Use 64bit relocationswip/D694
Summary:
according to the comments, this was not possible with ancient (pre 2006) versions
of binutils. Even Debian stable has newer versions since a whilte.
Please have a close look if you know something about this; I basically removed
code by looking at the code around it, but do not necessarily know what I am
doing here.
Test Plan: Run validate on Harbormaster
Reviewers: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D694
Diffstat (limited to 'compiler/nativeGen/X86/CodeGen.hs')
-rw-r--r-- | compiler/nativeGen/X86/CodeGen.hs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs index 531213dc7f..d797b8014c 100644 --- a/compiler/nativeGen/X86/CodeGen.hs +++ b/compiler/nativeGen/X86/CodeGen.hs @@ -2616,17 +2616,8 @@ genSwitch dflags expr ids JMP_TBL (OpReg tableReg) ids Text lbl ] _ -> - -- HACK: On x86_64 binutils<2.17 is only able - -- to generate PC32 relocations, hence we only - -- get 32-bit offsets in the jump table. As - -- these offsets are always negative we need - -- to properly sign extend them to 64-bit. - -- This hack should be removed in conjunction - -- with the hack in PprMach.hs/pprDataItem - -- once binutils 2.17 is standard. e_code `appOL` t_code `appOL` toOL [ - MOVSxL II32 op (OpReg reg), - ADD (intSize (wordWidth dflags)) (OpReg reg) (OpReg tableReg), + ADD (intSize (wordWidth dflags)) op (OpReg tableReg), JMP_TBL (OpReg tableReg) ids ReadOnlyData lbl ] | otherwise |