Changeset View
Changeset View
Standalone View
Standalone View
contrib/llvm/lib/Target/X86/X86InstrCompiler.td
Show First 20 Lines • Show All 1,100 Lines • ▼ Show 20 Lines | def X86tcret_6regs : PatFrag<(ops node:$ptr, node:$off), | ||||
for (unsigned i = 3, e = N->getNumOperands(); i != e; ++i) | for (unsigned i = 3, e = N->getNumOperands(); i != e; ++i) | ||||
if (isa<RegisterSDNode>(N->getOperand(i)) && ++NumRegs > 6) | if (isa<RegisterSDNode>(N->getOperand(i)) && ++NumRegs > 6) | ||||
return false; | return false; | ||||
return true; | return true; | ||||
}]>; | }]>; | ||||
def : Pat<(X86tcret ptr_rc_tailcall:$dst, imm:$off), | def : Pat<(X86tcret ptr_rc_tailcall:$dst, imm:$off), | ||||
(TCRETURNri ptr_rc_tailcall:$dst, imm:$off)>, | (TCRETURNri ptr_rc_tailcall:$dst, imm:$off)>, | ||||
Requires<[Not64BitMode]>; | Requires<[Not64BitMode, NotUseRetpoline]>; | ||||
// FIXME: This is disabled for 32-bit PIC mode because the global base | // FIXME: This is disabled for 32-bit PIC mode because the global base | ||||
// register which is part of the address mode may be assigned a | // register which is part of the address mode may be assigned a | ||||
// callee-saved register. | // callee-saved register. | ||||
def : Pat<(X86tcret (load addr:$dst), imm:$off), | def : Pat<(X86tcret (load addr:$dst), imm:$off), | ||||
(TCRETURNmi addr:$dst, imm:$off)>, | (TCRETURNmi addr:$dst, imm:$off)>, | ||||
Requires<[Not64BitMode, IsNotPIC]>; | Requires<[Not64BitMode, IsNotPIC, NotUseRetpoline]>; | ||||
def : Pat<(X86tcret (i32 tglobaladdr:$dst), imm:$off), | def : Pat<(X86tcret (i32 tglobaladdr:$dst), imm:$off), | ||||
(TCRETURNdi tglobaladdr:$dst, imm:$off)>, | (TCRETURNdi tglobaladdr:$dst, imm:$off)>, | ||||
Requires<[NotLP64]>; | Requires<[NotLP64]>; | ||||
def : Pat<(X86tcret (i32 texternalsym:$dst), imm:$off), | def : Pat<(X86tcret (i32 texternalsym:$dst), imm:$off), | ||||
(TCRETURNdi texternalsym:$dst, imm:$off)>, | (TCRETURNdi texternalsym:$dst, imm:$off)>, | ||||
Requires<[NotLP64]>; | Requires<[NotLP64]>; | ||||
def : Pat<(X86tcret ptr_rc_tailcall:$dst, imm:$off), | def : Pat<(X86tcret ptr_rc_tailcall:$dst, imm:$off), | ||||
(TCRETURNri64 ptr_rc_tailcall:$dst, imm:$off)>, | (TCRETURNri64 ptr_rc_tailcall:$dst, imm:$off)>, | ||||
Requires<[In64BitMode]>; | Requires<[In64BitMode, NotUseRetpoline]>; | ||||
// Don't fold loads into X86tcret requiring more than 6 regs. | // Don't fold loads into X86tcret requiring more than 6 regs. | ||||
// There wouldn't be enough scratch registers for base+index. | // There wouldn't be enough scratch registers for base+index. | ||||
def : Pat<(X86tcret_6regs (load addr:$dst), imm:$off), | def : Pat<(X86tcret_6regs (load addr:$dst), imm:$off), | ||||
(TCRETURNmi64 addr:$dst, imm:$off)>, | (TCRETURNmi64 addr:$dst, imm:$off)>, | ||||
Requires<[In64BitMode]>; | Requires<[In64BitMode, NotUseRetpoline]>; | ||||
def : Pat<(X86tcret ptr_rc_tailcall:$dst, imm:$off), | |||||
(RETPOLINE_TCRETURN64 ptr_rc_tailcall:$dst, imm:$off)>, | |||||
Requires<[In64BitMode, UseRetpoline]>; | |||||
def : Pat<(X86tcret ptr_rc_tailcall:$dst, imm:$off), | |||||
(RETPOLINE_TCRETURN32 ptr_rc_tailcall:$dst, imm:$off)>, | |||||
Requires<[Not64BitMode, UseRetpoline]>; | |||||
def : Pat<(X86tcret (i64 tglobaladdr:$dst), imm:$off), | def : Pat<(X86tcret (i64 tglobaladdr:$dst), imm:$off), | ||||
(TCRETURNdi64 tglobaladdr:$dst, imm:$off)>, | (TCRETURNdi64 tglobaladdr:$dst, imm:$off)>, | ||||
Requires<[IsLP64]>; | Requires<[IsLP64]>; | ||||
def : Pat<(X86tcret (i64 texternalsym:$dst), imm:$off), | def : Pat<(X86tcret (i64 texternalsym:$dst), imm:$off), | ||||
(TCRETURNdi64 texternalsym:$dst, imm:$off)>, | (TCRETURNdi64 texternalsym:$dst, imm:$off)>, | ||||
Requires<[IsLP64]>; | Requires<[IsLP64]>; | ||||
▲ Show 20 Lines • Show All 798 Lines • Show Last 20 Lines |