Closed Quuxplusone closed 14 years ago
Attached testcase.ll
(5421 bytes, text/plain): .ll Version of the Program
Attached testcase.c
(2621 bytes, text/plain): .c Version of the Program that Aborts
Reduced testcase:
long long test(int A, int B, int C) {
unsigned X, Y;
__asm__ ("subf%I3c %1,%4,%3\nsubfze %0,%2"
: "=r" (X), "=&r" (Y)
: "r" (A), "rI" (B), "r" (C));
return ((long long)Y << 32) | X;
}
We compile this to:
_test:
# InlineAsm Start
subfc r3,r5,r4
subfze r4,r3
# InlineAsm End
stw r3, -4(r1)
blr
Note that the first instruction clobbers r3 before the second instruction uses
it.
-Chris
Fixed. Patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070430/048747.html
There are several other required patches to go along with this though.
Testcase here: CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll
-Chris
testcase.ll
(5421 bytes, text/plain)testcase.c
(2621 bytes, text/plain)I've attached the .ll file that aborts when run. It's something to do with the inline assembly thingy.
On the plus side, GMP compiled! :-)