[project @ 2003-08-29 16:00:25 by simonmar]
authorsimonmar <unknown>
Fri, 29 Aug 2003 16:00:29 +0000 (16:00 +0000)
committersimonmar <unknown>
Fri, 29 Aug 2003 16:00:29 +0000 (16:00 +0000)
commit7dc97354e24071c4ece647b918cd5eb1d0cd85ed
treeebf6e3eb956d3427b4cd2796d93df548003bd883
parentf16020a8d2b430dc4d91363716e2406a42747bd4
[project @ 2003-08-29 16:00:25 by simonmar]
Initial x86-64 (aka amd64) support.

Unregisterised it works perfectly.  Registerised, I think it's almost
there, except that I seem to be running into the known codegen bug in
GCC with register variables (bug #7871 in the gcc bugzilla), which
means registerised support is basically hosed until the GCC folks
can get their act together.

We get 8 more registers on amd64, but only 2 more callee-saves
registers.  The calling convention seems to pass args in registers by
default, using the previously-callee-saves %rsi and %rdi as two of the
new arg registers.

I think GHCi should work, since we already have 64-bit ELF support
thanks to Mat Chapman's work on the IA64 port.  I haven't tried GHCi,
though.

The native code generator should be a breeze, because it's so similar
to plain x86.
ghc/compiler/main/DriverFlags.hs
ghc/driver/mangler/ghc-asm.lprl
ghc/includes/MachRegs.h
ghc/includes/TailCalls.h
ghc/rts/Linker.c
ghc/rts/MBlock.h