diff options
| author | Joerg Sonnenberger <joerg@bec.de> | 2014-08-05 14:18:16 +0000 |
|---|---|---|
| committer | Joerg Sonnenberger <joerg@bec.de> | 2014-08-05 14:18:16 +0000 |
| commit | 048284e1b65bd3862698fef860ceb3ca7b3b24b3 (patch) | |
| tree | b65892bc70b8124fb1f560b025047f718e34ada0 | |
| parent | 9dedceb71d96256f906669e2c616034e23362dbe (diff) | |
| download | bcm5719-llvm-048284e1b65bd3862698fef860ceb3ca7b3b24b3.tar.gz bcm5719-llvm-048284e1b65bd3862698fef860ceb3ca7b3b24b3.zip | |
Add mftblo and mftbhi for PPC 4xx.
llvm-svn: 214863
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCInstrInfo.td | 5 | ||||
| -rw-r--r-- | llvm/test/MC/PowerPC/ppc64-encoding-4xx.s | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td index dda017981b0..764f46ebc47 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td @@ -3240,6 +3240,11 @@ def : InstAlias<"mftb $Rx", (MFTB gprc:$Rx, 268)>; def : InstAlias<"mftbl $Rx", (MFTB gprc:$Rx, 268)>; def : InstAlias<"mftbu $Rx", (MFTB gprc:$Rx, 269)>; +def : InstAlias<"mftblo $Rx", (MFSPR gprc:$Rx, 989)>, Requires<[IsPPC4xx]>; +def : InstAlias<"mttblo $Rx", (MTSPR 989, gprc:$Rx)>, Requires<[IsPPC4xx]>; +def : InstAlias<"mftbhi $Rx", (MFSPR gprc:$Rx, 988)>, Requires<[IsPPC4xx]>; +def : InstAlias<"mttbhi $Rx", (MTSPR 988, gprc:$Rx)>, Requires<[IsPPC4xx]>; + def : InstAlias<"xnop", (XORI R0, R0, 0)>; def : InstAlias<"mr $rA, $rB", (OR8 g8rc:$rA, g8rc:$rB, g8rc:$rB)>; diff --git a/llvm/test/MC/PowerPC/ppc64-encoding-4xx.s b/llvm/test/MC/PowerPC/ppc64-encoding-4xx.s index 5fca73e5971..c30d277061e 100644 --- a/llvm/test/MC/PowerPC/ppc64-encoding-4xx.s +++ b/llvm/test/MC/PowerPC/ppc64-encoding-4xx.s @@ -77,3 +77,16 @@ # CHECK-BE: mtspr 986, 2 # encoding: [0x7c,0x5a,0xf3,0xa6] # CHECK-LE: mtspr 986, 2 # encoding: [0xa6,0xf3,0x5a,0x7c] mttcr %r2 + +# CHECK-BE: mfspr 2, 989 # encoding: [0x7c,0x5d,0xf2,0xa6] +# CHECK-LE: mfspr 2, 989 # encoding: [0xa6,0xf2,0x5d,0x7c] + mftblo %r2 +# CHECK-BE: mtspr 989, 2 # encoding: [0x7c,0x5d,0xf3,0xa6] +# CHECK-LE: mtspr 989, 2 # encoding: [0xa6,0xf3,0x5d,0x7c] + mttblo %r2 +# CHECK-BE: mfspr 2, 988 # encoding: [0x7c,0x5c,0xf2,0xa6] +# CHECK-LE: mfspr 2, 988 # encoding: [0xa6,0xf2,0x5c,0x7c] + mftbhi %r2 +# CHECK-BE: mtspr 988, 2 # encoding: [0x7c,0x5c,0xf3,0xa6] +# CHECK-LE: mtspr 988, 2 # encoding: [0xa6,0xf3,0x5c,0x7c] + mttbhi %r2 |

