x86-64: fix a problem exposed by negative offsets in vector tables
authorSimon Marlow <simonmar@microsoft.com>
Thu, 29 Jun 2006 14:06:08 +0000 (14:06 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Thu, 29 Jun 2006 14:06:08 +0000 (14:06 +0000)
commit1bda00ba7f7d3ae4f332d7fac4add8ee2407b476
treefa4f32e85c98cbea1e9d3811fcd9e20927c726ac
parent27db51b3ef829728dd1c16d1324f959d116d67ea
x86-64: fix a problem exposed by negative offsets in vector tables
static relative offsets (eg .long l1-l2) are restricted to 32 bits on
x86-64 due to lack of support in the linker.  The codegen, NCG and
runtime work around this, using 32-bit offsets instead of 64.
However, we were missing a workaround for vector tables, and it
happened to work by accident because the offsets were always positive
and resolved by the assembler.  The bug was exposed by using the NCG
to compile the RTS, where the offsets became negative, again by
accident.
compiler/codeGen/CgInfoTbls.hs