Lines Matching defs:CSKYOperand
83 struct CSKYOperand : public MCParsedAsmOperand { struct
84 enum KindTy {
88 } Kind;
90 struct RegOp {
94 struct ImmOp {
98 SMLoc StartLoc, EndLoc;
99 union {
105 CSKYOperand(KindTy K) : MCParsedAsmOperand(), Kind(K) {} in CSKYOperand() function
108 CSKYOperand(const CSKYOperand &o) : MCParsedAsmOperand() { in CSKYOperand() argument
125 bool isToken() const override { return Kind == Token; } in isToken()
126 bool isReg() const override { return Kind == Register; } in isReg()
127 bool isImm() const override { return Kind == Immediate; } in isImm()
128 bool isMem() const override { return false; } in isMem()
130 static bool evaluateConstantImm(const MCExpr *Expr, int64_t &Imm) { in evaluateConstantImm()
139 template <unsigned num, unsigned shift = 0> bool isUImm() const { in isUImm()
148 template <unsigned num> bool isOImm() const { in isOImm()
157 template <unsigned num, unsigned shift = 0> bool isSImm() const { in isSImm()
166 bool isUImm2() const { return isUImm<2>(); } in isUImm2()
167 bool isUImm5() const { return isUImm<5>(); } in isUImm5()
168 bool isUImm12() const { return isUImm<12>(); } in isUImm12()
169 bool isUImm16() const { return isUImm<16>(); } in isUImm16()
171 bool isOImm12() const { return isOImm<12>(); } in isOImm12()
172 bool isOImm16() const { return isOImm<16>(); } in isOImm16()
174 bool isUImm12Shift1() { return isUImm<12, 1>(); } in isUImm12Shift1()
175 bool isUImm12Shift2() { return isUImm<12, 2>(); } in isUImm12Shift2()
177 bool isSImm16Shift1() { return isSImm<16, 1>(); } in isSImm16Shift1()
179 bool isCSKYSymbol() const { in isCSKYSymbol()
185 bool isConstpoolSymbol() const { in isConstpoolSymbol()
192 SMLoc getStartLoc() const override { return StartLoc; } in getStartLoc()
194 SMLoc getEndLoc() const override { return EndLoc; } in getEndLoc()
196 unsigned getReg() const override { in getReg()
201 const MCExpr *getImm() const { in getImm()
206 StringRef getToken() const { in getToken()
211 void print(raw_ostream &OS) const override { in print()
225 static std::unique_ptr<CSKYOperand> createToken(StringRef Str, SMLoc S) { in createToken()
233 static std::unique_ptr<CSKYOperand> createReg(unsigned RegNo, SMLoc S, in createReg()
242 static std::unique_ptr<CSKYOperand> createImm(const MCExpr *Val, SMLoc S, in createImm()
251 void addExpr(MCInst &Inst, const MCExpr *Expr) const { in addExpr()
260 void addRegOperands(MCInst &Inst, unsigned N) const { in addRegOperands()
265 void addImmOperands(MCInst &Inst, unsigned N) const { in addImmOperands()