#1843: ghc 6.8.1 broken on Mac OS X Leopard PPC
----------------------+-----------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: high | Milestone: 6.8.2
Component: Compiler | Version: 6.8.1
Severity: critical | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: powerpc
Os: MacOS X |
----------------------+-----------------------------------------------------
Comment (by ChrisKuklewicz):
The "lis hi16/ori lo16" instructions seem to only be from
compiler/nativeGen/MachCodeGen.hs line 1754
{{{
getRegister (CmmLit lit)
= let rep = cmmLitRep lit
imm = litToImm lit
code dst = toOL [
LIS dst (HI imm),
OR dst dst (RIImm (LO imm))
]
in return (Any rep code)
}}}
So that is probably the place to fix the code generation.
The above is then rendered to text by PpcMach.hs in the obvious way.
Replacing HI/hi16 by HA/ha16 and changing OR to the right kind of "la" or
"addi"
might fix it.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1843#comment:20>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs