[PATCH] D24359: Win64: Don't use REX prefix for direct tail calls
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 8 13:07:00 PDT 2016
majnemer added a comment.
Hmm, looks like we are over REXing there too:
void __declspec(dllimport) h();
void f() {
h();
}
turns into:
f: # @f
.Ltmp0:
.seh_proc f
# BB#0: # %entry
.Ltmp1:
.seh_endprologue
rex64 jmpq *__imp_h(%rip) # TAILCALL
# encoding: [0x48,0xff,0x25,A,A,A,A]
# fixup A - offset: 3, value: __imp_h-4, kind: reloc_riprel_4byte
.seh_handlerdata
.text
.Ltmp2:
.seh_endproc
My reading indicates that the unwinder will consider this as a tail call. If anything, our REX prefix is probably confusing it.
I imagine that MSVC omits it here?
https://reviews.llvm.org/D24359
More information about the llvm-commits
mailing list