Wed Sep 12 02:44:30 PDT 2007  Clemens Fruhwirth <[EMAIL PROTECTED]>
  * 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.

    M ./compiler/nativeGen/MachCodeGen.hs -1 +19

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to