LLVM 24.0.0git
MSP430ISelLowering.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "msp430-lower"
#define GET_CALLING_CONV_IMPL

Functions

template<typename ArgT>
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<typename ArgT>
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<typename ArgT>
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)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "msp430-lower"

Definition at line 35 of file MSP430ISelLowering.cpp.

◆ GET_CALLING_CONV_IMPL

#define GET_CALLING_CONV_IMPL

Definition at line 227 of file MSP430ISelLowering.cpp.

Function Documentation

◆ AnalyzeArguments()

template<typename ArgT>
void AnalyzeArguments ( CCState & State,
SmallVectorImpl< CCValAssign > & ArgLocs,
const SmallVectorImpl< ArgT > & Args )
static

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 268 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]

void AnalyzeRetResult ( CCState & State,
const SmallVectorImpl< ISD::InputArg > & Ins )
static

Definition at line 365 of file MSP430ISelLowering.cpp.

Referenced by AnalyzeReturnValues().

◆ AnalyzeRetResult() [2/2]

void AnalyzeRetResult ( CCState & State,
const SmallVectorImpl< ISD::OutputArg > & Outs )
static

Definition at line 370 of file MSP430ISelLowering.cpp.

◆ AnalyzeReturnValues()

template<typename ArgT>
void AnalyzeReturnValues ( CCState & State,
SmallVectorImpl< CCValAssign > & RVLocs,
const SmallVectorImpl< ArgT > & Args )
static

Definition at line 376 of file MSP430ISelLowering.cpp.

References AnalyzeRetResult().

◆ AnalyzeVarArgs() [1/2]

void AnalyzeVarArgs ( CCState & State,
const SmallVectorImpl< ISD::InputArg > & Ins )
static

Definition at line 258 of file MSP430ISelLowering.cpp.

◆ AnalyzeVarArgs() [2/2]

void AnalyzeVarArgs ( CCState & State,
const SmallVectorImpl< ISD::OutputArg > & Outs )
static

Definition at line 253 of file MSP430ISelLowering.cpp.

Referenced by AnalyzeArguments().

◆ EmitCMP()

◆ ParseFunctionArgs()

template<typename ArgT>
void ParseFunctionArgs ( const SmallVectorImpl< ArgT > & Args,
SmallVectorImpl< unsigned > & Out )
static

For each argument in a function store the number of pieces it is composed of.

Definition at line 233 of file MSP430ISelLowering.cpp.

Referenced by AnalyzeArguments().