Lines Matching defs:LanaiOperand
88 struct LanaiOperand : public MCParsedAsmOperand { struct
89 enum KindTy {
96 } Kind;
98 SMLoc StartLoc, EndLoc;
100 struct Token {
105 struct RegOp {
109 struct ImmOp {
113 struct MemOp {
120 union {
127 explicit LanaiOperand(KindTy Kind) : MCParsedAsmOperand(), Kind(Kind) {} in LanaiOperand() argument
134 SMLoc getStartLoc() const override { return StartLoc; } in getStartLoc()
137 SMLoc getEndLoc() const override { return EndLoc; } in getEndLoc()
139 unsigned getReg() const override { in getReg()
144 const MCExpr *getImm() const { in getImm()
149 StringRef getToken() const { in getToken()
154 unsigned getMemBaseReg() const { in getMemBaseReg()
159 unsigned getMemOffsetReg() const { in getMemOffsetReg()
164 const MCExpr *getMemOffset() const { in getMemOffset()
169 unsigned getMemOp() const { in getMemOp()
175 bool isReg() const override { return Kind == REGISTER; } in isReg()
177 bool isImm() const override { return Kind == IMMEDIATE; } in isImm()
179 bool isMem() const override { in isMem()
183 bool isMemImm() const { return Kind == MEMORY_IMM; } in isMemImm()
185 bool isMemRegImm() const { return Kind == MEMORY_REG_IMM; } in isMemRegImm()
187 bool isMemRegReg() const { return Kind == MEMORY_REG_REG; } in isMemRegReg()
189 bool isMemSpls() const { return isMemRegImm() || isMemRegReg(); } in isMemSpls()
191 bool isToken() const override { return Kind == TOKEN; } in isToken()
193 bool isBrImm() { in isBrImm()
206 bool isBrTarget() { return isBrImm() || isToken(); } in isBrTarget()
208 bool isCallTarget() { return isImm() || isToken(); } in isCallTarget()
210 bool isHiImm16() { in isHiImm16()
233 bool isHiImm16And() { in isHiImm16And()
246 bool isLoImm16() { in isLoImm16()
270 bool isLoImm16Signed() { in isLoImm16Signed()
294 bool isLoImm16And() { in isLoImm16And()
307 bool isImmShift() { in isImmShift()
318 bool isLoImm21() { in isLoImm21()
349 bool isImm10() { in isImm10()
360 bool isCondCode() { in isCondCode()
374 void addExpr(MCInst &Inst, const MCExpr *Expr) const { in addExpr()
385 void addRegOperands(MCInst &Inst, unsigned N) const { in addRegOperands()
390 void addImmOperands(MCInst &Inst, unsigned N) const { in addImmOperands()
395 void addBrTargetOperands(MCInst &Inst, unsigned N) const { in addBrTargetOperands()
400 void addCallTargetOperands(MCInst &Inst, unsigned N) const { in addCallTargetOperands()
405 void addCondCodeOperands(MCInst &Inst, unsigned N) const { in addCondCodeOperands()
410 void addMemImmOperands(MCInst &Inst, unsigned N) const { in addMemImmOperands()
416 void addMemRegImmOperands(MCInst &Inst, unsigned N) const { in addMemRegImmOperands()
424 void addMemRegRegOperands(MCInst &Inst, unsigned N) const { in addMemRegRegOperands()
432 void addMemSplsOperands(MCInst &Inst, unsigned N) const { in addMemSplsOperands()
439 void addImmShiftOperands(MCInst &Inst, unsigned N) const { in addImmShiftOperands()
444 void addImm10Operands(MCInst &Inst, unsigned N) const { in addImm10Operands()
449 void addLoImm16Operands(MCInst &Inst, unsigned N) const { in addLoImm16Operands()
472 void addLoImm16AndOperands(MCInst &Inst, unsigned N) const { in addLoImm16AndOperands()
480 void addHiImm16Operands(MCInst &Inst, unsigned N) const { in addHiImm16Operands()
502 void addHiImm16AndOperands(MCInst &Inst, unsigned N) const { in addHiImm16AndOperands()
510 void addLoImm21Operands(MCInst &Inst, unsigned N) const { in addLoImm21Operands()
542 void print(raw_ostream &OS) const override { in print()
567 static std::unique_ptr<LanaiOperand> CreateToken(StringRef Str, SMLoc Start) { in CreateToken()
576 static std::unique_ptr<LanaiOperand> createReg(unsigned RegNum, SMLoc Start, in createReg()
585 static std::unique_ptr<LanaiOperand> createImm(const MCExpr *Value, in createImm()
595 MorphToMemImm(std::unique_ptr<LanaiOperand> Op) { in MorphToMemImm()
606 MorphToMemRegReg(unsigned BaseReg, std::unique_ptr<LanaiOperand> Op, in MorphToMemRegReg()
618 MorphToMemRegImm(unsigned BaseReg, std::unique_ptr<LanaiOperand> Op, in MorphToMemRegImm()