forked from OSchip/llvm-project
[AVRInstPrinter] printOperand: support llvm-objdump --print-imm-hex
Differential Revision: https://reviews.llvm.org/D83634
This commit is contained in:
parent
032810f589
commit
be9f363704
|
@ -131,7 +131,7 @@ void AVRInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
|
|||
O << getPrettyRegisterName(Op.getReg(), MRI);
|
||||
}
|
||||
} else if (Op.isImm()) {
|
||||
O << Op.getImm();
|
||||
O << formatImm(Op.getImm());
|
||||
} else {
|
||||
assert(Op.isExpr() && "Unknown operand kind in printOperand");
|
||||
O << *Op.getExpr();
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
; RUN: llvm-mc -filetype=obj -triple=avr %s -o %t
|
||||
; RUN: llvm-objdump -d %t | FileCheck %s --check-prefix=DEC
|
||||
; RUN: llvm-objdump -d --print-imm-hex %t | FileCheck %s --check-prefix=HEX
|
||||
|
||||
; DEC: ldi r24, 66
|
||||
; HEX: ldi r24, 0x42
|
||||
ldi r24, 0x42
|
Loading…
Reference in New Issue