This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add REX prefix for GOTTPOFF/TLSDESC relocs in x32 mode
ClosedPublic

Authored by hvdijk on Dec 12 2020, 4:36 AM.

Details

Summary

The REX prefix is needed to allow linker relaxations: even if the
instruction we emit may not need it, the linker may change it to a
different instruction which does need it.

Diff Detail

Event Timeline

hvdijk created this revision.Dec 12 2020, 4:36 AM
hvdijk requested review of this revision.Dec 12 2020, 4:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 12 2020, 4:36 AM
RKSimon accepted this revision.Dec 15 2020, 3:38 AM

LGTM with a few minors

llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
1228

clang-format - check that you're not exceeding col80

1241

(style) const auto *Ref

This revision is now accepted and ready to land.Dec 15 2020, 3:38 AM
hvdijk closed this revision.Dec 18 2020, 12:20 PM

I accidentally pushed this with the original commit message as 2aae2136, causing a missing link to/from this review. Manually linking this here now.