mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
Add simplified aliases for access to DCCR, ICCR, DEAR and ESR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214797 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e85047ea0a
commit
db3ce56a58
@ -3262,6 +3262,18 @@ foreach BATR = 0-3 in {
|
||||
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 SUBI : PPCAsmPseudo<"subi $rA, $rB, $imm",
|
||||
|
@ -42,3 +42,31 @@
|
||||
# CHECK-BE: tlbsx. 2, 3, 1 # encoding: [0x7c,0x43,0x0f,0x25]
|
||||
# CHECK-LE: tlbsx. 2, 3, 1 # encoding: [0x25,0x0f,0x43,0x7c]
|
||||
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
Block a user