• Home
  • Raw
  • Download

Lines Matching defs:TargetX8664Traits

43 struct TargetX8664Traits {  struct
52 static constexpr ::Ice::Assembler::AssemblerKind AsmKind =
55 static constexpr bool Is64Bit = true;
56 static constexpr bool HasPopa = false;
57 static constexpr bool HasPusha = false;
58 static constexpr bool UsesX87 = false;
59 static constexpr ::Ice::RegX8664::GPRRegister Last8BitGPR =
62 enum ScaleFactor { TIMES_1 = 0, TIMES_2 = 1, TIMES_4 = 2, TIMES_8 = 3 };
64 using GPRRegister = ::Ice::RegX8664::GPRRegister;
65 using ByteRegister = ::Ice::RegX8664::ByteRegister;
66 using XmmRegister = ::Ice::RegX8664::XmmRegister;
68 using Cond = ::Ice::CondX8664;
70 using RegisterSet = ::Ice::RegX8664;
71 static constexpr RegisterSet::AllRegisters StackPtr = RegX8664::Reg_rsp;
72 static constexpr RegisterSet::AllRegisters FramePtr = RegX8664::Reg_rbp;
73 static constexpr GPRRegister Encoded_Reg_Accumulator =
75 static constexpr GPRRegister Encoded_Reg_Counter = RegX8664::Encoded_Reg_ecx;
76 static constexpr FixupKind FK_PcRel = llvm::ELF::R_X86_64_PC32;
77 static constexpr FixupKind FK_Abs = llvm::ELF::R_X86_64_32S;
78 static constexpr FixupKind FK_Gotoff = llvm::ELF::R_X86_64_GOTOFF64;
79 static constexpr FixupKind FK_GotPC = llvm::ELF::R_X86_64_GOTPC32;
83 enum RexBits {
99 Operand &operator=(const Operand &) = default;
100 Operand &operator=(Operand &&) = default;
102 uint8_t mod() const { return (encoding_at(0) >> 6) & 3; } in mod()
104 uint8_t rexX() const { return (rex_ & RexX) != RexX ? RexNone : RexX; } in rexX()
105 uint8_t rexB() const { return (rex_ & RexB) != RexB ? RexNone : RexB; } in rexB()
107 GPRRegister rm() const { in rm()
112 ScaleFactor scale() const { in scale()
116 GPRRegister index() const { in index()
121 GPRRegister base() const { in base()
126 int8_t disp8() const { in disp8()
131 AssemblerFixup *fixup() const { return fixup_; } in fixup()
134 void SetModRM(int mod, GPRRegister rm) { in SetModRM()
141 void SetSIB(ScaleFactor scale, GPRRegister index, GPRRegister base) { in SetSIB()
150 void SetDisp8(int8_t disp) { in SetDisp8()
155 void SetDisp32(int32_t disp) { in SetDisp32()
162 void SetFixup(AssemblerFixup *fixup) { fixup_ = fixup; } in SetFixup()
186 friend class AssemblerX86Base<TargetX8664Traits>; argument
195 Address &operator=(const Address &) = default;
196 Address &operator=(Address &&) = default;
198 Address(GPRRegister Base, int32_t Disp, AssemblerFixup *Fixup) { in Address()
219 Address(GPRRegister Index, ScaleFactor Scale, int32_t Disp, in Address()
229 Address(GPRRegister Base, GPRRegister Index, ScaleFactor Scale, in Address()
250 static Address RipRelative(RelocOffsetT Offset, AssemblerFixup *Fixup) { in RipRelative()
266 static Address Absolute(RelocOffsetT Addr) { in Absolute()
276 static Address ofConstPool(Assembler *Asm, const Constant *Imm) { in ofConstPool()
292 enum InstructionSet {
300 static const char *TargetName;
301 static constexpr Type WordType = IceType_i64;
303 static const char *getRegName(RegNumT RegNum) { in getRegName()
316 static GPRRegister getEncodedGPR(RegNumT RegNum) { in getEncodedGPR()
330 static ByteRegister getEncodedByteReg(RegNumT RegNum) { in getEncodedByteReg()
344 static bool isXmm(RegNumT RegNum) { in isXmm()
356 static XmmRegister getEncodedXmm(RegNumT RegNum) { in getEncodedXmm()
370 static uint32_t getEncoding(RegNumT RegNum) { in getEncoding()
383 static inline RegNumT getBaseReg(RegNumT RegNum) { in getBaseReg()
397 static RegNumT getFirstGprForType(Type Ty) { in getFirstGprForType()
414 static RegNumT getGprForType(Type Ty, RegNumT RegNum) { in getGprForType()
471 SizeOf &operator=(const SizeOf &) = delete;
474 constexpr SizeOf() : Size(0) {} in SizeOf()
476 explicit constexpr SizeOf(T...) : Size(length<T...>::value) {} in SizeOf()
477 constexpr SizeT size() const { return Size; } in size()
480 template <typename T, typename... U> struct length {