[LLVMbugs] [Bug 4566] New: Invalid asmprinting for Thumb RSB instruction [ generic asmprinter construction problem?]
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu Jul 16 14:29:55 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4566
Summary: Invalid asmprinting for Thumb RSB instruction [generic
asmprinter construction problem?]
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Backend: ARM
AssignedTo: unassignedbugs at nondot.org
ReportedBy: asl at math.spbu.ru
CC: llvmbugs at cs.uiuc.edu
Consider the attached bitcode. Currently we're producing the following
instructions:
.Llabel18:
lsls r5, r2
rsbs r2, r5
orrs r4, r2
which is definitely wrong in Thumb1 mode. In fact, tRSB instruction has the
following assembler string: "rsb", " $dst, $src, #0", but the #0 operand is
never emitted. This seems to be due to some weirdness in asmprinter emission:
AMAsmPrinter::printInstruction() function contains 2 entries for tRSB:
case 45:
// tMOVi8, tMVN, tRSB
printPredicateOperand(MI, 3);
O << " ";
printOperand(MI, 0);
O << ", ";
printOperand(MI, 2);
EmitComments(*MI);
O << "\n";
return true;
break;
}
and
case 22:
// tRSB
O << ", #0";
EmitComments(*MI);
O << "\n";
return true;
break;
note that "return true' in the first case makes it impossible to reach the
second fragment.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list