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
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
"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),