This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add support for {disp32} to control size of jmp and jcc instructions in the assembler
ClosedPublic

Authored by craig.topper on Jul 27 2020, 4:04 PM.

Details

Summary

By default we pick a 1 byte displacement and let relaxation enlarge it if necessary. The GNU assembler supports a pseudo prefix to basically pre-relax the instruction the larger size.

I plan to add {disp8} and {disp32} support for memory operands in another patch which is why I've included the parsing code and enum for {disp8} pseudo prefix as well.

Diff Detail

Event Timeline

craig.topper created this revision.Jul 27 2020, 4:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 27 2020, 4:04 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
echristo accepted this revision.Jul 27 2020, 6:14 PM
This revision is now accepted and ready to land.Jul 27 2020, 6:14 PM