Page MenuHomePhabricator

[X86] Add assembler support for {disp8} and {disp32} to control the size of displacement used for memory operands.
ClosedPublic

Authored by craig.topper on Tue, Jul 28, 1:09 PM.

Details

Summary

These prefixes should override the default behavior and force a larger immediate size. I don't believe gas issues any warning if you use {disp8} when a 32-bit displacement is already required. And this patch doesn't either.

This completes the {disp8} and {disp32} support from PR46650.

Diff Detail

Event Timeline

craig.topper created this revision.Tue, Jul 28, 1:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Jul 28, 1:09 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
craig.topper requested review of this revision.Tue, Jul 28, 1:09 PM

I think I'd find the conditionals easier to "read" if they were positive rather than negative? It'd help if the comments spelled out the conditions a little more as well.

Thoughts?

Add some more variables to make the conditionals positive.
Try to improve some of the comments.

RKSimon accepted this revision.Sat, Aug 1, 12:38 PM

LGTM - please can you deal with the the double spaces that clang-format is warning about?

This revision is now accepted and ready to land.Sat, Aug 1, 12:38 PM
This revision was landed with ongoing or failed builds.Sat, Aug 1, 2:13 PM
This revision was automatically updated to reflect the committed changes.