LLVM: lib/Target/MSP430/MSP430ISelLowering.cpp File Reference (original) (raw)

Go to the source code of this file.

Macros
#define DEBUG_TYPE "msp430-lower"
Functions
template
static void ParseFunctionArgs (const SmallVectorImpl< ArgT > &Args, SmallVectorImpl< unsigned > &Out)
For each argument in a function store the number of pieces it is composed of.
static void AnalyzeVarArgs (CCState &State, const SmallVectorImpl< ISD::OutputArg > &Outs)
static void AnalyzeVarArgs (CCState &State, const SmallVectorImpl< ISD::InputArg > &Ins)
template
static void AnalyzeArguments (CCState &State, SmallVectorImpl< CCValAssign > &ArgLocs, const SmallVectorImpl< ArgT > &Args)
Analyze incoming and outgoing function arguments.
static void AnalyzeRetResult (CCState &State, const SmallVectorImpl< ISD::InputArg > &Ins)
static void AnalyzeRetResult (CCState &State, const SmallVectorImpl< ISD::OutputArg > &Outs)
template
static void AnalyzeReturnValues (CCState &State, SmallVectorImpl< CCValAssign > &RVLocs, const SmallVectorImpl< ArgT > &Args)
static SDValue EmitCMP (SDValue &LHS, SDValue &RHS, SDValue &TargetCC, ISD::CondCode CC, const SDLoc &dl, SelectionDAG &DAG)
Variables
static cl::opt< bool > MSP430NoLegalImmediate ("msp430-no-legal-immediate", cl::Hidden, cl::desc("Enable non legal immediates (for testing purposes only)"), cl::init(false))

DEBUG_TYPE

#define DEBUG_TYPE "msp430-lower"

AnalyzeArguments()

Analyze incoming and outgoing function arguments.

We need custom C++ code to handle special constraints in the ABI like reversing the order of the pieces of splitted arguments. In addition, all pieces of a certain argument have to be passed either using registers or the stack but never mixing both.

Definition at line 273 of file MSP430ISelLowering.cpp.

References llvm::CCValAssign::AExt, AnalyzeVarArgs(), assert(), llvm::CCValAssign::Full, llvm::CCValAssign::getReg(), llvm::ISD::ArgFlagsTy::isByVal(), llvm::ISD::ArgFlagsTy::isSExt(), llvm::ISD::ArgFlagsTy::isZExt(), llvm::CallingConv::MSP430_BUILTIN, ParseFunctionArgs(), Reg, llvm::CCValAssign::SExt, llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::CCValAssign::ZExt.

AnalyzeRetResult() [1/2]

AnalyzeRetResult() [2/2]

AnalyzeReturnValues()

AnalyzeVarArgs() [1/2]

AnalyzeVarArgs() [2/2]

EmitCMP()

Definition at line 861 of file MSP430ISelLowering.cpp.

References assert(), llvm::CallingConv::C, MSP430CC::COND_E, MSP430CC::COND_GE, MSP430CC::COND_HS, MSP430CC::COND_INVALID, MSP430CC::COND_L, MSP430CC::COND_LO, MSP430CC::COND_NE, llvm::ISD::Constant, llvm::dyn_cast(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), LHS, llvm_unreachable, RHS, llvm::ISD::SETEQ, llvm::ISD::SETGE, llvm::ISD::SETGT, llvm::ISD::SETLE, llvm::ISD::SETLT, llvm::ISD::SETNE, llvm::ISD::SETUGE, llvm::ISD::SETUGT, llvm::ISD::SETULE, llvm::ISD::SETULT, and std::swap().

Referenced by llvm::MSP430TargetLowering::LowerBR_CC(), llvm::MSP430TargetLowering::LowerSELECT_CC(), and llvm::MSP430TargetLowering::LowerSETCC().

ParseFunctionArgs()

MSP430NoLegalImmediate

cl::opt< bool > MSP430NoLegalImmediate("msp430-no-legal-immediate", cl::Hidden, cl::desc("Enable non legal immediates (for testing purposes only)"), cl::init(false)) ( "msp430-no-legal-immediate" , cl::Hidden , cl::desc("Enable non legal immediates (for testing purposes only)") , cl::init(false) ) static