mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-09 05:31:37 +00:00
ARM use a dedicated printer for postidx_reg operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136968 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9a45008e91
commit
ca8c70b953
@ -645,7 +645,7 @@ def PostIdxRegAsmOperand : AsmOperandClass {
|
||||
}
|
||||
def postidx_reg : Operand<i32> {
|
||||
let EncoderMethod = "getPostIdxRegOpValue";
|
||||
let PrintMethod = "printAddrMode3OffsetOperand";
|
||||
let PrintMethod = "printPostIdxRegOperand";
|
||||
let ParserMatchClass = PostIdxRegAsmOperand;
|
||||
let MIOperandInfo = (ops GPR, i32imm);
|
||||
}
|
||||
|
@ -382,6 +382,15 @@ void ARMInstPrinter::printPostIdxImm8Operand(const MCInst *MI,
|
||||
O << '#' << ((Imm & 256) ? "" : "-") << (Imm & 0xff);
|
||||
}
|
||||
|
||||
void ARMInstPrinter::printPostIdxRegOperand(const MCInst *MI, unsigned OpNum,
|
||||
raw_ostream &O) {
|
||||
const MCOperand &MO1 = MI->getOperand(OpNum);
|
||||
const MCOperand &MO2 = MI->getOperand(OpNum+1);
|
||||
|
||||
O << getAddrOpcStr(ARM_AM::getAM3Op(MO2.getImm()))
|
||||
<< getRegisterName(MO1.getReg());
|
||||
}
|
||||
|
||||
void ARMInstPrinter::printPostIdxImm8s4Operand(const MCInst *MI,
|
||||
unsigned OpNum,
|
||||
raw_ostream &O) {
|
||||
|
@ -55,6 +55,7 @@ public:
|
||||
void printAM3PreOrOffsetIndexOp(const MCInst *MI, unsigned Op,raw_ostream &O);
|
||||
void printPostIdxImm8Operand(const MCInst *MI, unsigned OpNum,
|
||||
raw_ostream &O);
|
||||
void printPostIdxRegOperand(const MCInst *MI, unsigned OpNum, raw_ostream &O);
|
||||
void printPostIdxImm8s4Operand(const MCInst *MI, unsigned OpNum,
|
||||
raw_ostream &O);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user