mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-08 21:47:23 +00:00
Handle 'a' modifier on inline assembly operands.
This is part of the fix for pr4521. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75201 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
333c400965
commit
9b4b00ad43
@ -907,8 +907,13 @@ bool ARMAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNum,
|
|||||||
|
|
||||||
switch (ExtraCode[0]) {
|
switch (ExtraCode[0]) {
|
||||||
default: return true; // Unknown modifier.
|
default: return true; // Unknown modifier.
|
||||||
case 'a': // Don't print "#" before a global var name or constant.
|
case 'a': // Print as a memory address.
|
||||||
case 'c': // Don't print "$" before a global var name or constant.
|
if (MI->getOperand(OpNum).isReg()) {
|
||||||
|
O << "[" << TRI->getAsmName(MI->getOperand(OpNum).getReg()) << "]";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// Fallthrough
|
||||||
|
case 'c': // Don't print "#" before an immediate operand.
|
||||||
printOperand(MI, OpNum, "no_hash");
|
printOperand(MI, OpNum, "no_hash");
|
||||||
return false;
|
return false;
|
||||||
case 'P': // Print a VFP double precision register.
|
case 'P': // Print a VFP double precision register.
|
||||||
|
7
test/CodeGen/ARM/2009-07-09-asm-p-constraint.ll
Normal file
7
test/CodeGen/ARM/2009-07-09-asm-p-constraint.ll
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
; RUN: llvm-as < %s | llc -march=arm -mattr=+v6
|
||||||
|
|
||||||
|
define void @test(i8* %x) nounwind {
|
||||||
|
entry:
|
||||||
|
call void asm sideeffect "pld\09${0:a}", "r,~{cc}"(i8* %x) nounwind
|
||||||
|
ret void
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user