Quite right. Thanks. I'll commit this change S
| -----Original Message----- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wolfgang | Thaller | Sent: 05 February 2004 21:16 | To: [EMAIL PROTECTED] | Subject: Loading an F64 into an I32 register... | | ... is exactly what the new codeGen tried to do when compiling | GHC/Float.lhs. | | I investigated a little bit, and I found this in CgBindery.lhs: | | idInfoToAmode info | = case cg_vol info of { | RegLoc reg -> returnFC (CmmReg reg) ; | VirNodeLoc nd_off -> returnFC (cmmLoadIndexW (CmmReg nodeReg) | nd_off) ; | ... | | Now I must admit that I have only a very vague idea of what this code | really does, but it seems to disregard the MachRep of the thing in | question. If I change the code to... | | idInfoToAmode info | = case cg_vol info of { | RegLoc reg -> returnFC (CmmReg reg) ; | VirNodeLoc nd_off -> returnFC (CmmLoad (cmmOffsetW (CmmReg | nodeReg) nd_off) mach_rep) ; | ... | | ... then I get syntactically correct assembly code for GHC/Float.lhs, | which I consider a definite improvement. I'm up to GHC/IOBase.lhs now | :-). I'll leave it to the professionals to decide whether the above | change makes any real sense. | | Cheers, | | Wolfgang | | _______________________________________________ | Cvs-ghc mailing list | [EMAIL PROTECTED] | http://www.haskell.org/mailman/listinfo/cvs-ghc _______________________________________________ Cvs-ghc mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/cvs-ghc
