diff options
author | Dale Johannesen <dalej@apple.com> | 2009-08-18 00:18:39 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-08-18 00:18:39 +0000 |
commit | 4a50e68b65d6e4f0e7fceae1111e630726e2c12c (patch) | |
tree | e57ae07204c68d90a157dee710024a729fb4a35f /llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | |
parent | 5ed6e8f54ce256921afbfd0a7535d9992de80a78 (diff) | |
download | bcm5719-llvm-4a50e68b65d6e4f0e7fceae1111e630726e2c12c.tar.gz bcm5719-llvm-4a50e68b65d6e4f0e7fceae1111e630726e2c12c.zip |
PowerPC inline asm was emitting two output operands
for a single "m" constraint; this is wrong because the
opcode of a load or store would have to change in parallel.
This patch makes it always compute addresses into a register,
which is correct but not as efficient as possible. 7144566.
llvm-svn: 79292
Diffstat (limited to 'llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp index efb9e5c62cd..5dca6e6ad24 100644 --- a/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp @@ -507,15 +507,17 @@ bool PPCAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, return false; } +// At the moment, all inline asm memory operands are a single register. +// In any case, the output of this routine should always be just one +// assembler operand. + bool PPCAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode) { if (ExtraCode && ExtraCode[0]) return true; // Unknown modifier. - if (MI->getOperand(OpNo).isReg()) - printMemRegReg(MI, OpNo); - else - printMemRegImm(MI, OpNo); + assert (MI->getOperand(OpNo).isReg()); + printOperand(MI, OpNo); return false; } |