diff options
author | Roman Divacky <rdivacky@freebsd.org> | 2011-06-03 15:47:49 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@freebsd.org> | 2011-06-03 15:47:49 +0000 |
commit | a4a59aebd922c117e8f684f4ac31594343679504 (patch) | |
tree | 39e392bf5ed27d69b6d48d4843c65940d30c91ab /llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp | |
parent | 304902141e5f5ba71cb392fab2c0203c56643753 (diff) | |
download | bcm5719-llvm-a4a59aebd922c117e8f684f4ac31594343679504.tar.gz bcm5719-llvm-a4a59aebd922c117e8f684f4ac31594343679504.zip |
Fix wrong usages of CTR/MCTR where CTR8/MCTR8 was meant.
- Check for MTCTR8 in addition to MTCTR when looking up a hazard.
- When lowering an indirect call use CTR8 when targeting 64bit.
- Introduce BCTR8 that uses CTR8 and use it on 64bit when expanding ISD::BRIND.
The last change fixes PR8487. With those changes, we are able to compile a
running "ls" and "sh" on FreeBSD/PowerPC64.
llvm-svn: 132552
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp b/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp index 0de5844d1c2..74ecff5af62 100644 --- a/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp +++ b/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp @@ -233,7 +233,7 @@ void PPCHazardRecognizer970::EmitInstruction(SUnit *SU) { unsigned Opcode = Node->getMachineOpcode(); // Update structural hazard information. - if (Opcode == PPC::MTCTR) HasCTRSet = true; + if (Opcode == PPC::MTCTR || Opcode == PPC::MTCTR8) HasCTRSet = true; // Track the address stored to. if (isStore) { |