forked from OSchip/llvm-project
Silence anonymous type in anonymous union warnings.
llvm-svn: 177135
This commit is contained in:
parent
ad1bbb93d1
commit
8996c5d469
|
@ -24,11 +24,15 @@ typedef void* PointerTy;
|
|||
class APInt;
|
||||
|
||||
struct GenericValue {
|
||||
struct IntPair {
|
||||
unsigned int first;
|
||||
unsigned int second;
|
||||
};
|
||||
union {
|
||||
double DoubleVal;
|
||||
float FloatVal;
|
||||
PointerTy PointerVal;
|
||||
struct { unsigned int first; unsigned int second; } UIntPairVal;
|
||||
struct IntPair UIntPairVal;
|
||||
unsigned char Untyped[8];
|
||||
};
|
||||
APInt IntVal; // also used for long doubles
|
||||
|
|
|
@ -160,44 +160,53 @@ private:
|
|||
|
||||
SMLoc StartLoc, EndLoc;
|
||||
|
||||
struct ImmWithLSLOp {
|
||||
const MCExpr *Val;
|
||||
unsigned ShiftAmount;
|
||||
bool ImplicitAmount;
|
||||
};
|
||||
|
||||
struct CondCodeOp {
|
||||
A64CC::CondCodes Code;
|
||||
};
|
||||
|
||||
struct FPImmOp {
|
||||
double Val;
|
||||
};
|
||||
|
||||
struct ImmOp {
|
||||
const MCExpr *Val;
|
||||
};
|
||||
|
||||
struct RegOp {
|
||||
unsigned RegNum;
|
||||
};
|
||||
|
||||
struct ShiftExtendOp {
|
||||
A64SE::ShiftExtSpecifiers ShiftType;
|
||||
unsigned Amount;
|
||||
bool ImplicitAmount;
|
||||
};
|
||||
|
||||
struct SysRegOp {
|
||||
const char *Data;
|
||||
unsigned Length;
|
||||
};
|
||||
|
||||
struct TokOp {
|
||||
const char *Data;
|
||||
unsigned Length;
|
||||
};
|
||||
|
||||
union {
|
||||
struct {
|
||||
const MCExpr *Val;
|
||||
unsigned ShiftAmount;
|
||||
bool ImplicitAmount;
|
||||
} ImmWithLSL;
|
||||
|
||||
struct {
|
||||
A64CC::CondCodes Code;
|
||||
} CondCode;
|
||||
|
||||
struct {
|
||||
double Val;
|
||||
} FPImm;
|
||||
|
||||
struct {
|
||||
const MCExpr *Val;
|
||||
} Imm;
|
||||
|
||||
struct {
|
||||
unsigned RegNum;
|
||||
} Reg;
|
||||
|
||||
struct {
|
||||
A64SE::ShiftExtSpecifiers ShiftType;
|
||||
unsigned Amount;
|
||||
bool ImplicitAmount;
|
||||
} ShiftExtend;
|
||||
|
||||
struct {
|
||||
const char *Data;
|
||||
unsigned Length;
|
||||
} SysReg;
|
||||
|
||||
struct {
|
||||
const char *Data;
|
||||
unsigned Length;
|
||||
} Tok;
|
||||
struct ImmWithLSLOp ImmWithLSL;
|
||||
struct CondCodeOp CondCode;
|
||||
struct FPImmOp FPImm;
|
||||
struct ImmOp Imm;
|
||||
struct RegOp Reg;
|
||||
struct ShiftExtendOp ShiftExtend;
|
||||
struct SysRegOp SysReg;
|
||||
struct TokOp Tok;
|
||||
};
|
||||
|
||||
AArch64Operand(KindTy K, SMLoc S, SMLoc E)
|
||||
|
|
|
@ -316,103 +316,127 @@ class ARMOperand : public MCParsedAsmOperand {
|
|||
SMLoc StartLoc, EndLoc;
|
||||
SmallVector<unsigned, 8> Registers;
|
||||
|
||||
struct CCOp {
|
||||
ARMCC::CondCodes Val;
|
||||
};
|
||||
|
||||
struct CopOp {
|
||||
unsigned Val;
|
||||
};
|
||||
|
||||
struct CoprocOptionOp {
|
||||
unsigned Val;
|
||||
};
|
||||
|
||||
struct ITMaskOp {
|
||||
unsigned Mask:4;
|
||||
};
|
||||
|
||||
struct MBOptOp {
|
||||
ARM_MB::MemBOpt Val;
|
||||
};
|
||||
|
||||
struct IFlagsOp {
|
||||
ARM_PROC::IFlags Val;
|
||||
};
|
||||
|
||||
struct MMaskOp {
|
||||
unsigned Val;
|
||||
};
|
||||
|
||||
struct TokOp {
|
||||
const char *Data;
|
||||
unsigned Length;
|
||||
};
|
||||
|
||||
struct RegOp {
|
||||
unsigned RegNum;
|
||||
};
|
||||
|
||||
// A vector register list is a sequential list of 1 to 4 registers.
|
||||
struct VectorListOp {
|
||||
unsigned RegNum;
|
||||
unsigned Count;
|
||||
unsigned LaneIndex;
|
||||
bool isDoubleSpaced;
|
||||
};
|
||||
|
||||
struct VectorIndexOp {
|
||||
unsigned Val;
|
||||
};
|
||||
|
||||
struct ImmOp {
|
||||
const MCExpr *Val;
|
||||
};
|
||||
|
||||
/// Combined record for all forms of ARM address expressions.
|
||||
struct MemoryOp {
|
||||
unsigned BaseRegNum;
|
||||
// Offset is in OffsetReg or OffsetImm. If both are zero, no offset
|
||||
// was specified.
|
||||
const MCConstantExpr *OffsetImm; // Offset immediate value
|
||||
unsigned OffsetRegNum; // Offset register num, when OffsetImm == NULL
|
||||
ARM_AM::ShiftOpc ShiftType; // Shift type for OffsetReg
|
||||
unsigned ShiftImm; // shift for OffsetReg.
|
||||
unsigned Alignment; // 0 = no alignment specified
|
||||
// n = alignment in bytes (2, 4, 8, 16, or 32)
|
||||
unsigned isNegative : 1; // Negated OffsetReg? (~'U' bit)
|
||||
};
|
||||
|
||||
struct PostIdxRegOp {
|
||||
unsigned RegNum;
|
||||
bool isAdd;
|
||||
ARM_AM::ShiftOpc ShiftTy;
|
||||
unsigned ShiftImm;
|
||||
};
|
||||
|
||||
struct ShifterImmOp {
|
||||
bool isASR;
|
||||
unsigned Imm;
|
||||
};
|
||||
|
||||
struct RegShiftedRegOp {
|
||||
ARM_AM::ShiftOpc ShiftTy;
|
||||
unsigned SrcReg;
|
||||
unsigned ShiftReg;
|
||||
unsigned ShiftImm;
|
||||
};
|
||||
|
||||
struct RegShiftedImmOp {
|
||||
ARM_AM::ShiftOpc ShiftTy;
|
||||
unsigned SrcReg;
|
||||
unsigned ShiftImm;
|
||||
};
|
||||
|
||||
struct RotImmOp {
|
||||
unsigned Imm;
|
||||
};
|
||||
|
||||
struct BitfieldOp {
|
||||
unsigned LSB;
|
||||
unsigned Width;
|
||||
};
|
||||
|
||||
union {
|
||||
struct {
|
||||
ARMCC::CondCodes Val;
|
||||
} CC;
|
||||
|
||||
struct {
|
||||
unsigned Val;
|
||||
} Cop;
|
||||
|
||||
struct {
|
||||
unsigned Val;
|
||||
} CoprocOption;
|
||||
|
||||
struct {
|
||||
unsigned Mask:4;
|
||||
} ITMask;
|
||||
|
||||
struct {
|
||||
ARM_MB::MemBOpt Val;
|
||||
} MBOpt;
|
||||
|
||||
struct {
|
||||
ARM_PROC::IFlags Val;
|
||||
} IFlags;
|
||||
|
||||
struct {
|
||||
unsigned Val;
|
||||
} MMask;
|
||||
|
||||
struct {
|
||||
const char *Data;
|
||||
unsigned Length;
|
||||
} Tok;
|
||||
|
||||
struct {
|
||||
unsigned RegNum;
|
||||
} Reg;
|
||||
|
||||
// A vector register list is a sequential list of 1 to 4 registers.
|
||||
struct {
|
||||
unsigned RegNum;
|
||||
unsigned Count;
|
||||
unsigned LaneIndex;
|
||||
bool isDoubleSpaced;
|
||||
} VectorList;
|
||||
|
||||
struct {
|
||||
unsigned Val;
|
||||
} VectorIndex;
|
||||
|
||||
struct {
|
||||
const MCExpr *Val;
|
||||
} Imm;
|
||||
|
||||
/// Combined record for all forms of ARM address expressions.
|
||||
struct {
|
||||
unsigned BaseRegNum;
|
||||
// Offset is in OffsetReg or OffsetImm. If both are zero, no offset
|
||||
// was specified.
|
||||
const MCConstantExpr *OffsetImm; // Offset immediate value
|
||||
unsigned OffsetRegNum; // Offset register num, when OffsetImm == NULL
|
||||
ARM_AM::ShiftOpc ShiftType; // Shift type for OffsetReg
|
||||
unsigned ShiftImm; // shift for OffsetReg.
|
||||
unsigned Alignment; // 0 = no alignment specified
|
||||
// n = alignment in bytes (2, 4, 8, 16, or 32)
|
||||
unsigned isNegative : 1; // Negated OffsetReg? (~'U' bit)
|
||||
} Memory;
|
||||
|
||||
struct {
|
||||
unsigned RegNum;
|
||||
bool isAdd;
|
||||
ARM_AM::ShiftOpc ShiftTy;
|
||||
unsigned ShiftImm;
|
||||
} PostIdxReg;
|
||||
|
||||
struct {
|
||||
bool isASR;
|
||||
unsigned Imm;
|
||||
} ShifterImm;
|
||||
struct {
|
||||
ARM_AM::ShiftOpc ShiftTy;
|
||||
unsigned SrcReg;
|
||||
unsigned ShiftReg;
|
||||
unsigned ShiftImm;
|
||||
} RegShiftedReg;
|
||||
struct {
|
||||
ARM_AM::ShiftOpc ShiftTy;
|
||||
unsigned SrcReg;
|
||||
unsigned ShiftImm;
|
||||
} RegShiftedImm;
|
||||
struct {
|
||||
unsigned Imm;
|
||||
} RotImm;
|
||||
struct {
|
||||
unsigned LSB;
|
||||
unsigned Width;
|
||||
} Bitfield;
|
||||
struct CCOp CC;
|
||||
struct CopOp Cop;
|
||||
struct CoprocOptionOp CoprocOption;
|
||||
struct MBOptOp MBOpt;
|
||||
struct ITMaskOp ITMask;
|
||||
struct IFlagsOp IFlags;
|
||||
struct MMaskOp MMask;
|
||||
struct TokOp Tok;
|
||||
struct RegOp Reg;
|
||||
struct VectorListOp VectorList;
|
||||
struct VectorIndexOp VectorIndex;
|
||||
struct ImmOp Imm;
|
||||
struct MemoryOp Memory;
|
||||
struct PostIdxRegOp PostIdxReg;
|
||||
struct ShifterImmOp ShifterImm;
|
||||
struct RegShiftedRegOp RegShiftedReg;
|
||||
struct RegShiftedImmOp RegShiftedImm;
|
||||
struct RotImmOp RotImm;
|
||||
struct BitfieldOp Bitfield;
|
||||
};
|
||||
|
||||
ARMOperand(KindTy K) : MCParsedAsmOperand(), Kind(K) {}
|
||||
|
|
|
@ -82,29 +82,35 @@ struct MBlazeOperand : public MCParsedAsmOperand {
|
|||
|
||||
SMLoc StartLoc, EndLoc;
|
||||
|
||||
struct TokOp {
|
||||
const char *Data;
|
||||
unsigned Length;
|
||||
};
|
||||
|
||||
struct RegOp {
|
||||
unsigned RegNum;
|
||||
};
|
||||
|
||||
struct ImmOp {
|
||||
const MCExpr *Val;
|
||||
};
|
||||
|
||||
struct MemOp {
|
||||
unsigned Base;
|
||||
unsigned OffReg;
|
||||
const MCExpr *Off;
|
||||
};
|
||||
|
||||
struct FslImmOp {
|
||||
const MCExpr *Val;
|
||||
};
|
||||
|
||||
union {
|
||||
struct {
|
||||
const char *Data;
|
||||
unsigned Length;
|
||||
} Tok;
|
||||
|
||||
struct {
|
||||
unsigned RegNum;
|
||||
} Reg;
|
||||
|
||||
struct {
|
||||
const MCExpr *Val;
|
||||
} Imm;
|
||||
|
||||
struct {
|
||||
unsigned Base;
|
||||
unsigned OffReg;
|
||||
const MCExpr *Off;
|
||||
} Mem;
|
||||
|
||||
struct {
|
||||
const MCExpr *Val;
|
||||
} FslImm;
|
||||
struct TokOp Tok;
|
||||
struct RegOp Reg;
|
||||
struct ImmOp Imm;
|
||||
struct MemOp Mem;
|
||||
struct FslImmOp FslImm;
|
||||
};
|
||||
|
||||
MBlazeOperand(KindTy K) : MCParsedAsmOperand(), Kind(K) {}
|
||||
|
|
|
@ -211,25 +211,30 @@ private:
|
|||
|
||||
MipsOperand(KindTy K) : MCParsedAsmOperand(), Kind(K) {}
|
||||
|
||||
struct Token {
|
||||
const char *Data;
|
||||
unsigned Length;
|
||||
};
|
||||
|
||||
struct RegOp {
|
||||
unsigned RegNum;
|
||||
RegisterKind Kind;
|
||||
};
|
||||
|
||||
struct ImmOp {
|
||||
const MCExpr *Val;
|
||||
};
|
||||
|
||||
struct MemOp {
|
||||
unsigned Base;
|
||||
const MCExpr *Off;
|
||||
};
|
||||
|
||||
union {
|
||||
struct {
|
||||
const char *Data;
|
||||
unsigned Length;
|
||||
} Tok;
|
||||
|
||||
struct {
|
||||
unsigned RegNum;
|
||||
RegisterKind Kind;
|
||||
} Reg;
|
||||
|
||||
struct {
|
||||
const MCExpr *Val;
|
||||
} Imm;
|
||||
|
||||
struct {
|
||||
unsigned Base;
|
||||
const MCExpr *Off;
|
||||
} Mem;
|
||||
struct Token Tok;
|
||||
struct RegOp Reg;
|
||||
struct ImmOp Imm;
|
||||
struct MemOp Mem;
|
||||
};
|
||||
|
||||
SMLoc StartLoc, EndLoc;
|
||||
|
|
|
@ -170,30 +170,35 @@ struct X86Operand : public MCParsedAsmOperand {
|
|||
SMLoc OffsetOfLoc;
|
||||
bool AddressOf;
|
||||
|
||||
struct TokOp {
|
||||
const char *Data;
|
||||
unsigned Length;
|
||||
};
|
||||
|
||||
struct RegOp {
|
||||
unsigned RegNo;
|
||||
};
|
||||
|
||||
struct ImmOp {
|
||||
const MCExpr *Val;
|
||||
bool NeedAsmRewrite;
|
||||
};
|
||||
|
||||
struct MemOp {
|
||||
unsigned SegReg;
|
||||
const MCExpr *Disp;
|
||||
unsigned BaseReg;
|
||||
unsigned IndexReg;
|
||||
unsigned Scale;
|
||||
unsigned Size;
|
||||
bool NeedSizeDir;
|
||||
};
|
||||
|
||||
union {
|
||||
struct {
|
||||
const char *Data;
|
||||
unsigned Length;
|
||||
} Tok;
|
||||
|
||||
struct {
|
||||
unsigned RegNo;
|
||||
} Reg;
|
||||
|
||||
struct {
|
||||
const MCExpr *Val;
|
||||
bool NeedAsmRewrite;
|
||||
} Imm;
|
||||
|
||||
struct {
|
||||
unsigned SegReg;
|
||||
const MCExpr *Disp;
|
||||
unsigned BaseReg;
|
||||
unsigned IndexReg;
|
||||
unsigned Scale;
|
||||
unsigned Size;
|
||||
bool NeedSizeDir;
|
||||
} Mem;
|
||||
struct TokOp Tok;
|
||||
struct RegOp Reg;
|
||||
struct ImmOp Imm;
|
||||
struct MemOp Mem;
|
||||
};
|
||||
|
||||
X86Operand(KindTy K, SMLoc Start, SMLoc End)
|
||||
|
|
Loading…
Reference in New Issue