cvs commit: fptools/ghc/compiler/nativeGen AbsCStixGen.lhs AsmCodeGen.lhs
AsmRegAlloc.lhs MachCode.lhs MachMisc.lhs MachRegs.lhs PprMach.lhs
RegAllocInfo.lhs Stix.lhs StixMacro.lhs StixPrim.lhs
fptools/ghc/compiler/prelude PrimRep.lhs
Julian Seward
sewardj@glass.cse.ogi.edu
Mon, 10 Dec 2001 10:04:52 -0800
sewardj 2001/12/10 10:04:52 PST
Modified files:
ghc/compiler/nativeGen AbsCStixGen.lhs AsmCodeGen.lhs
AsmRegAlloc.lhs MachCode.lhs
MachMisc.lhs MachRegs.lhs PprMach.lhs
RegAllocInfo.lhs Stix.lhs StixMacro.lhs
StixPrim.lhs
ghc/compiler/prelude PrimRep.lhs
Log:
Add just enough infrastructure to the NCG that it can deal with simple 64-bit
code on 32-bit platforms. Main changes are:
* Addition of a simple 64-bit instruction selection fn iselExpr64 to MachCode.
This generates code for a 64-bit value and places the results into two
virtual registers, related thusly:
* Add a new type VRegUnique, which is used to label Stix virtual registers.
This type used to be a plain Unique, but that forces the assumption that
each Abstract-C level C temporary corresponds to exactly one Stix virtual
register, which is untrue when the C temporary is 64-bit sized on a
32-bit machine. In the new scheme, the Unique for the C temporary can
turn into two related VRegUniques, related by having the same embedded
unique.
* Made a start on 'target metrics' by adding ncg_target_is_32bits to the
end of Stix.lhs.
* Cleaned up numerous other gruesomenesses in the NCG which never came
to light before now. Got rid of MachMisc.sizeOf, which doesn't make
sense in a 64-bit setting, and replaced it by calls to
PrimRep.getPrimRepArrayElemSize, which, as far as I'm concerned, is the
definitive answer to the questio `How Big Is This PrimRep Really?'
Result: on x86-linux, at least, you can now compile the Entire Prelude
with -fasm! At this stage I cannot claim that the resulting code is
correct, but it's a start.
Revision Changes Path
1.46 +16 -6 fptools/ghc/compiler/nativeGen/AbsCStixGen.lhs
1.50 +10 -2 fptools/ghc/compiler/nativeGen/AsmCodeGen.lhs
1.30 +8 -6 fptools/ghc/compiler/nativeGen/AsmRegAlloc.lhs
1.82 +170 -19 fptools/ghc/compiler/nativeGen/MachCode.lhs
1.50 +1 -13 fptools/ghc/compiler/nativeGen/MachMisc.lhs
1.43 +40 -18 fptools/ghc/compiler/nativeGen/MachRegs.lhs
1.53 +2 -2 fptools/ghc/compiler/nativeGen/PprMach.lhs
1.33 +8 -9 fptools/ghc/compiler/nativeGen/RegAllocInfo.lhs
1.35 +39 -4 fptools/ghc/compiler/nativeGen/Stix.lhs
1.35 +6 -0 fptools/ghc/compiler/nativeGen/StixMacro.lhs
1.76 +5 -3 fptools/ghc/compiler/nativeGen/StixPrim.lhs
1.24 +2 -0 fptools/ghc/compiler/prelude/PrimRep.lhs