UNREG: PprC: add support for of W32 literals
ClosedPublic

Authored by trofi on Jun 12 2018, 10:07 AM.

Details

Summary

Today UNREG build fails to generate sub-word literals:

  rts_dist_HC rts/dist/build/StgStartup.o
ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 8.5.20180612 for x86_64-unknown-linux):
        pprStatics: cannot emit a non-word-sized static literal
  W32

The change allows combining two subwords into one word.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
trofi created this revision.Jun 12 2018, 10:07 AM

Does this actually make the build succeed? I thought there was a bigger problem, namely Trac #15237

trofi added a comment.Jun 12 2018, 3:58 PM

Does this actually make the build succeed? I thought there was a bigger problem, namely Trac #15237

At least on x86_64-linux (anf ghc-HEAD) I am able to build stage2 and am seeing most tests pass make fulltest.

trofi updated the Trac tickets for this revision.Jun 13 2018, 1:09 AM
bgamari accepted this revision.Jun 13 2018, 7:22 AM
In D4837#133405, @trofi wrote:

Does this actually make the build succeed? I thought there was a bigger problem, namely Trac #15237

Indeed this patch does fix the root of that ticket. The approach seems quite reasonable to me; it will fail when faced with non-naturally aligned statics but that is a feature not a bug in my opinion.

At least on x86_64-linux (anf ghc-HEAD) I am able to build stage2 and am seeing most tests pass make fulltest.

This revision is now accepted and ready to land.Jun 13 2018, 7:22 AM
This revision was automatically updated to reflect the committed changes.