diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2013-06-10 17:19:15 +0000 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2013-06-10 17:19:15 +0000 |
commit | aa4a2d71aae1b94a84f5e5538af81bf5cd2bd057 (patch) | |
tree | 858c2ccf920cae05445f20c66eaf18eb8088d475 /llvm/lib | |
parent | 397406259e89443de785912f9356c73df031b178 (diff) | |
download | bcm5719-llvm-aa4a2d71aae1b94a84f5e5538af81bf5cd2bd057.tar.gz bcm5719-llvm-aa4a2d71aae1b94a84f5e5538af81bf5cd2bd057.zip |
[PowerPC] Support branch mnemonics with implied CR0
The extended branch mnemonics are supposed to use an implied CR0
if there is no explicit condition register specified. This patch
adds extra variants of the mnemonics to this effect.
Problem reported by Joerg Sonnenberger.
llvm-svn: 183686
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCInstrInfo.td | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td index c68e3bc5206..e5daafe072f 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td @@ -2168,12 +2168,23 @@ def SRDI : PPCAsmPseudo<"srdi $rA, $rS, $n", multiclass BranchExtendedMnemonic<string name, int bibo> { def : InstAlias<"b"#name#" $cc, $dst", (BCC bibo, crrc:$cc, condbrtarget:$dst)>; + def : InstAlias<"b"#name#" $dst", + (BCC bibo, CR0, condbrtarget:$dst)>; + def : InstAlias<"b"#name#"lr $cc", (BCLR bibo, crrc:$cc)>; + def : InstAlias<"b"#name#"lr", + (BCLR bibo, CR0)>; + def : InstAlias<"b"#name#"ctr $cc", (BCCTR bibo, crrc:$cc)>; + def : InstAlias<"b"#name#"ctr", + (BCCTR bibo, CR0)>; + def : InstAlias<"b"#name#"ctrl $cc", (BCCTRL bibo, crrc:$cc)>; + def : InstAlias<"b"#name#"ctrl", + (BCCTRL bibo, CR0)>; } defm : BranchExtendedMnemonic<"lt", 12>; defm : BranchExtendedMnemonic<"gt", 44>; |