forked from OSchip/llvm-project
Add simplified aliases for access to DCCR, ICCR, DEAR and ESR
llvm-svn: 214797
This commit is contained in:
parent
13a4f76d51
commit
51cf733427
|
@ -3262,6 +3262,18 @@ foreach BATR = 0-3 in {
|
||||||
Requires<[IsPPC6xx]>;
|
Requires<[IsPPC6xx]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def : InstAlias<"mtdccr $Rx", (MTSPR 1018, gprc:$Rx)>, Requires<[IsPPC4xx]>;
|
||||||
|
def : InstAlias<"mfdccr $Rx", (MFSPR gprc:$Rx, 1018)>, Requires<[IsPPC4xx]>;
|
||||||
|
|
||||||
|
def : InstAlias<"mticcr $Rx", (MTSPR 1019, gprc:$Rx)>, Requires<[IsPPC4xx]>;
|
||||||
|
def : InstAlias<"mficcr $Rx", (MFSPR gprc:$Rx, 1019)>, Requires<[IsPPC4xx]>;
|
||||||
|
|
||||||
|
def : InstAlias<"mtdear $Rx", (MTSPR 981, gprc:$Rx)>, Requires<[IsPPC4xx]>;
|
||||||
|
def : InstAlias<"mfdear $Rx", (MFSPR gprc:$Rx, 981)>, Requires<[IsPPC4xx]>;
|
||||||
|
|
||||||
|
def : InstAlias<"mtesr $Rx", (MTSPR 980, gprc:$Rx)>, Requires<[IsPPC4xx]>;
|
||||||
|
def : InstAlias<"mfesr $Rx", (MFSPR gprc:$Rx, 980)>, Requires<[IsPPC4xx]>;
|
||||||
|
|
||||||
def LAx : PPCAsmPseudo<"la $rA, $addr", (ins gprc:$rA, memri:$addr)>;
|
def LAx : PPCAsmPseudo<"la $rA, $addr", (ins gprc:$rA, memri:$addr)>;
|
||||||
|
|
||||||
def SUBI : PPCAsmPseudo<"subi $rA, $rB, $imm",
|
def SUBI : PPCAsmPseudo<"subi $rA, $rB, $imm",
|
||||||
|
|
|
@ -42,3 +42,31 @@
|
||||||
# CHECK-BE: tlbsx. 2, 3, 1 # encoding: [0x7c,0x43,0x0f,0x25]
|
# CHECK-BE: tlbsx. 2, 3, 1 # encoding: [0x7c,0x43,0x0f,0x25]
|
||||||
# CHECK-LE: tlbsx. 2, 3, 1 # encoding: [0x25,0x0f,0x43,0x7c]
|
# CHECK-LE: tlbsx. 2, 3, 1 # encoding: [0x25,0x0f,0x43,0x7c]
|
||||||
tlbsx. %r2, %r3, %r1
|
tlbsx. %r2, %r3, %r1
|
||||||
|
|
||||||
|
# CHECK-BE: mfspr 2, 1018 # encoding: [0x7c,0x5a,0xfa,0xa6]
|
||||||
|
# CHECK-LE: mfspr 2, 1018 # encoding: [0xa6,0xfa,0x5a,0x7c]
|
||||||
|
mfdccr %r2
|
||||||
|
# CHECK-BE: mtspr 1018, 2 # encoding: [0x7c,0x5a,0xfb,0xa6]
|
||||||
|
# CHECK-LE: mtspr 1018, 2 # encoding: [0xa6,0xfb,0x5a,0x7c]
|
||||||
|
mtdccr %r2
|
||||||
|
|
||||||
|
# CHECK-BE: mfspr 2, 1019 # encoding: [0x7c,0x5b,0xfa,0xa6]
|
||||||
|
# CHECK-LE: mfspr 2, 1019 # encoding: [0xa6,0xfa,0x5b,0x7c]
|
||||||
|
mficcr %r2
|
||||||
|
# CHECK-BE: mtspr 1019, 2 # encoding: [0x7c,0x5b,0xfb,0xa6]
|
||||||
|
# CHECK-LE: mtspr 1019, 2 # encoding: [0xa6,0xfb,0x5b,0x7c]
|
||||||
|
mticcr %r2
|
||||||
|
|
||||||
|
# CHECK-BE: mfspr 2, 981 # encoding: [0x7c,0x55,0xf2,0xa6]
|
||||||
|
# CHECK-LE: mfspr 2, 981 # encoding: [0xa6,0xf2,0x55,0x7c]
|
||||||
|
mfdear %r2
|
||||||
|
# CHECK-BE: mtspr 981, 2 # encoding: [0x7c,0x55,0xf3,0xa6]
|
||||||
|
# CHECK-LE: mtspr 981, 2 # encoding: [0xa6,0xf3,0x55,0x7c]
|
||||||
|
mtdear %r2
|
||||||
|
|
||||||
|
# CHECK-BE: mfspr 2, 980 # encoding: [0x7c,0x54,0xf2,0xa6]
|
||||||
|
# CHECK-LE: mfspr 2, 980 # encoding: [0xa6,0xf2,0x54,0x7c]
|
||||||
|
mfesr %r2
|
||||||
|
# CHECK-BE: mtspr 980, 2 # encoding: [0x7c,0x54,0xf3,0xa6]
|
||||||
|
# CHECK-LE: mtspr 980, 2 # encoding: [0xa6,0xf3,0x54,0x7c]
|
||||||
|
mtesr %r2
|
||||||
|
|
Loading…
Reference in New Issue