Page MenuHomePhabricator

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

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



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

Unit TestsFailed

60 msx64 windows > LLVM.CodeGen/XCore::threads.ll
Script: -- : 'RUN: at line 1'; c:\ws\w16c2-1\llvm-project\premerge-checks\build\bin\llc.exe -march=xcore < C:\ws\w16c2-1\llvm-project\premerge-checks\llvm\test\CodeGen\XCore\threads.ll | c:\ws\w16c2-1\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w16c2-1\llvm-project\premerge-checks\llvm\test\CodeGen\XCore\threads.ll

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


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


(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.