forked from OSchip/llvm-project
Add support for the mips inline asm 'm' output modifier.
Patch by Jack Carter. llvm-svn: 157709
This commit is contained in:
parent
0eda3e1de6
commit
f481ab3877
|
@ -377,6 +377,11 @@ bool MipsAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNum,
|
|||
return true;
|
||||
O << MO.getImm();
|
||||
return false;
|
||||
case 'm': // decimal const int minus 1
|
||||
if ((MO.getType()) != MachineOperand::MO_Immediate)
|
||||
return true;
|
||||
O << MO.getImm() - 1;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,5 +23,11 @@ entry:
|
|||
;CHECK: #NO_APP
|
||||
tail call i32 asm sideeffect "addi $0,$1,${2:d}", "=r,r,I"(i32 7, i32 -3) nounwind
|
||||
|
||||
; m with -3
|
||||
;CHECK: #APP
|
||||
;CHECK: addi ${{[0-9]+}},${{[0-9]+}},-4
|
||||
;CHECK: #NO_APP
|
||||
tail call i32 asm sideeffect "addi $0,$1,${2:m}", "=r,r,I"(i32 7, i32 -3) nounwind
|
||||
|
||||
ret i32 0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue