LLVM 20.0.0git
|
#include "X86CallingConv.h"
#include "X86Subtarget.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/IR/Module.h"
#include "X86GenCallingConv.inc"
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. | |
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. | |
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. | |
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) |
static bool | CC_X86_Intr (unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State) |
X86 interrupt handlers can only take one or two stack arguments, but if there are two arguments, they are in the opposite order from the standard convention. | |
static bool | CC_X86_64_Pointer (unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State) |
|
static |
Definition at line 237 of file X86CallingConv.cpp.
References llvm::CCState::addLoc(), llvm::CCState::AllocateReg(), llvm::CCState::AllocateStack(), assert(), llvm::SmallVectorImpl< T >::clear(), llvm::SmallVectorBase< Size_T >::empty(), llvm::CCState::getFirstUnallocated(), llvm::CCValAssign::getPending(), llvm::CCState::getPendingLocs(), llvm::CCValAssign::getReg(), llvm::ISD::ArgFlagsTy::isSplit(), llvm::ISD::ArgFlagsTy::isSplitEnd(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::SmallVectorBase< Size_T >::size().
|
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.
Definition at line 26 of file X86CallingConv.cpp.
References llvm::CCState::addLoc(), llvm::CCState::AllocateReg(), assert(), llvm::CCValAssign::getCustomReg(), I, llvm::CCState::isAllocated(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::SmallVectorBase< Size_T >::size().
|
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.
Definition at line 188 of file X86CallingConv.cpp.
References llvm::CCState::addLoc(), llvm::CCState::AllocateReg(), CC_X86_VectorCallAssignRegister(), CC_X86_VectorCallGetSSEs(), llvm::CCValAssign::getReg(), llvm::MVT::getSizeInBits(), llvm::CCValAssign::Indirect, llvm::MVT::isFloatingPoint(), llvm::ISD::ArgFlagsTy::isHva(), llvm::ISD::ArgFlagsTy::isSecArgPass(), llvm::MVT::isVector(), and llvm::ISD::ArgFlagsTy::setInReg().
|
static |
Definition at line 333 of file X86CallingConv.cpp.
References llvm::CCValAssign::ZExt.
|
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.
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::CCState::getMachineFunction(), llvm::CCValAssign::getReg(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MVT::getSizeInBits(), llvm::MachineFunction::getSubtarget(), llvm::CCState::isAllocated(), llvm::MVT::isFloatingPoint(), llvm::ISD::ArgFlagsTy::isHva(), llvm::ISD::ArgFlagsTy::isHvaStart(), llvm::ISD::ArgFlagsTy::isSecArgPass(), llvm::MVT::isVector(), and TRI.
Definition at line 85 of file X86CallingConv.cpp.
Referenced by CC_X86_64_VectorCall().
|
static |
Definition at line 228 of file X86CallingConv.cpp.
References llvm_unreachable.
|
static |
X86 interrupt handlers can only take one or two stack arguments, but if there are two arguments, they are in the opposite order from the standard convention.
Therefore, we have to look at the argument count up front before allocating stack for each argument.
Definition at line 297 of file X86CallingConv.cpp.
References llvm::CCState::addLoc(), llvm::CCState::AllocateStack(), llvm::Function::arg_size(), llvm::MachineFunction::getFunction(), llvm::CCState::getMachineFunction(), llvm::CCValAssign::getMem(), llvm::MachineFunction::getSubtarget(), is64Bit(), llvm::Offset, and llvm::report_fatal_error().
|
static |
Definition at line 90 of file X86CallingConv.cpp.
References llvm::CCState::addLoc(), llvm::CCState::AllocateReg(), assert(), CC_X86_VectorCallGetSSEs(), llvm::CCState::getMachineFunction(), llvm::CCValAssign::getReg(), llvm::MachineFunction::getSubtarget(), is64Bit(), llvm::CCState::isAllocated(), llvm::CCState::IsShadowAllocatedReg(), and llvm_unreachable.
Referenced by CC_X86_32_VectorCall(), and CC_X86_64_VectorCall().
Definition at line 67 of file X86CallingConv.cpp.
References llvm::MVT::is256BitVector(), and llvm::MVT::is512BitVector().
Referenced by CC_X86_32_VectorCall(), CC_X86_64_VectorCall(), and CC_X86_VectorCallAssignRegister().