fix psq_st disasm
This commit is contained in:
parent
da869222d0
commit
70192c75a4
|
@ -1130,6 +1130,7 @@ pub enum Field {
|
||||||
simm(Simm),
|
simm(Simm),
|
||||||
uimm(Uimm),
|
uimm(Uimm),
|
||||||
offset(Offset),
|
offset(Offset),
|
||||||
|
ps_offset(Offset),
|
||||||
BO(OpaqueU),
|
BO(OpaqueU),
|
||||||
BI(OpaqueU),
|
BI(OpaqueU),
|
||||||
BD(BranchDest),
|
BD(BranchDest),
|
||||||
|
@ -1820,66 +1821,66 @@ impl Ins {
|
||||||
],
|
],
|
||||||
Opcode::PsqL => vec![
|
Opcode::PsqL => vec![
|
||||||
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::ps_offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
(((self.code & 0xfff) ^ 0x800).wrapping_sub(0x800)) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::ps_W(OpaqueU(((self.code >> 16u8) & 0x0) as _)),
|
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||||
],
|
],
|
||||||
Opcode::PsqLu => vec![
|
Opcode::PsqLu => vec![
|
||||||
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::ps_offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
(((self.code & 0xfff) ^ 0x800).wrapping_sub(0x800)) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::ps_W(OpaqueU(((self.code >> 16u8) & 0x0) as _)),
|
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||||
],
|
],
|
||||||
Opcode::PsqLux => vec![
|
Opcode::PsqLux => vec![
|
||||||
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::rB(GPR(((self.code >> 11u8) & 0x1f) as _)),
|
Field::rB(GPR(((self.code >> 11u8) & 0x1f) as _)),
|
||||||
Field::ps_W(OpaqueU(((self.code >> 16u8) & 0x0) as _)),
|
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||||
],
|
],
|
||||||
Opcode::PsqLx => vec![
|
Opcode::PsqLx => vec![
|
||||||
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::rB(GPR(((self.code >> 11u8) & 0x1f) as _)),
|
Field::rB(GPR(((self.code >> 11u8) & 0x1f) as _)),
|
||||||
Field::ps_W(OpaqueU(((self.code >> 16u8) & 0x0) as _)),
|
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||||
],
|
],
|
||||||
Opcode::PsqSt => vec![
|
Opcode::PsqSt => vec![
|
||||||
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::ps_offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
(((self.code & 0xfff) ^ 0x800).wrapping_sub(0x800)) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::ps_W(OpaqueU(((self.code >> 16u8) & 0x0) as _)),
|
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||||
],
|
],
|
||||||
Opcode::PsqStu => vec![
|
Opcode::PsqStu => vec![
|
||||||
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::ps_offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
(((self.code & 0xfff) ^ 0x800).wrapping_sub(0x800)) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::ps_W(OpaqueU(((self.code >> 16u8) & 0x0) as _)),
|
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||||
],
|
],
|
||||||
Opcode::PsqStux => vec![
|
Opcode::PsqStux => vec![
|
||||||
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::rB(GPR(((self.code >> 11u8) & 0x1f) as _)),
|
Field::rB(GPR(((self.code >> 11u8) & 0x1f) as _)),
|
||||||
Field::ps_W(OpaqueU(((self.code >> 16u8) & 0x0) as _)),
|
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||||
],
|
],
|
||||||
Opcode::PsqStx => vec![
|
Opcode::PsqStx => vec![
|
||||||
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::rB(GPR(((self.code >> 11u8) & 0x1f) as _)),
|
Field::rB(GPR(((self.code >> 11u8) & 0x1f) as _)),
|
||||||
Field::ps_W(OpaqueU(((self.code >> 16u8) & 0x0) as _)),
|
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||||
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
Field::ps_l(GQR(((self.code >> 12u8) & 0x7) as _)),
|
||||||
],
|
],
|
||||||
Opcode::PsAbs => vec![
|
Opcode::PsAbs => vec![
|
||||||
|
@ -5709,6 +5710,10 @@ impl Ins {
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _
|
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _
|
||||||
}
|
}
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
pub fn field_ps_offset(&self) -> isize {
|
||||||
|
(((self.code & 0xfff) ^ 0x800).wrapping_sub(0x800)) as _
|
||||||
|
}
|
||||||
|
#[inline(always)]
|
||||||
pub fn field_BO(&self) -> usize {
|
pub fn field_BO(&self) -> usize {
|
||||||
((self.code >> 21u8) & 0x1f) as _
|
((self.code >> 21u8) & 0x1f) as _
|
||||||
}
|
}
|
||||||
|
@ -5814,7 +5819,7 @@ impl Ins {
|
||||||
}
|
}
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn field_ps_W(&self) -> usize {
|
pub fn field_ps_W(&self) -> usize {
|
||||||
((self.code >> 16u8) & 0x0) as _
|
((self.code >> 15u8) & 0x1) as _
|
||||||
}
|
}
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn field_NB(&self) -> usize {
|
pub fn field_NB(&self) -> usize {
|
||||||
|
|
|
@ -172,6 +172,7 @@ impl Field {
|
||||||
Field::simm(x) => Some(Argument::Simm(*x)),
|
Field::simm(x) => Some(Argument::Simm(*x)),
|
||||||
Field::uimm(x) => Some(Argument::Uimm(*x)),
|
Field::uimm(x) => Some(Argument::Uimm(*x)),
|
||||||
Field::offset(x) => Some(Argument::Offset(*x)),
|
Field::offset(x) => Some(Argument::Offset(*x)),
|
||||||
|
Field::ps_offset(x) => Some(Argument::Offset(*x)),
|
||||||
Field::BO(x) => Some(Argument::OpaqueU(*x)),
|
Field::BO(x) => Some(Argument::OpaqueU(*x)),
|
||||||
Field::BI(x) => Some(Argument::OpaqueU(*x)),
|
Field::BI(x) => Some(Argument::OpaqueU(*x)),
|
||||||
Field::BD(x) => Some(Argument::BranchDest(*x)),
|
Field::BD(x) => Some(Argument::BranchDest(*x)),
|
||||||
|
|
|
@ -638,13 +638,11 @@ fn test_ins_psq_lx() {
|
||||||
assert_asm!(0x1000000C, "psq_lx f0, r0, r0, 0, qr0");
|
assert_asm!(0x1000000C, "psq_lx f0, r0, r0, 0, qr0");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_ins_psq_st() {
|
fn test_ins_psq_st() {
|
||||||
assert_asm!(0xF1230210, "psq_st f9, 0x210(r3), 0, qr0");
|
assert_asm!(0xF1230210, "psq_st f9, 0x210(r3), 0, qr0");
|
||||||
assert_asm!(0xF1238008, "psq_st f9, 8(r3), 1, qr0");
|
assert_asm!(0xF1238008, "psq_st f9, 0x8(r3), 1, qr0");
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_ins_psq_stu() {
|
fn test_ins_psq_stu() {
|
||||||
|
|
14
isa.yaml
14
isa.yaml
|
@ -11,6 +11,10 @@ fields:
|
||||||
arg: Offset
|
arg: Offset
|
||||||
bits: 16..32
|
bits: 16..32
|
||||||
signed: true
|
signed: true
|
||||||
|
- name: ps_offset
|
||||||
|
arg: Offset
|
||||||
|
bits: 20..32
|
||||||
|
signed: true
|
||||||
# Branch fields
|
# Branch fields
|
||||||
- name: BO
|
- name: BO
|
||||||
arg: OpaqueU
|
arg: OpaqueU
|
||||||
|
@ -111,7 +115,7 @@ fields:
|
||||||
bits: 17..20
|
bits: 17..20
|
||||||
- name: ps_W
|
- name: ps_W
|
||||||
arg: OpaqueU
|
arg: OpaqueU
|
||||||
bits: 16
|
bits: 16..17
|
||||||
# Misc
|
# Misc
|
||||||
- name: NB
|
- name: NB
|
||||||
arg: OpaqueU
|
arg: OpaqueU
|
||||||
|
@ -1262,7 +1266,7 @@ opcodes:
|
||||||
desc: Paired Single Quantized Load
|
desc: Paired Single Quantized Load
|
||||||
bitmask: 0xfc000000
|
bitmask: 0xfc000000
|
||||||
pattern: 0xe0000000
|
pattern: 0xe0000000
|
||||||
args: [ frD, offset, rA, ps_W, ps_l ]
|
args: [ frD, ps_offset, rA, ps_W, ps_l ]
|
||||||
defs: [ frD ]
|
defs: [ frD ]
|
||||||
uses: [ rA.nz ]
|
uses: [ rA.nz ]
|
||||||
|
|
||||||
|
@ -1270,7 +1274,7 @@ opcodes:
|
||||||
desc: Paired Single Quantized Load with Update
|
desc: Paired Single Quantized Load with Update
|
||||||
bitmask: 0xfc000000
|
bitmask: 0xfc000000
|
||||||
pattern: 0xe4000000
|
pattern: 0xe4000000
|
||||||
args: [ frD, offset, rA, ps_W, ps_l ]
|
args: [ frD, ps_offset, rA, ps_W, ps_l ]
|
||||||
defs: [ frD, rA ]
|
defs: [ frD, rA ]
|
||||||
uses: [ rA ]
|
uses: [ rA ]
|
||||||
|
|
||||||
|
@ -1294,14 +1298,14 @@ opcodes:
|
||||||
desc: Paired Single Quantized Store
|
desc: Paired Single Quantized Store
|
||||||
bitmask: 0xfc000000
|
bitmask: 0xfc000000
|
||||||
pattern: 0xf0000000
|
pattern: 0xf0000000
|
||||||
args: [ frS, offset, rA, ps_W, ps_l ]
|
args: [ frS, ps_offset, rA, ps_W, ps_l ]
|
||||||
uses: [ frS, rA.nz ]
|
uses: [ frS, rA.nz ]
|
||||||
|
|
||||||
- name: psq_stu
|
- name: psq_stu
|
||||||
desc: Paired Single Quantized Store with Update
|
desc: Paired Single Quantized Store with Update
|
||||||
bitmask: 0xfc000000
|
bitmask: 0xfc000000
|
||||||
pattern: 0xf4000000
|
pattern: 0xf4000000
|
||||||
args: [ frS, offset, rA, ps_W, ps_l ]
|
args: [ frS, ps_offset, rA, ps_W, ps_l ]
|
||||||
defs: [ rA ]
|
defs: [ rA ]
|
||||||
uses: [ frS, rA ]
|
uses: [ frS, rA ]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue