Lines Matching defs:TargetX8632Traits
42 struct TargetX8632Traits { struct
51 static constexpr ::Ice::Assembler::AssemblerKind AsmKind =
54 static constexpr bool Is64Bit = false;
55 static constexpr bool HasPopa = true;
56 static constexpr bool HasPusha = true;
57 static constexpr bool UsesX87 = true;
58 static constexpr ::Ice::RegX8632::GPRRegister Last8BitGPR =
61 enum ScaleFactor { TIMES_1 = 0, TIMES_2 = 1, TIMES_4 = 2, TIMES_8 = 3 };
63 using GPRRegister = ::Ice::RegX8632::GPRRegister;
64 using ByteRegister = ::Ice::RegX8632::ByteRegister;
65 using XmmRegister = ::Ice::RegX8632::XmmRegister;
66 using X87STRegister = ::Ice::RegX8632::X87STRegister;
68 using Cond = ::Ice::CondX86;
70 using RegisterSet = ::Ice::RegX8632;
71 static constexpr RegisterSet::AllRegisters StackPtr = RegX8632::Reg_esp;
72 static constexpr RegisterSet::AllRegisters FramePtr = RegX8632::Reg_ebp;
73 static constexpr GPRRegister Encoded_Reg_Accumulator =
75 static constexpr GPRRegister Encoded_Reg_Counter = RegX8632::Encoded_Reg_ecx;
76 static constexpr FixupKind FK_PcRel = llvm::ELF::R_386_PC32;
77 static constexpr FixupKind FK_Abs = llvm::ELF::R_386_32;
78 static constexpr FixupKind FK_Gotoff = llvm::ELF::R_386_GOTOFF;
79 static constexpr FixupKind FK_GotPC = llvm::ELF::R_386_GOTPC;
83 Operand(const Operand &other) in Operand()
95 uint8_t mod() const { return (encoding_at(0) >> 6) & 3; } in mod()
97 GPRRegister rm() const { in rm()
101 ScaleFactor scale() const { in scale()
105 GPRRegister index() const { in index()
109 GPRRegister base() const { in base()
113 int8_t disp8() const { in disp8()
118 int32_t disp32() const { in disp32()
126 AssemblerFixup *fixup() const { return fixup_; } in fixup()
129 Operand() : fixup_(nullptr), length_(0) {} // Needed by subclass Address. in Operand()
131 void SetModRM(int mod, GPRRegister rm) { in SetModRM()
137 void SetSIB(ScaleFactor scale, GPRRegister index, GPRRegister base) { in SetSIB()
144 void SetDisp8(int8_t disp) { in SetDisp8()
149 void SetDisp32(int32_t disp) { in SetDisp32()
179 friend class AssemblerX86Base<TargetX8632Traits>; argument
186 Address(const Address &other) : Operand(other) {} in Address()
193 Address(GPRRegister Base, int32_t Disp, AssemblerFixup *Fixup) { in Address()
213 Address(GPRRegister Index, ScaleFactor Scale, int32_t Disp, in Address()
223 Address(GPRRegister Base, GPRRegister Index, ScaleFactor Scale, in Address()
243 Address(RelocOffsetT Offset, AssemblerFixup *Fixup) { in Address()
252 static Address ofConstPool(Assembler *Asm, const Constant *Imm) { in ofConstPool()
267 enum InstructionSet {
275 static const char *TargetName;
276 static constexpr Type WordType = IceType_i32;
278 static const char *getRegName(RegNumT RegNum) { in getRegName()
291 static GPRRegister getEncodedGPR(RegNumT RegNum) { in getEncodedGPR()
305 static ByteRegister getEncodedByteReg(RegNumT RegNum) { in getEncodedByteReg()
319 static bool isXmm(RegNumT RegNum) { in isXmm()
331 static XmmRegister getEncodedXmm(RegNumT RegNum) { in getEncodedXmm()
345 static uint32_t getEncoding(RegNumT RegNum) { in getEncoding()
358 static RegNumT getBaseReg(RegNumT RegNum) { in getBaseReg()
372 static RegisterSet::AllRegisters getFirstGprForType(Type Ty) { in getFirstGprForType()
388 static RegNumT getGprForType(Type Ty, RegNumT RegNum) { in getGprForType()
443 SizeOf &operator=(const SizeOf &) = delete;
446 constexpr SizeOf() : Size(0) {} in SizeOf()
448 explicit constexpr SizeOf(T...) : Size(__length<T...>::value) {} in SizeOf()
449 constexpr SizeT size() const { return Size; } in size()
452 template <typename T, typename... U> struct __length {