Win64: Put a REX_W prefix on all TAILJMP* instructions
authorReid Kleckner <reid@kleckner.net>
Fri, 30 Jan 2015 21:03:31 +0000 (21:03 +0000)
committerReid Kleckner <reid@kleckner.net>
Fri, 30 Jan 2015 21:03:31 +0000 (21:03 +0000)
commita580b6ec67ec605f563bc4e52a3490b9c951ce59
treebf75810381b3ebf19dc96018ebf99fff8b060c8b
parenta9a6f55840ff2909455ef578e179c8556de5822d
Win64: Put a REX_W prefix on all TAILJMP* instructions

MSDN's x64 software conventions page says that this is one of the fixed
list of legal epilogues:
https://msdn.microsoft.com/en-us/library/tawsa7cb.aspx

Presumably this is how the unwinder distinguishes epilogue jumps from
in-function control flow.

Also normalize the way we place "## TAILCALL" comments on such jumps.

llvm-svn: 227611
llvm/lib/Target/X86/X86FrameLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86InstrControl.td
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/lib/Target/X86/X86InstrInfo.td
llvm/lib/Target/X86/X86MCInstLower.cpp
llvm/test/CodeGen/X86/tail-call-win64.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/tailcall-64.ll