isa: fix paired single instruction arguments
Argument specific to this instruction were re/named to a more dolphin aligned name
This commit is contained in:
parent
b90b46ef8e
commit
ad1ec7aaa9
|
@ -161,14 +161,22 @@ impl Ins {
|
|||
self.0.field_crm() as i64
|
||||
}
|
||||
#[getter]
|
||||
fn ps_l(&self) -> i64 {
|
||||
self.0.field_ps_l() as i64
|
||||
fn ps_I(&self) -> i64 {
|
||||
self.0.field_ps_I() as i64
|
||||
}
|
||||
#[getter]
|
||||
fn ps_IX(&self) -> i64 {
|
||||
self.0.field_ps_IX() as i64
|
||||
}
|
||||
#[getter]
|
||||
fn ps_W(&self) -> i64 {
|
||||
self.0.field_ps_W() as i64
|
||||
}
|
||||
#[getter]
|
||||
fn ps_WX(&self) -> i64 {
|
||||
self.0.field_ps_WX() as i64
|
||||
}
|
||||
#[getter]
|
||||
fn ps_NB(&self) -> i64 {
|
||||
self.0.field_NB() as i64
|
||||
}
|
||||
|
|
|
@ -1157,8 +1157,10 @@ pub enum Field {
|
|||
crfD(CRField),
|
||||
crfS(CRField),
|
||||
crm(OpaqueU),
|
||||
ps_l(GQR),
|
||||
ps_I(GQR),
|
||||
ps_IX(GQR),
|
||||
ps_W(OpaqueU),
|
||||
ps_WX(OpaqueU),
|
||||
NB(OpaqueU),
|
||||
tbr(OpaqueU),
|
||||
mtfsf_FM(OpaqueU),
|
||||
|
@ -1201,8 +1203,10 @@ impl Field {
|
|||
Field::crfD(x) => Some(Argument::CRField(*x)),
|
||||
Field::crfS(x) => Some(Argument::CRField(*x)),
|
||||
Field::crm(x) => Some(Argument::OpaqueU(*x)),
|
||||
Field::ps_l(x) => Some(Argument::GQR(*x)),
|
||||
Field::ps_I(x) => Some(Argument::GQR(*x)),
|
||||
Field::ps_IX(x) => Some(Argument::GQR(*x)),
|
||||
Field::ps_W(x) => Some(Argument::OpaqueU(*x)),
|
||||
Field::ps_WX(x) => Some(Argument::OpaqueU(*x)),
|
||||
Field::NB(x) => Some(Argument::OpaqueU(*x)),
|
||||
Field::tbr(x) => Some(Argument::OpaqueU(*x)),
|
||||
Field::mtfsf_FM(x) => Some(Argument::OpaqueU(*x)),
|
||||
|
@ -1243,8 +1247,10 @@ impl Field {
|
|||
Field::crfD(_) => "crfD",
|
||||
Field::crfS(_) => "crfS",
|
||||
Field::crm(_) => "crm",
|
||||
Field::ps_l(_) => "ps_l",
|
||||
Field::ps_I(_) => "ps_I",
|
||||
Field::ps_IX(_) => "ps_IX",
|
||||
Field::ps_W(_) => "ps_W",
|
||||
Field::ps_WX(_) => "ps_WX",
|
||||
Field::NB(_) => "NB",
|
||||
Field::tbr(_) => "tbr",
|
||||
Field::mtfsf_FM(_) => "mtfsf_FM",
|
||||
|
@ -1931,7 +1937,7 @@ impl Ins {
|
|||
)),
|
||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||
Field::ps_I(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||
],
|
||||
Opcode::PsqLu => vec![
|
||||
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||
|
@ -1940,21 +1946,21 @@ impl Ins {
|
|||
)),
|
||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||
Field::ps_I(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||
],
|
||||
Opcode::PsqLux => vec![
|
||||
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||
Field::rB(GPR(((self.code >> 11u8) & 0x1f) as _)),
|
||||
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||
Field::ps_WX(OpaqueU(((self.code >> 10u8) & 0x1) as _)),
|
||||
Field::ps_IX(GQR(((self.code >> 7u8) & 0x7) as _)),
|
||||
],
|
||||
Opcode::PsqLx => vec![
|
||||
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||
Field::rB(GPR(((self.code >> 11u8) & 0x1f) as _)),
|
||||
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||
Field::ps_WX(OpaqueU(((self.code >> 10u8) & 0x1) as _)),
|
||||
Field::ps_IX(GQR(((self.code >> 7u8) & 0x7) as _)),
|
||||
],
|
||||
Opcode::PsqSt => vec![
|
||||
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||
|
@ -1963,7 +1969,7 @@ impl Ins {
|
|||
)),
|
||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||
Field::ps_I(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||
],
|
||||
Opcode::PsqStu => vec![
|
||||
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||
|
@ -1972,21 +1978,21 @@ impl Ins {
|
|||
)),
|
||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||
Field::ps_I(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||
],
|
||||
Opcode::PsqStux => vec![
|
||||
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||
Field::rB(GPR(((self.code >> 11u8) & 0x1f) as _)),
|
||||
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||
Field::ps_WX(OpaqueU(((self.code >> 10u8) & 0x1) as _)),
|
||||
Field::ps_IX(GQR(((self.code >> 7u8) & 0x7) as _)),
|
||||
],
|
||||
Opcode::PsqStx => vec![
|
||||
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||
Field::rB(GPR(((self.code >> 11u8) & 0x1f) as _)),
|
||||
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||
Field::ps_WX(OpaqueU(((self.code >> 10u8) & 0x1) as _)),
|
||||
Field::ps_IX(GQR(((self.code >> 7u8) & 0x7) as _)),
|
||||
],
|
||||
Opcode::PsAbs => vec![
|
||||
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||
|
@ -6050,14 +6056,22 @@ impl Ins {
|
|||
((self.code >> 12u8) & 0xff) as _
|
||||
}
|
||||
#[inline(always)]
|
||||
pub fn field_ps_l(&self) -> usize {
|
||||
pub fn field_ps_I(&self) -> usize {
|
||||
((self.code >> 12u8) & 0x7) as _
|
||||
}
|
||||
#[inline(always)]
|
||||
pub fn field_ps_IX(&self) -> usize {
|
||||
((self.code >> 7u8) & 0x7) as _
|
||||
}
|
||||
#[inline(always)]
|
||||
pub fn field_ps_W(&self) -> usize {
|
||||
((self.code >> 15u8) & 0x1) as _
|
||||
}
|
||||
#[inline(always)]
|
||||
pub fn field_ps_WX(&self) -> usize {
|
||||
((self.code >> 10u8) & 0x1) as _
|
||||
}
|
||||
#[inline(always)]
|
||||
pub fn field_NB(&self) -> usize {
|
||||
((self.code >> 11u8) & 0x1f) as _
|
||||
}
|
||||
|
|
|
@ -622,8 +622,8 @@ fn test_ins_psq_lx() {
|
|||
frD(FPR(0)),
|
||||
rA(GPR(0)),
|
||||
rB(GPR(0)),
|
||||
ps_W(OpaqueU(0)),
|
||||
ps_l(GQR(0))
|
||||
ps_WX(OpaqueU(0)),
|
||||
ps_IX(GQR(0))
|
||||
]
|
||||
);
|
||||
assert_eq!(ins.defs(), vec![frD(FPR(0))]);
|
||||
|
|
24
isa.yaml
24
isa.yaml
|
@ -112,12 +112,18 @@ fields:
|
|||
arg: OpaqueU
|
||||
bits: 12..20
|
||||
# Paired single fields
|
||||
- name: ps_l
|
||||
- name: ps_I
|
||||
arg: GQR
|
||||
bits: 17..20
|
||||
- name: ps_IX
|
||||
arg: GQR
|
||||
bits: 22..25
|
||||
- name: ps_W
|
||||
arg: OpaqueU
|
||||
bits: 16..17
|
||||
- name: ps_WX
|
||||
arg: OpaqueU
|
||||
bits: 21..22
|
||||
# Misc
|
||||
- name: NB
|
||||
arg: OpaqueU
|
||||
|
@ -1268,7 +1274,7 @@ opcodes:
|
|||
desc: Paired Single Quantized Load
|
||||
bitmask: 0xfc000000
|
||||
pattern: 0xe0000000
|
||||
args: [ frD, ps_offset, rA, ps_W, ps_l ]
|
||||
args: [ frD, ps_offset, rA, ps_W, ps_I ]
|
||||
defs: [ frD ]
|
||||
uses: [ rA.nz ]
|
||||
|
||||
|
@ -1276,7 +1282,7 @@ opcodes:
|
|||
desc: Paired Single Quantized Load with Update
|
||||
bitmask: 0xfc000000
|
||||
pattern: 0xe4000000
|
||||
args: [ frD, ps_offset, rA, ps_W, ps_l ]
|
||||
args: [ frD, ps_offset, rA, ps_W, ps_I ]
|
||||
defs: [ frD, rA ]
|
||||
uses: [ rA ]
|
||||
|
||||
|
@ -1284,7 +1290,7 @@ opcodes:
|
|||
desc: Paired Single Quantized Load with Update Indexed
|
||||
bitmask: 0xfc00007f
|
||||
pattern: 0x1000004c
|
||||
args: [ frD, rA, rB, ps_W, ps_l ]
|
||||
args: [ frD, rA, rB, ps_WX, ps_IX ]
|
||||
defs: [ frD, rA ]
|
||||
uses: [ rA, rB ]
|
||||
|
||||
|
@ -1292,7 +1298,7 @@ opcodes:
|
|||
desc: Paired Single Quantized Load Indexed
|
||||
bitmask: 0xfc00007f
|
||||
pattern: 0x1000000c
|
||||
args: [ frD, rA, rB, ps_W, ps_l ]
|
||||
args: [ frD, rA, rB, ps_WX, ps_IX ]
|
||||
defs: [ frD ]
|
||||
uses: [ rA.nz, rB ]
|
||||
|
||||
|
@ -1300,14 +1306,14 @@ opcodes:
|
|||
desc: Paired Single Quantized Store
|
||||
bitmask: 0xfc000000
|
||||
pattern: 0xf0000000
|
||||
args: [ frS, ps_offset, rA, ps_W, ps_l ]
|
||||
args: [ frS, ps_offset, rA, ps_W, ps_I ]
|
||||
uses: [ frS, rA.nz ]
|
||||
|
||||
- name: psq_stu
|
||||
desc: Paired Single Quantized Store with Update
|
||||
bitmask: 0xfc000000
|
||||
pattern: 0xf4000000
|
||||
args: [ frS, ps_offset, rA, ps_W, ps_l ]
|
||||
args: [ frS, ps_offset, rA, ps_W, ps_I ]
|
||||
defs: [ rA ]
|
||||
uses: [ frS, rA ]
|
||||
|
||||
|
@ -1315,7 +1321,7 @@ opcodes:
|
|||
desc: Paired Single Quantized Store with Update Indexed
|
||||
bitmask: 0xfc00007f
|
||||
pattern: 0x1000004e
|
||||
args: [ frS, rA, rB, ps_W, ps_l ]
|
||||
args: [ frS, rA, rB, ps_WX, ps_IX ]
|
||||
defs: [ rA ]
|
||||
uses: [ frS, rA, rB ]
|
||||
|
||||
|
@ -1323,7 +1329,7 @@ opcodes:
|
|||
desc: Paired Single Quantized Store Indexed
|
||||
bitmask: 0xfc00007f
|
||||
pattern: 0x1000000e
|
||||
args: [ frS, rA, rB, ps_W, ps_l ]
|
||||
args: [ frS, rA, rB, ps_WX, ps_IX ]
|
||||
uses: [ frS, rA.nz, rB ]
|
||||
|
||||
- name: ps_abs
|
||||
|
|
Loading…
Reference in New Issue