aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h')
-rw-r--r--llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h53
1 files changed, 34 insertions, 19 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h b/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
index 4b73b36318b4..07c503d47e98 100644
--- a/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
+++ b/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
@@ -23,12 +23,14 @@ namespace llvm {
/// PowerPC target-specific information for each MachineFunction.
class PPCFunctionInfo : public MachineFunctionInfo {
public:
- // The value in the ParamType are used to indicate the bitstrings used in the
- // encoding format.
enum ParamType {
- FixedType = 0x0,
- ShortFloatPoint = 0x2,
- LongFloatPoint = 0x3
+ FixedType,
+ ShortFloatingPoint,
+ LongFloatingPoint,
+ VectorChar,
+ VectorShort,
+ VectorInt,
+ VectorFloat
};
private:
@@ -49,6 +51,9 @@ private:
/// Frame index where the old PIC base pointer is stored.
int PICBasePointerSaveIndex = 0;
+ /// Frame index where the ROP Protection Hash is stored.
+ int ROPProtectionHashSaveIndex = 0;
+
/// MustSaveLR - Indicates whether LR is defined (or clobbered) in the current
/// function. This is only valid after the initial scan of the function by
/// PEI.
@@ -117,19 +122,18 @@ private:
/// register for parameter passing.
unsigned VarArgsNumFPR = 0;
- /// FixedParamNum - Number of fixed parameter.
- unsigned FixedParamNum = 0;
+ /// FixedParmsNum - The number of fixed parameters.
+ unsigned FixedParmsNum = 0;
+
+ /// FloatingParmsNum - The number of floating parameters.
+ unsigned FloatingParmsNum = 0;
- /// FloatingParamNum - Number of floating point parameter.
- unsigned FloatingPointParamNum = 0;
+ /// VectorParmsNum - The number of vector parameters.
+ unsigned VectorParmsNum = 0;
- /// ParamType - Encode type for every parameter
- /// in the order of parameters passing in.
- /// Bitstring starts from the most significant (leftmost) bit.
- /// '0'b => fixed parameter.
- /// '10'b => floating point short parameter.
- /// '11'b => floating point long parameter.
- uint32_t ParameterType = 0;
+ /// ParamtersType - Store all the parameter's type that are saved on
+ /// registers.
+ SmallVector<ParamType, 32> ParamtersType;
/// CRSpillFrameIndex - FrameIndex for CR spill slot for 32-bit SVR4.
int CRSpillFrameIndex = 0;
@@ -161,6 +165,13 @@ public:
int getPICBasePointerSaveIndex() const { return PICBasePointerSaveIndex; }
void setPICBasePointerSaveIndex(int Idx) { PICBasePointerSaveIndex = Idx; }
+ int getROPProtectionHashSaveIndex() const {
+ return ROPProtectionHashSaveIndex;
+ }
+ void setROPProtectionHashSaveIndex(int Idx) {
+ ROPProtectionHashSaveIndex = Idx;
+ }
+
unsigned getMinReservedArea() const { return MinReservedArea; }
void setMinReservedArea(unsigned size) { MinReservedArea = size; }
@@ -214,11 +225,15 @@ public:
unsigned getVarArgsNumGPR() const { return VarArgsNumGPR; }
void setVarArgsNumGPR(unsigned Num) { VarArgsNumGPR = Num; }
- unsigned getFixedParamNum() const { return FixedParamNum; }
+ unsigned getFixedParmsNum() const { return FixedParmsNum; }
+ unsigned getFloatingPointParmsNum() const { return FloatingParmsNum; }
+ unsigned getVectorParmsNum() const { return VectorParmsNum; }
+ bool hasVectorParms() const { return VectorParmsNum != 0; }
+
+ uint32_t getParmsType() const;
- unsigned getFloatingPointParamNum() const { return FloatingPointParamNum; }
+ uint32_t getVecExtParmsType() const;
- uint32_t getParameterType() const { return ParameterType; }
void appendParameterType(ParamType Type);
unsigned getVarArgsNumFPR() const { return VarArgsNumFPR; }