print negative 64 bit immediates as negative numbers, makes things a little
authorDuraid Madina <duraid@octopus.com.au>
Thu, 14 Apr 2005 10:08:01 +0000 (10:08 +0000)
committerDuraid Madina <duraid@octopus.com.au>
Thu, 14 Apr 2005 10:08:01 +0000 (10:08 +0000)
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

lib/Target/IA64/IA64AsmPrinter.cpp
lib/Target/IA64/IA64InstrInfo.td

index 2846a044a2848b0d72e44abe2f285e16b3f71f80..c1a9c40d51727fbe8a9af56c7feec8ed9d51dc42 100644 (file)
@@ -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 
index 5cc3312083839680f96ac2f3ed2d63b38caae9e5..92e68eb02c42842e9017691da25ecb051fd27f26 100644 (file)
@@ -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),