From 6e842b34a07b16196b05dcd1902c0bfabeeaf113 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Mon, 4 Aug 2014 20:28:34 +0000 Subject: [PATCH] Recognize mftbl as alias for mftb, for symmetry with mttb. llvm-svn: 214769 --- llvm/lib/Target/PowerPC/PPCInstrInfo.td | 1 + llvm/test/MC/PowerPC/ppc64-encoding-bookII.s | 3 +++ 2 files changed, 4 insertions(+) diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td index 703977463814..22c30b033124 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td @@ -3208,6 +3208,7 @@ def : InstAlias<"mtpid $Rx", (MTSPR 48, gprc:$Rx)>, Requires<[IsBookE]>; def : InstAlias<"mfpid $Rx", (MFSPR gprc:$Rx, 48)>, Requires<[IsBookE]>; 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<"xnop", (XORI R0, R0, 0)>; diff --git a/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s b/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s index 16ae65b9ea62..aee65c6fc201 100644 --- a/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s +++ b/llvm/test/MC/PowerPC/ppc64-encoding-bookII.s @@ -106,6 +106,9 @@ # CHECK-BE: mftb 2, 268 # encoding: [0x7c,0x4c,0x42,0xe6] # CHECK-LE: mftb 2, 268 # encoding: [0xe6,0x42,0x4c,0x7c] mftb 2 +# CHECK-BE: mftb 2, 268 # encoding: [0x7c,0x4c,0x42,0xe6] +# CHECK-LE: mftb 2, 268 # encoding: [0xe6,0x42,0x4c,0x7c] + mftbl 2 # CHECK-BE: mftb 2, 269 # encoding: [0x7c,0x4d,0x42,0xe6] # CHECK-LE: mftb 2, 269 # encoding: [0xe6,0x42,0x4d,0x7c] mftbu 2