From 48f77ccca1446999be4373acf7fd1a667aaf6f4d Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 15 Jun 2005 13:50:14 +0000 Subject: [PATCH] [project @ 2005-06-15 13:50:14 by simonmar] Undo accidental commit --- ghc/compiler/nativeGen/RegisterAlloc.hs | 52 ------------------------------- 1 file changed, 52 deletions(-) diff --git a/ghc/compiler/nativeGen/RegisterAlloc.hs b/ghc/compiler/nativeGen/RegisterAlloc.hs index 303d8a6..1295f9c 100644 --- a/ghc/compiler/nativeGen/RegisterAlloc.hs +++ b/ghc/compiler/nativeGen/RegisterAlloc.hs @@ -80,58 +80,6 @@ The algorithm is roughly: -} -{- -Possible plan for x86 floating pt register alloc: - - - The standard reg alloc procedure allocates pretend floating point - registers to the GXXX instructions. We need to convert these GXXX - instructions to proper x86 FXXX instructions, using the FP stack for - registers. - - We could do this in a separate pass, but it helps to have the - information about which real registers are live after the - instruction, so we do it at reg alloc time where that information - is already available. - - - keep a mapping from %fakeN to FP stack slot in the monad. - - - after assigning registers to the GXXX instruction, convert the - instruction to an FXXX instruction. eg. - - for GMOV just update the mapping, and ffree any dead regs. - - GLD: just fld and update mapping - GLDZ: just fldz and update mapping - GLD1: just fld1 and update mapping - - GST: just fst and update mapping, ffree dead regs. - - special case for GST reg, where reg is st(0), we can fstp. - - for GADD fp1, fp2, fp3: - - easy way: fld fp2 - fld fp1 - faddp - -- record that fp3 is now in %st(0), and all other - -- slots are pushed down one. - ffree fp1 -- if fp1 is dead now - ffree fp2 -- if fp2 is dead now - - optimisation #1 - - if fp1 is in %st(0) and is dead afterward - fadd %st(0), fp2 - -- record fp3 is in %st(0) - ffree fp2 -- if fp2 is dead now - - if fp2 is in %st(0) and is dead afterward - fadd %st(0), fp1 - -- record fp3 is in %st(0) - - if fp1 is in %st(0), fp2 is dead afterward - fadd fp2, %st(0) - -- record fp3 is in fp2's locn - - if fp2 is in %st(0), fp1 is dead afterward - fadd fp1, %st(0) - -- record fp3 is in fp1's locn - - - we should be able to avoid the nasty ffree problems of the current - scheme. The stack should be empty before doing a non-local - jump/call - we can assert that this is the case. --} - - module RegisterAlloc ( regAlloc ) where -- 1.7.10.4