LLVM  9.0.0svn
Functions
X86CallingConv.cpp File Reference
#include "X86CallingConv.h"
#include "X86Subtarget.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/IR/CallingConv.h"
#include "X86GenCallingConv.inc"
Include dependency graph for X86CallingConv.cpp:

Go to the source code of this file.

Functions

static bool CC_X86_32_RegCall_Assign2Regs (unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
 When regcall calling convention compiled to 32 bit arch, special treatment is required for 64 bit masks. More...
 
static ArrayRef< MCPhysReg > CC_X86_VectorCallGetSSEs (const MVT &ValVT)
 
static ArrayRef< MCPhysReg > CC_X86_64_VectorCallGetGPRs ()
 
static bool CC_X86_VectorCallAssignRegister (unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
 
static bool CC_X86_64_VectorCall (unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
 Vectorcall calling convention has special handling for vector types or HVA for 64 bit arch. More...
 
static bool CC_X86_32_VectorCall (unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
 Vectorcall calling convention has special handling for vector types or HVA for 32 bit arch. More...
 
static bool CC_X86_AnyReg_Error (unsigned &, MVT &, MVT &, CCValAssign::LocInfo &, ISD::ArgFlagsTy &, CCState &)
 
static bool CC_X86_32_MCUInReg (unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
 

Function Documentation

◆ CC_X86_32_MCUInReg()

static bool CC_X86_32_MCUInReg ( unsigned ValNo,
MVT ValVT,
MVT LocVT,
CCValAssign::LocInfo LocInfo,
ISD::ArgFlagsTy ArgFlags,
CCState State 
)
static

◆ CC_X86_32_RegCall_Assign2Regs()

static bool CC_X86_32_RegCall_Assign2Regs ( unsigned ValNo,
MVT ValVT,
MVT LocVT,
CCValAssign::LocInfo LocInfo,
ISD::ArgFlagsTy ArgFlags,
CCState State 
)
static

When regcall calling convention compiled to 32 bit arch, special treatment is required for 64 bit masks.

The value should be assigned to two GPRs.

Returns
true if registers were allocated and false otherwise.

Definition at line 26 of file X86CallingConv.cpp.

References llvm::CCState::addLoc(), llvm::CCState::AllocateReg(), assert(), llvm::N86::EAX, llvm::N86::ECX, llvm::N86::EDI, llvm::N86::EDX, llvm::N86::ESI, llvm::CCValAssign::getCustomReg(), I, llvm::CCState::isAllocated(), llvm::SmallVectorTemplateBase< T >::push_back(), Reg, and llvm::SmallVectorBase::size().

◆ CC_X86_32_VectorCall()

static bool CC_X86_32_VectorCall ( unsigned ValNo,
MVT ValVT,
MVT LocVT,
CCValAssign::LocInfo LocInfo,
ISD::ArgFlagsTy ArgFlags,
CCState State 
)
static

Vectorcall calling convention has special handling for vector types or HVA for 32 bit arch.

For HVAs actual XMM registers are allocated on the second pass. For vector types, actual XMM registers are allocated on the first pass.

Returns
true if registers were allocated and false otherwise.

Definition at line 185 of file X86CallingConv.cpp.

References llvm::CCState::addLoc(), llvm::CCState::AllocateReg(), CC_X86_VectorCallAssignRegister(), CC_X86_VectorCallGetSSEs(), llvm::CCValAssign::getReg(), llvm::MVT::getSizeInBits(), llvm::MVT::i32, llvm::CCValAssign::Indirect, llvm::MVT::isFloatingPoint(), llvm::ISD::ArgFlagsTy::isHva(), llvm::ISD::ArgFlagsTy::isSecArgPass(), llvm::MVT::isVector(), Reg, and llvm::ISD::ArgFlagsTy::setInReg().

◆ CC_X86_64_VectorCall()

static bool CC_X86_64_VectorCall ( unsigned ValNo,
MVT ValVT,
MVT LocVT,
CCValAssign::LocInfo LocInfo,
ISD::ArgFlagsTy ArgFlags,
CCState State 
)
static

Vectorcall calling convention has special handling for vector types or HVA for 64 bit arch.

For HVAs shadow registers might be allocated on the first pass and actual XMM registers are allocated on the second pass. For vector types, actual XMM registers are allocated on the first pass.

Returns
true if registers were allocated and false otherwise.

Definition at line 128 of file X86CallingConv.cpp.

References llvm::CCState::addLoc(), llvm::CCState::AllocateReg(), llvm::CCState::AllocateStack(), CC_X86_64_VectorCallGetGPRs(), CC_X86_VectorCallAssignRegister(), CC_X86_VectorCallGetSSEs(), llvm::CCValAssign::getReg(), llvm::MVT::getSizeInBits(), llvm::CCState::isAllocated(), llvm::MVT::isFloatingPoint(), llvm::ISD::ArgFlagsTy::isHva(), llvm::ISD::ArgFlagsTy::isHvaStart(), llvm::ISD::ArgFlagsTy::isSecArgPass(), llvm::MVT::isVector(), and Reg.

◆ CC_X86_64_VectorCallGetGPRs()

static ArrayRef<MCPhysReg> CC_X86_64_VectorCallGetGPRs ( )
static

◆ CC_X86_AnyReg_Error()

static bool CC_X86_AnyReg_Error ( unsigned ,
MVT ,
MVT ,
CCValAssign::LocInfo ,
ISD::ArgFlagsTy ,
CCState  
)
static

Definition at line 225 of file X86CallingConv.cpp.

References llvm_unreachable.

◆ CC_X86_VectorCallAssignRegister()

static bool CC_X86_VectorCallAssignRegister ( unsigned ValNo,
MVT ValVT,
MVT LocVT,
CCValAssign::LocInfo LocInfo,
ISD::ArgFlagsTy ArgFlags,
CCState State 
)
static

◆ CC_X86_VectorCallGetSSEs()

static ArrayRef<MCPhysReg> CC_X86_VectorCallGetSSEs ( const MVT ValVT)
static