Allow CmmLabelDiffOff with different widths

Authored by simonmar on Apr 25 2018, 5:35 PM.



This change makes it possible to generate a static 32-bit relative label
offset on x86_64. Currently we can only generate word-sized label

This will be used in D4634 to shrink info tables. See D4632 for more

Test Plan

See D4632

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
simonmar created this revision.Apr 25 2018, 5:35 PM
simonmar edited the summary of this revision. (Show Details)Apr 25 2018, 5:42 PM
simonmar added a reviewer: osa1.
simonmar requested review of this revision.Apr 30 2018, 10:42 AM
jrtc27 added inline comments.Apr 30 2018, 10:52 AM

You probably want to use ww here given you've gone to the trouble of defining it such that it's in scope here?

bgamari added inline comments.May 3 2018, 3:13 PM

I'm confused; it seems to me like it CmmLabelDiffOff should work at any width (but the width will be a lie since everything is a word in -fvia-C, IIRC). If it's really not supported then surely we should add an ASSERT here.

simonmar updated this revision to Diff 16307.May 4 2018, 7:39 AM

address comments

simonmar updated this revision to Diff 16308.May 4 2018, 7:41 AM

address comments

This revision was not accepted when it landed; it landed in state Needs Review.May 16 2018, 7:36 AM
This revision was automatically updated to reflect the committed changes.