[GHC] #12054: PowerPC: Unsupported relocation against x0

#12054: PowerPC: Unsupported relocation against x0 -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 8.1 (CodeGen) | Keywords: | Operating System: Unknown/Multiple Architecture: powerpc | Type of failure: Building GHC | failed Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- On PowerPC/Linux, the `perf` build is failing for the file `compiler/cmm/PprC.hs` with a large number of errors like: {{{ tmp/ghc29102_0/ghc_3.s:310927:0: error: Error: unsupported relocation against x0 tmp/ghc29102_0/ghc_3.s:310938:0: error: Error: unsupported relocation against x0 tmp/ghc29102_0/ghc_3.s:310959:0: error: Error: unsupported relocation against x0 }}} All of the above error lines are of the form: {{{ stwu x0, 1 , 13 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12054 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12054: PowerPC: Unsupported relocation against x0 ----------------------------------------+-------------------------------- Reporter: erikd | Owner: trommler Type: bug | Status: new Priority: normal | Milestone: 8.0.2 Component: Compiler (CodeGen) | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+-------------------------------- Changes (by trommler): * owner: => trommler Comment: The assembly should read {{{ stwux 0,1,13 }}} It's a bug in the PPC assembler pretty printer. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12054#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12054: PowerPC: Unsupported relocation against x0 ----------------------------------------+-------------------------------- Reporter: erikd | Owner: trommler Type: bug | Status: new Priority: normal | Milestone: 8.0.2 Component: Compiler (CodeGen) | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+-------------------------------- Comment (by erikd): Thanks @trommler! I meant to CC you on this, but then forgot. Seems I didn't need to :). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12054#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12054: PowerPC: Unsupported relocation against x0 ----------------------------------------+-------------------------------- Reporter: erikd | Owner: trommler Type: bug | Status: new Priority: normal | Milestone: 8.0.2 Component: Compiler (CodeGen) | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+-------------------------------- Comment (by trommler): Replying to [comment:2 erikd]:
Thanks @trommler! I meant to CC you on this, but then forgot. Seems I didn't need to :). No problem :-)
I have a fix that I am currently validating on powerpc64 and powerpc64le. I will post it on Phabricator once it's done validating. If you want to take a look before, the patch is here: [https://github.com/trommler/ghc/tree/T12054] -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12054#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12054: PowerPC: Unsupported relocation against x0 ----------------------------------------+-------------------------------- Reporter: erikd | Owner: trommler Type: bug | Status: new Priority: normal | Milestone: 8.0.2 Component: Compiler (CodeGen) | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+-------------------------------- Comment (by trommler): I could not reproduce the bug on powerpc64le which is strange. The above code is generated when we need to move the stack pointer further than what fits into a 16 bit signed offset. The stack pointer is updated when we allocate a new stack frame or when we need to allocate additional spill slots in the current stack frame. A spill slot on 64-bit, however, has eight bytes not four so I would expect to see the issue on powerpc64le and powerpc64 too. The bug in the pretty printer affects all PowerPCs but it seems I can't tickle it on 64-bit processors. Is there another bug higher up in the code generator that affects only 32 bit? How can we produce a regression test for this bug? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12054#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12054: PowerPC: Unsupported relocation against x0 ----------------------------------------+---------------------------------- Reporter: erikd | Owner: trommler Type: bug | Status: patch Priority: normal | Milestone: 8.0.2 Component: Compiler (CodeGen) | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2214 Wiki Page: | ----------------------------------------+---------------------------------- Changes (by trommler): * status: new => patch * differential: => Phab:D2214 Comment: Here is the fix for the native code generator issue. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12054#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12054: PowerPC: Unsupported relocation against x0 ----------------------------------------+---------------------------------- Reporter: erikd | Owner: trommler Type: bug | Status: patch Priority: highest | Milestone: 8.0.1 Component: Compiler (CodeGen) | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2214 Wiki Page: | ----------------------------------------+---------------------------------- Changes (by hvr): * priority: normal => highest * milestone: 8.0.2 => 8.0.1 Comment: I consider the patch safe & low-risk enough to include in 8.0.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12054#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12054: PowerPC: Unsupported relocation against x0
----------------------------------------+----------------------------------
Reporter: erikd | Owner: trommler
Type: bug | Status: patch
Priority: highest | Milestone: 8.0.1
Component: Compiler (CodeGen) | Version: 8.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: powerpc
Type of failure: Building GHC failed | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2214
Wiki Page: |
----------------------------------------+----------------------------------
Comment (by Ben Gamari

#12054: PowerPC: Unsupported relocation against x0 ----------------------------------------+---------------------------------- Reporter: erikd | Owner: trommler Type: bug | Status: closed Priority: highest | Milestone: 8.0.1 Component: Compiler (CodeGen) | Version: 8.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2214 Wiki Page: | ----------------------------------------+---------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed Comment: Merged to `ghc-8.0` as 87a3ea5612b0b9a174131a9a0bf9287c0820e8db. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12054#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12054: PowerPC: Unsupported relocation against x0 ----------------------------------------+---------------------------------- Reporter: erikd | Owner: trommler Type: bug | Status: closed Priority: highest | Milestone: 8.0.1 Component: Compiler (CodeGen) | Version: 8.0.1-rc4 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: powerpc Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2214 Wiki Page: | ----------------------------------------+---------------------------------- Changes (by hvr): * version: 8.1 => 8.0.1-rc4 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12054#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC