[LLVMbugs] [Bug 16692] New: Microblaze Backend Inline Assembler Fault
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jul 24 08:02:04 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16692
Bug ID: 16692
Summary: Microblaze Backend Inline Assembler Fault
Product: new-bugs
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: slugonamission at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The MBlaze asm printer does not work correctly when using input or output
constraints, causing llc to exit with the following error:
error: invalid operand in inline asm: 'add $0, r0, r0'
This is generated from lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp:400. It
appears to originate from "PrintAsmOperand()" in
lib/Target/MBlaze/MBlazeAsmPrinter.cpp.
Given the indentation of the switch statement within this function (and the
actual statements), it appears as it should belong to the outer-if statement
(if(ExtraCode && ExtraCode[0])), although there are no braces to support this.
Adding braces to add the switch statement to the outer if seems to fix the
problem, although I've not submitted this as a patch incase I've missed some
nuance of doing this.
A simple test case is as follows. Compile using "clang -S -emit-llvm -target
MBlaze test.c -o test.bc", then "llc -march=mblaze test.bc".
int main()
{
volatile int x = 5;
asm("add %0, r0, r0" : "=r"(x) : : "r5");
return 0;
}
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130724/775d3dc4/attachment.html>
More information about the llvm-bugs
mailing list