projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SPARC NCG: Fix 64bit integers returned from ccalls
[ghc-hetmet.git]
/
compiler
/
nativeGen
/
MachCodeGen.hs
diff --git
a/compiler/nativeGen/MachCodeGen.hs
b/compiler/nativeGen/MachCodeGen.hs
index
325a4e8
..
081947e
100644
(file)
--- a/
compiler/nativeGen/MachCodeGen.hs
+++ b/
compiler/nativeGen/MachCodeGen.hs
@@
-3669,8
+3669,10
@@
genCCall target dest_regs argsAndHints = do
= unitOL $ mkRegRegMoveInstr (RealReg $ oReg 0) r_dest
| not $ isFloatType rep
= unitOL $ mkRegRegMoveInstr (RealReg $ oReg 0) r_dest
| not $ isFloatType rep
- , W64 <- width
- = unitOL $ mkRegRegMoveInstr (RealReg $ oReg 0) r_dest
+ , W64 <- width
+ , r_dest_hi <- getHiVRegFromLo r_dest
+ = toOL [ mkRegRegMoveInstr (RealReg $ oReg 0) r_dest_hi
+ , mkRegRegMoveInstr (RealReg $ oReg 1) r_dest]
in result
in result