diff options
author | Clemens Fruhwirth <clemens@endorphin.org> | 2007-09-12 09:44:30 +0000 |
---|---|---|
committer | Clemens Fruhwirth <clemens@endorphin.org> | 2007-09-12 09:44:30 +0000 |
commit | b8a64b8ec9cd3d8f6e3f23e44312c4903eccac45 (patch) | |
tree | 66daabea531f2ce0502cc3a812d98b9d46d402dd /rts/Weak.c | |
parent | 873dc895ab9c059fa80c34d43e13228c5049ae9d (diff) | |
download | haskell-b8a64b8ec9cd3d8f6e3f23e44312c4903eccac45.tar.gz |
Sign extension hack to work around PC64 relocation limitation for binutils <2.17 for x86_64.
binutils <2.17 can't generate PC64 relocations for x86_64. Hence we
emit only 32 bit PC relative offsets, and artifically stick a zero in
front of them to make them 64 bit (see PprMach.sh ppr_item in
pprDataItem). This works as long as the offset is <32bit AND it's
positive. This is not the case for offsets in jump tables, they are
all negative. This hack sign extends them with a MOVSXL instruction
into the dead index register, then adding the properly sign extended
offset to the jump table base label giving the correct target address
for the following jump.
Diffstat (limited to 'rts/Weak.c')
0 files changed, 0 insertions, 0 deletions