diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td @@ -4627,19 +4627,8 @@ def : InstAlias<"mtasr $RS", (MTSPR 280, gprc:$RS)>; -def : InstAlias<"mfdec $RT", (MFSPR gprc:$RT, 22)>; -def : InstAlias<"mtdec $RT", (MTSPR 22, gprc:$RT)>; - def : InstAlias<"mfpvr $RT", (MFSPR gprc:$RT, 287)>; -def : InstAlias<"mfsdr1 $RT", (MFSPR gprc:$RT, 25)>; -def : InstAlias<"mtsdr1 $RT", (MTSPR 25, gprc:$RT)>; - -def : InstAlias<"mfsrr0 $RT", (MFSPR gprc:$RT, 26)>; -def : InstAlias<"mfsrr1 $RT", (MFSPR gprc:$RT, 27)>; -def : InstAlias<"mtsrr0 $RT", (MTSPR 26, gprc:$RT)>; -def : InstAlias<"mtsrr1 $RT", (MTSPR 27, gprc:$RT)>; - def : InstAlias<"tlbie $RB", (TLBIE R0, gprc:$RB)>; def : InstAlias<"tlbrehi $RS, $A", (TLBRE2 gprc:$RS, gprc:$A, 0)>, diff --git a/llvm/test/MC/Disassembler/PowerPC/ppc64-encoding-bookIII.txt b/llvm/test/MC/Disassembler/PowerPC/ppc64-encoding-bookIII.txt --- a/llvm/test/MC/Disassembler/PowerPC/ppc64-encoding-bookIII.txt +++ b/llvm/test/MC/Disassembler/PowerPC/ppc64-encoding-bookIII.txt @@ -60,31 +60,31 @@ # CHECK: mtspr 280, 4 0x7c 0x98 0x43 0xa6 -# CHECK: mfspr 4, 22 +# CHECK: mfdec 4 0x7c 0x96 0x02 0xa6 -# CHECK: mtspr 22, 4 +# CHECK: mtdec 4 0x7c 0x96 0x03 0xa6 # CHECK: mfpvr 4 0x7c 0x9f 0x42 0xa6 -# CHECK: mfspr 4, 25 +# CHECK: mfsdr1 4 0x7c 0x99 0x02 0xa6 -# CHECK: mtspr 25, 4 +# CHECK: mtsdr1 4 0x7c 0x99 0x03 0xa6 -# CHECK: mfspr 4, 26 +# CHECK: mfsrr0 4 0x7c 0x9a 0x02 0xa6 -# CHECK: mtspr 26, 4 +# CHECK: mtsrr0 4 0x7c 0x9a 0x03 0xa6 -# CHECK: mfspr 4, 27 +# CHECK: mfsrr1 4 0x7c 0x9b 0x02 0xa6 -# CHECK: mtspr 27, 4 +# CHECK: mtsrr1 4 0x7c 0x9b 0x03 0xa6 # CHECK: slbie 4 diff --git a/llvm/test/MC/PowerPC/ppc64-encoding-bookIII.s b/llvm/test/MC/PowerPC/ppc64-encoding-bookIII.s --- a/llvm/test/MC/PowerPC/ppc64-encoding-bookIII.s +++ b/llvm/test/MC/PowerPC/ppc64-encoding-bookIII.s @@ -94,40 +94,40 @@ # CHECK-LE: mtspr 280, 4 # encoding: [0xa6,0x43,0x98,0x7c] mtasr %r4 -# CHECK-BE: mfspr 4, 22 # encoding: [0x7c,0x96,0x02,0xa6] -# CHECK-LE: mfspr 4, 22 # encoding: [0xa6,0x02,0x96,0x7c] +# CHECK-BE: mfdec 4 # encoding: [0x7c,0x96,0x02,0xa6] +# CHECK-LE: mfdec 4 # encoding: [0xa6,0x02,0x96,0x7c] mfdec %r4 -# CHECK-BE: mtspr 22, 4 # encoding: [0x7c,0x96,0x03,0xa6] -# CHECK-LE: mtspr 22, 4 # encoding: [0xa6,0x03,0x96,0x7c] +# CHECK-BE: mtdec 4 # encoding: [0x7c,0x96,0x03,0xa6] +# CHECK-LE: mtdec 4 # encoding: [0xa6,0x03,0x96,0x7c] mtdec %r4 # CHECK-BE: mfpvr 4 # encoding: [0x7c,0x9f,0x42,0xa6] # CHECK-LE: mfpvr 4 # encoding: [0xa6,0x42,0x9f,0x7c] mfpvr %r4 -# CHECK-BE: mfspr 4, 25 # encoding: [0x7c,0x99,0x02,0xa6] -# CHECK-LE: mfspr 4, 25 # encoding: [0xa6,0x02,0x99,0x7c] +# CHECK-BE: mfsdr1 4 # encoding: [0x7c,0x99,0x02,0xa6] +# CHECK-LE: mfsdr1 4 # encoding: [0xa6,0x02,0x99,0x7c] mfsdr1 %r4 -# CHECK-BE: mtspr 25, 4 # encoding: [0x7c,0x99,0x03,0xa6] -# CHECK-LE: mtspr 25, 4 # encoding: [0xa6,0x03,0x99,0x7c] +# CHECK-BE: mtsdr1 4 # encoding: [0x7c,0x99,0x03,0xa6] +# CHECK-LE: mtsdr1 4 # encoding: [0xa6,0x03,0x99,0x7c] mtsdr1 %r4 -# CHECK-BE: mfspr 4, 26 # encoding: [0x7c,0x9a,0x02,0xa6] -# CHECK-LE: mfspr 4, 26 # encoding: [0xa6,0x02,0x9a,0x7c] +# CHECK-BE: mfsrr0 4 # encoding: [0x7c,0x9a,0x02,0xa6] +# CHECK-LE: mfsrr0 4 # encoding: [0xa6,0x02,0x9a,0x7c] mfsrr0 %r4 -# CHECK-BE: mtspr 26, 4 # encoding: [0x7c,0x9a,0x03,0xa6] -# CHECK-LE: mtspr 26, 4 # encoding: [0xa6,0x03,0x9a,0x7c] +# CHECK-BE: mtsrr0 4 # encoding: [0x7c,0x9a,0x03,0xa6] +# CHECK-LE: mtsrr0 4 # encoding: [0xa6,0x03,0x9a,0x7c] mtsrr0 %r4 -# CHECK-BE: mfspr 4, 27 # encoding: [0x7c,0x9b,0x02,0xa6] -# CHECK-LE: mfspr 4, 27 # encoding: [0xa6,0x02,0x9b,0x7c] +# CHECK-BE: mfsrr1 4 # encoding: [0x7c,0x9b,0x02,0xa6] +# CHECK-LE: mfsrr1 4 # encoding: [0xa6,0x02,0x9b,0x7c] mfsrr1 %r4 -# CHECK-BE: mtspr 27, 4 # encoding: [0x7c,0x9b,0x03,0xa6] -# CHECK-LE: mtspr 27, 4 # encoding: [0xa6,0x03,0x9b,0x7c] +# CHECK-BE: mtsrr1 4 # encoding: [0x7c,0x9b,0x03,0xa6] +# CHECK-LE: mtsrr1 4 # encoding: [0xa6,0x03,0x9b,0x7c] mtsrr1 %r4 # CHECK-BE: slbie 4 # encoding: [0x7c,0x00,0x23,0x64] diff --git a/llvm/test/MC/PowerPC/ppc64-encoding-ext.s b/llvm/test/MC/PowerPC/ppc64-encoding-ext.s --- a/llvm/test/MC/PowerPC/ppc64-encoding-ext.s +++ b/llvm/test/MC/PowerPC/ppc64-encoding-ext.s @@ -3443,29 +3443,29 @@ # CHECK-BE: mfdar 2 # encoding: [0x7c,0x53,0x02,0xa6] # CHECK-LE: mfdar 2 # encoding: [0xa6,0x02,0x53,0x7c] mfdar 2 -# CHECK-BE: mtspr 22, 2 # encoding: [0x7c,0x56,0x03,0xa6] -# CHECK-LE: mtspr 22, 2 # encoding: [0xa6,0x03,0x56,0x7c] +# CHECK-BE: mtdec 2 # encoding: [0x7c,0x56,0x03,0xa6] +# CHECK-LE: mtdec 2 # encoding: [0xa6,0x03,0x56,0x7c] mtdec 2 -# CHECK-BE: mfspr 2, 22 # encoding: [0x7c,0x56,0x02,0xa6] -# CHECK-LE: mfspr 2, 22 # encoding: [0xa6,0x02,0x56,0x7c] +# CHECK-BE: mfdec 2 # encoding: [0x7c,0x56,0x02,0xa6] +# CHECK-LE: mfdec 2 # encoding: [0xa6,0x02,0x56,0x7c] mfdec 2 -# CHECK-BE: mtspr 25, 2 # encoding: [0x7c,0x59,0x03,0xa6] -# CHECK-LE: mtspr 25, 2 # encoding: [0xa6,0x03,0x59,0x7c] +# CHECK-BE: mtsdr1 2 # encoding: [0x7c,0x59,0x03,0xa6] +# CHECK-LE: mtsdr1 2 # encoding: [0xa6,0x03,0x59,0x7c] mtsdr1 2 -# CHECK-BE: mfspr 2, 25 # encoding: [0x7c,0x59,0x02,0xa6] -# CHECK-LE: mfspr 2, 25 # encoding: [0xa6,0x02,0x59,0x7c] +# CHECK-BE: mfsdr1 2 # encoding: [0x7c,0x59,0x02,0xa6] +# CHECK-LE: mfsdr1 2 # encoding: [0xa6,0x02,0x59,0x7c] mfsdr1 2 -# CHECK-BE: mtspr 26, 2 # encoding: [0x7c,0x5a,0x03,0xa6] -# CHECK-LE: mtspr 26, 2 # encoding: [0xa6,0x03,0x5a,0x7c] +# CHECK-BE: mtsrr0 2 # encoding: [0x7c,0x5a,0x03,0xa6] +# CHECK-LE: mtsrr0 2 # encoding: [0xa6,0x03,0x5a,0x7c] mtsrr0 2 -# CHECK-BE: mfspr 2, 26 # encoding: [0x7c,0x5a,0x02,0xa6] -# CHECK-LE: mfspr 2, 26 # encoding: [0xa6,0x02,0x5a,0x7c] +# CHECK-BE: mfsrr0 2 # encoding: [0x7c,0x5a,0x02,0xa6] +# CHECK-LE: mfsrr0 2 # encoding: [0xa6,0x02,0x5a,0x7c] mfsrr0 2 -# CHECK-BE: mtspr 27, 2 # encoding: [0x7c,0x5b,0x03,0xa6] -# CHECK-LE: mtspr 27, 2 # encoding: [0xa6,0x03,0x5b,0x7c] +# CHECK-BE: mtsrr1 2 # encoding: [0x7c,0x5b,0x03,0xa6] +# CHECK-LE: mtsrr1 2 # encoding: [0xa6,0x03,0x5b,0x7c] mtsrr1 2 -# CHECK-BE: mfspr 2, 27 # encoding: [0x7c,0x5b,0x02,0xa6] -# CHECK-LE: mfspr 2, 27 # encoding: [0xa6,0x02,0x5b,0x7c] +# CHECK-BE: mfsrr1 2 # encoding: [0x7c,0x5b,0x02,0xa6] +# CHECK-LE: mfsrr1 2 # encoding: [0xa6,0x02,0x5b,0x7c] mfsrr1 2 # CHECK-BE: mtcfar 2 # encoding: [0x7c,0x5c,0x03,0xa6] # CHECK-LE: mtcfar 2 # encoding: [0xa6,0x03,0x5c,0x7c]