[GHC] #8816: Make SPARC registerised again.
GHC
ghc-devs at haskell.org
Sun Apr 9 17:15:45 UTC 2017
#8816: Make SPARC registerised again.
------------------------------------+------------------------------
Reporter: kgardas | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version:
Resolution: | Keywords:
Operating System: Solaris | Architecture: sparc
Type of failure: None/Unknown | Test Case:
Blocked By: 8847 | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
------------------------------------+------------------------------
Comment (by slyfox):
To try NCG locally you don't even need to patch autoconf. That did the
trick for me:
{{{
$ ./configure --target=sparc-unknown-linux-gnu --disable-unregisterised
$ make
}}}
Unfortunately NCG for sparc needs a few more fixes.
64-bit subtract inplementation:
{{{
rts_dist_HC rts/dist/build/StgStartup.o
ghc-stage1: panic! (the 'impossible' happened)
(GHC version 8.3.20170408 for sparc-unknown-linux):
iselExpr64(sparc)
I64[_c2::P32 + 64] - %MO_UU_Conv_W32_W64((Hp + 4) - I32[_c3::I32])
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at
compiler/utils/Outputable.hs:1134:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1138:37 in
ghc:Outputable
pprPanic, called at
compiler/nativeGen/SPARC/CodeGen/Gen64.hs:196:6 in ghc:SPARC.CodeGen.Gen64
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
Something fun in register allocator WRT PIC register:
{{{
HC [stage 1] libraries/ghc-prim/dist-install/build/GHC/Types.o
ghc-stage1: panic! (the 'impossible' happened)
(GHC version 8.3.20170408 for sparc-unknown-linux):
SPARC.CodeGen.Base.getRegisterReg: global is in memory
PicBaseReg
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at
compiler/utils/Outputable.hs:1134:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1138:37 in
ghc:Outputable
pprPanic, called at
compiler/nativeGen/SPARC/CodeGen/Base.hs:103:21 in ghc:SPARC.CodeGen.Base
}}}
'''-fPIC''' is not really supported by NCG:
{{{
rts_dist_HC rts/dist/build/Compact.thr_l_dyn_o
ghc-stage1: panic! (the 'impossible' happened)
(GHC version 8.3.20170408 for sparc-unknown-linux):
MachCodeGen: sparc genSwitch PIC not finished
CallStack (from HasCallStack):
error, called at compiler/nativeGen/SPARC/CodeGen.hs:316:11 in
ghc:SPARC.CodeGen
}}}
prof build is also broken in an interesting way:
{{{
HC [stage 1] libraries/ghc-prim/dist-install/build/GHC/Types.p_o
/tmp/ghc26402_0/ghc_3.s: Assembler messages:
/tmp/ghc26402_0/ghc_3.s:107:0: error:
Error: can't resolve `iat6_str' {.rodata.str.iat6_str section} -
`ghczmprim_GHCziTypes_HEqzusc_info' {.rodata.str.iat7_str section}
|
107 | .long iat6_str-(ghczmprim_GHCziTypes_HEqzusc_info)+0
| ^
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8816#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list