Loading an F64 into an I32 register...
Simon Peyton-Jones
simonpj at microsoft.com
Fri Feb 6 10:17:53 EST 2004
Quite right. Thanks. I'll commit this change
S
| -----Original Message-----
| From: cvs-all-bounces at haskell.org [mailto:cvs-all-bounces at haskell.org]
On Behalf Of Wolfgang
| Thaller
| Sent: 05 February 2004 21:16
| To: cvs-ghc at haskell.org
| 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
| Cvs-ghc at haskell.org
| http://www.haskell.org/mailman/listinfo/cvs-ghc
More information about the Cvs-ghc
mailing list