[PATCH] D42998: [x86/retpoline] Make the external thunk names exactly match the names that happened to end up in GCC.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 18:47:39 PST 2018


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

Looks good!



================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:26969
+  // is costly.
   switch (Reg) {
   case 0:
----------------
nit, think this would be cleaner as two switches?
  if (Subtarget.useRetpolineExternalThunk()) {
    switch (Ret) {
    case X86::EAX: return "__x86_indirect_thunk_eax";
    case X86::ECX: return "__x86_indirect_thunk_ecx";
    ...
    }
  } else {
    switch (Ret) {
    case X86::EAX: return "__llvm_retpoline_eax";
    case X86::ECX: return "__llvm_retpoline_ecx";
    ...
    }
  }


Repository:
  rL LLVM

https://reviews.llvm.org/D42998





More information about the llvm-commits mailing list