
#7830: Error: operand out of range -------------------------+-------------------------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: high | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Keywords: | Os: Linux Architecture: powerpc | Failure: Installing GHC failed Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | -------------------------+-------------------------------------------------- Comment(by erikd): I have a rough hack work around for this but its not suitable for commiting to git yet. Basically in the pretty-printer (it really belongs in the codeGen and will be moved there) I rewrite: {{{ lwz 30, .label-(1b)(31) }}} to {{{ addis 30, 31, (.label-(1b))@ha lwz 30, (.label-(1b))@l(30) }}} This compiles but I then get an illegal instruction error in function `cr_str`. The call stack looks like this: {{{ #0 0x0f3f3e24 in cr_str () from /home/erikd/Git/ghc- upstream/rts/dist/build/libHSrts-ghc7.7.20130623.so #1 0x0f3df490 in stg_catchzh () from /home/erikd/Git/ghc- upstream/rts/dist/build/libHSrts-ghc7.7.20130623.so #2 0x0f3cd01c in scheduleWaitThread () from /home/erikd/Git/ghc- upstream/rts/dist/build/libHSrts-ghc7.7.20130623.so #3 0x0f3c73dc in rts_evalLazyIO () from /home/erikd/Git/ghc- upstream/rts/dist/build/libHSrts-ghc7.7.20130623.so #4 0x0f3c9300 in hs_main () from /home/erikd/Git/ghc- upstream/rts/dist/build/libHSrts-ghc7.7.20130623.so #5 0x10006ae4 in main () }}} and the disassembled code looks like: {{{ 0x0f3f3dec: rlwimi r1,r2,10,0,16 0x0f3f3df0: xoris r2,r27,27237 0x0f3f3df4: ori r20,r27,8293 0x0f3f3df8: xoris r20,r19,25970 0x0f3f3dfc: oris r4,r11,8448 0x0f3f3e00: .long 0xfffeae2c 0x0f3f3e04: .long 0xfffeae2c 0x0f3f3e08: .long 0xfffeae2c 0x0f3f3e0c: .long 0xfffeae2c 0x0f3f3e10: .long 0xfffeae2c 0x0f3f3e14: .long 0xfffeae2c 0x0f3f3e18: .long 0xfffeae2c 0x0f3f3e1c: .long 0xfffeae2c 0x0f3f3e20: .long 0xfffeae2c => 0x0f3f3e24: .long 0xfffeae20 0x0f3f3e28: .long 0xfffeae20 }}} with the illegal instruction indicated. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7830#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler