diff options
author | Duraid Madina <duraid@octopus.com.au> | 2005-04-14 10:08:01 +0000 |
---|---|---|
committer | Duraid Madina <duraid@octopus.com.au> | 2005-04-14 10:08:01 +0000 |
commit | 1ce0c015ad0b40acf05bb7a006469a0169a44ff8 (patch) | |
tree | 5e44f47ae882efde5fe300e5b02c61d8ad58e1b9 | |
parent | 3eb7150c3eddde856b62c9c6fbe11569d01a6bb3 (diff) |
print negative 64 bit immediates as negative numbers, makes things a little
easier on the eyes, not that numbers like 18446744073709541376 are bad or
anything
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21300 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/IA64/IA64AsmPrinter.cpp | 6 | ||||
-rw-r--r-- | lib/Target/IA64/IA64InstrInfo.td | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/Target/IA64/IA64AsmPrinter.cpp b/lib/Target/IA64/IA64AsmPrinter.cpp index 2846a044a2..c1a9c40d51 100644 --- a/lib/Target/IA64/IA64AsmPrinter.cpp +++ b/lib/Target/IA64/IA64AsmPrinter.cpp @@ -247,7 +247,11 @@ namespace { MVT::ValueType VT) { O << (uint64_t)MI->getOperand(OpNo).getImmedValue(); } - + void printS64ImmOperand(const MachineInstr *MI, unsigned OpNo, + MVT::ValueType VT) { + O << (int64_t)MI->getOperand(OpNo).getImmedValue(); + } + void printCallOperand(const MachineInstr *MI, unsigned OpNo, MVT::ValueType VT) { printOp(MI->getOperand(OpNo), true); // this is a br.call instruction diff --git a/lib/Target/IA64/IA64InstrInfo.td b/lib/Target/IA64/IA64InstrInfo.td index 5cc3312083..92e68eb02c 100644 --- a/lib/Target/IA64/IA64InstrInfo.td +++ b/lib/Target/IA64/IA64InstrInfo.td @@ -28,6 +28,9 @@ def s22imm : Operand<i32> { def u64imm : Operand<i64> { let PrintMethod = "printU64ImmOperand"; } +def s64imm : Operand<i64> { + let PrintMethod = "printS64ImmOperand"; +} // the asmprinter needs to know about calls let PrintMethod = "printCallOperand" in @@ -89,7 +92,7 @@ def MOVSIMM14 : AForm<0x03, 0x0b, (ops GR:$dst, s14imm:$imm), "mov $dst = $imm;;">; def MOVSIMM22 : AForm<0x03, 0x0b, (ops GR:$dst, s22imm:$imm), "mov $dst = $imm;;">; -def MOVLIMM64 : AForm<0x03, 0x0b, (ops GR:$dst, u64imm:$imm), +def MOVLIMM64 : AForm<0x03, 0x0b, (ops GR:$dst, s64imm:$imm), "movl $dst = $imm;;">; def AND : AForm<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2), |