[llvm-commits] [PATCH]: PowerPC64, wrong mixing of CTR and CTR8

Roman Divacky rdivacky at freebsd.org
Thu Jun 2 12:44:12 PDT 2011


Hi,

On PowerPC64 when lowering BRIND (indirect branch) for PPC64 the "mtctr"
instruction is pointed to a "wrong" bctr instruction. Ie. one that uses "CTR"
instead of "CTR8". This causes http://llvm.org/bugs/show_bug.cgi?id=8487 .

CTR8 is also omitted when seting HasCTRSet in hazard recognizer. And also
wrong CTR variant is used when emitting indirect call on PPC64.

The attached patch fixes all of that (+ test). We're now able to compile
stuff like "ls" or "sh" on FreeBSD/PowerPC. OK to commit?

roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: powerpc64.patch
Type: text/x-diff
Size: 4172 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110602/f2e5e994/attachment.patch>


More information about the llvm-commits mailing list