genisa: cast unmasked signed value
Co-authored-by: Richard Patel <me@terorie.dev>
This commit is contained in:
parent
9fd7546916
commit
d03a713a2b
|
@ -1277,21 +1277,21 @@ impl Ins {
|
||||||
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::simm(Simm(
|
Field::simm(Simm(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
Opcode::Addic => vec![
|
Opcode::Addic => vec![
|
||||||
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::simm(Simm(
|
Field::simm(Simm(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
Opcode::Addic_ => vec![
|
Opcode::Addic_ => vec![
|
||||||
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::simm(Simm(
|
Field::simm(Simm(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
Opcode::Addis => vec![
|
Opcode::Addis => vec![
|
||||||
|
@ -1328,13 +1328,15 @@ impl Ins {
|
||||||
Field::uimm(Uimm((self.code & 0xffff) as _)),
|
Field::uimm(Uimm((self.code & 0xffff) as _)),
|
||||||
],
|
],
|
||||||
Opcode::B => vec![Field::LI(BranchDest(
|
Opcode::B => vec![Field::LI(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0xffffff) ^ 0x800000).wrapping_sub(0x800000)) << 2u8) as _,
|
((((((self.code >> 2u8) & 0xffffff) ^ 0x800000).wrapping_sub(0x800000)) as i32)
|
||||||
|
<< 2u8) as _,
|
||||||
))],
|
))],
|
||||||
Opcode::Bc => vec![
|
Opcode::Bc => vec![
|
||||||
Field::BO(OpaqueU(((self.code >> 21u8) & 0x1f) as _)),
|
Field::BO(OpaqueU(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::BI(OpaqueU(((self.code >> 16u8) & 0x1f) as _)),
|
Field::BI(OpaqueU(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::BD(BranchDest(
|
Field::BD(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000)) << 2u8) as _,
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000)) as i32)
|
||||||
|
<< 2u8) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
Opcode::Bcctr => vec![
|
Opcode::Bcctr => vec![
|
||||||
|
@ -1354,7 +1356,7 @@ impl Ins {
|
||||||
Field::crfD(CRField(((self.code >> 23u8) & 0x7) as _)),
|
Field::crfD(CRField(((self.code >> 23u8) & 0x7) as _)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::simm(Simm(
|
Field::simm(Simm(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
Opcode::Cmpl => vec![
|
Opcode::Cmpl => vec![
|
||||||
|
@ -1621,14 +1623,14 @@ impl Ins {
|
||||||
Opcode::Lbz => vec![
|
Opcode::Lbz => vec![
|
||||||
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
Opcode::Lbzu => vec![
|
Opcode::Lbzu => vec![
|
||||||
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
|
@ -1645,14 +1647,14 @@ impl Ins {
|
||||||
Opcode::Lfd => vec![
|
Opcode::Lfd => vec![
|
||||||
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
Opcode::Lfdu => vec![
|
Opcode::Lfdu => vec![
|
||||||
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
|
@ -1669,14 +1671,14 @@ impl Ins {
|
||||||
Opcode::Lfs => vec![
|
Opcode::Lfs => vec![
|
||||||
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
Opcode::Lfsu => vec![
|
Opcode::Lfsu => vec![
|
||||||
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
|
@ -1693,14 +1695,14 @@ impl Ins {
|
||||||
Opcode::Lha => vec![
|
Opcode::Lha => vec![
|
||||||
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
Opcode::Lhau => vec![
|
Opcode::Lhau => vec![
|
||||||
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
|
@ -1722,14 +1724,14 @@ impl Ins {
|
||||||
Opcode::Lhz => vec![
|
Opcode::Lhz => vec![
|
||||||
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
Opcode::Lhzu => vec![
|
Opcode::Lhzu => vec![
|
||||||
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
|
@ -1746,7 +1748,7 @@ impl Ins {
|
||||||
Opcode::Lmw => vec![
|
Opcode::Lmw => vec![
|
||||||
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
|
@ -1773,14 +1775,14 @@ impl Ins {
|
||||||
Opcode::Lwz => vec![
|
Opcode::Lwz => vec![
|
||||||
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
Opcode::Lwzu => vec![
|
Opcode::Lwzu => vec![
|
||||||
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
|
@ -1875,7 +1877,7 @@ impl Ins {
|
||||||
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::simm(Simm(
|
Field::simm(Simm(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
Opcode::Mullw => vec![
|
Opcode::Mullw => vec![
|
||||||
|
@ -1920,7 +1922,7 @@ 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::ps_offset(Offset(
|
Field::ps_offset(Offset(
|
||||||
(((self.code & 0xfff) ^ 0x800).wrapping_sub(0x800)) as _,
|
((((self.code & 0xfff) ^ 0x800).wrapping_sub(0x800)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||||
|
@ -1929,7 +1931,7 @@ impl Ins {
|
||||||
Opcode::PsqLu => vec![
|
Opcode::PsqLu => vec![
|
||||||
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frD(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::ps_offset(Offset(
|
Field::ps_offset(Offset(
|
||||||
(((self.code & 0xfff) ^ 0x800).wrapping_sub(0x800)) as _,
|
((((self.code & 0xfff) ^ 0x800).wrapping_sub(0x800)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||||
|
@ -1952,7 +1954,7 @@ impl Ins {
|
||||||
Opcode::PsqSt => vec![
|
Opcode::PsqSt => vec![
|
||||||
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::ps_offset(Offset(
|
Field::ps_offset(Offset(
|
||||||
(((self.code & 0xfff) ^ 0x800).wrapping_sub(0x800)) as _,
|
((((self.code & 0xfff) ^ 0x800).wrapping_sub(0x800)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||||
|
@ -1961,7 +1963,7 @@ impl Ins {
|
||||||
Opcode::PsqStu => vec![
|
Opcode::PsqStu => vec![
|
||||||
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::ps_offset(Offset(
|
Field::ps_offset(Offset(
|
||||||
(((self.code & 0xfff) ^ 0x800).wrapping_sub(0x800)) as _,
|
((((self.code & 0xfff) ^ 0x800).wrapping_sub(0x800)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
Field::ps_W(OpaqueU(((self.code >> 15u8) & 0x1) as _)),
|
||||||
|
@ -2176,14 +2178,14 @@ impl Ins {
|
||||||
Opcode::Stb => vec![
|
Opcode::Stb => vec![
|
||||||
Field::rS(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rS(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
Opcode::Stbu => vec![
|
Opcode::Stbu => vec![
|
||||||
Field::rS(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rS(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
|
@ -2200,14 +2202,14 @@ impl Ins {
|
||||||
Opcode::Stfd => vec![
|
Opcode::Stfd => vec![
|
||||||
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
Opcode::Stfdu => vec![
|
Opcode::Stfdu => vec![
|
||||||
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
|
@ -2229,14 +2231,14 @@ impl Ins {
|
||||||
Opcode::Stfs => vec![
|
Opcode::Stfs => vec![
|
||||||
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
Opcode::Stfsu => vec![
|
Opcode::Stfsu => vec![
|
||||||
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::frS(FPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
|
@ -2253,7 +2255,7 @@ impl Ins {
|
||||||
Opcode::Sth => vec![
|
Opcode::Sth => vec![
|
||||||
Field::rS(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rS(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
|
@ -2265,7 +2267,7 @@ impl Ins {
|
||||||
Opcode::Sthu => vec![
|
Opcode::Sthu => vec![
|
||||||
Field::rS(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rS(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
|
@ -2282,7 +2284,7 @@ impl Ins {
|
||||||
Opcode::Stmw => vec![
|
Opcode::Stmw => vec![
|
||||||
Field::rS(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rS(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
|
@ -2299,7 +2301,7 @@ impl Ins {
|
||||||
Opcode::Stw => vec![
|
Opcode::Stw => vec![
|
||||||
Field::rS(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rS(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
|
@ -2316,7 +2318,7 @@ impl Ins {
|
||||||
Opcode::Stwu => vec![
|
Opcode::Stwu => vec![
|
||||||
Field::rS(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rS(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
],
|
],
|
||||||
|
@ -2349,7 +2351,7 @@ impl Ins {
|
||||||
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Field::rD(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::simm(Simm(
|
Field::simm(Simm(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
Opcode::Subfme => vec![
|
Opcode::Subfme => vec![
|
||||||
|
@ -2372,7 +2374,7 @@ impl Ins {
|
||||||
Field::TO(OpaqueU(((self.code >> 21u8) & 0x1f) as _)),
|
Field::TO(OpaqueU(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Field::simm(Simm(
|
Field::simm(Simm(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
Opcode::Xor => vec![
|
Opcode::Xor => vec![
|
||||||
|
@ -3128,7 +3130,7 @@ impl Ins {
|
||||||
}
|
}
|
||||||
Opcode::Lbz => {
|
Opcode::Lbz => {
|
||||||
let mut uses = vec![Field::offset(Offset(
|
let mut uses = vec![Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
))];
|
))];
|
||||||
if ((self.code >> 16u8) & 0x1f) != 0 {
|
if ((self.code >> 16u8) & 0x1f) != 0 {
|
||||||
uses.push(Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)));
|
uses.push(Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)));
|
||||||
|
@ -3138,7 +3140,7 @@ impl Ins {
|
||||||
Opcode::Lbzu => {
|
Opcode::Lbzu => {
|
||||||
let mut uses = vec![
|
let mut uses = vec![
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
];
|
];
|
||||||
|
@ -3160,7 +3162,7 @@ impl Ins {
|
||||||
}
|
}
|
||||||
Opcode::Lfd => {
|
Opcode::Lfd => {
|
||||||
let mut uses = vec![Field::offset(Offset(
|
let mut uses = vec![Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
))];
|
))];
|
||||||
if ((self.code >> 16u8) & 0x1f) != 0 {
|
if ((self.code >> 16u8) & 0x1f) != 0 {
|
||||||
uses.push(Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)));
|
uses.push(Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)));
|
||||||
|
@ -3170,7 +3172,7 @@ impl Ins {
|
||||||
Opcode::Lfdu => {
|
Opcode::Lfdu => {
|
||||||
let mut uses = vec![
|
let mut uses = vec![
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
];
|
];
|
||||||
|
@ -3192,7 +3194,7 @@ impl Ins {
|
||||||
}
|
}
|
||||||
Opcode::Lfs => {
|
Opcode::Lfs => {
|
||||||
let mut uses = vec![Field::offset(Offset(
|
let mut uses = vec![Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
))];
|
))];
|
||||||
if ((self.code >> 16u8) & 0x1f) != 0 {
|
if ((self.code >> 16u8) & 0x1f) != 0 {
|
||||||
uses.push(Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)));
|
uses.push(Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)));
|
||||||
|
@ -3202,7 +3204,7 @@ impl Ins {
|
||||||
Opcode::Lfsu => {
|
Opcode::Lfsu => {
|
||||||
let mut uses = vec![
|
let mut uses = vec![
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
];
|
];
|
||||||
|
@ -3224,7 +3226,7 @@ impl Ins {
|
||||||
}
|
}
|
||||||
Opcode::Lha => {
|
Opcode::Lha => {
|
||||||
let mut uses = vec![Field::offset(Offset(
|
let mut uses = vec![Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
))];
|
))];
|
||||||
if ((self.code >> 16u8) & 0x1f) != 0 {
|
if ((self.code >> 16u8) & 0x1f) != 0 {
|
||||||
uses.push(Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)));
|
uses.push(Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)));
|
||||||
|
@ -3234,7 +3236,7 @@ impl Ins {
|
||||||
Opcode::Lhau => {
|
Opcode::Lhau => {
|
||||||
let mut uses = vec![
|
let mut uses = vec![
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
];
|
];
|
||||||
|
@ -3263,7 +3265,7 @@ impl Ins {
|
||||||
}
|
}
|
||||||
Opcode::Lhz => {
|
Opcode::Lhz => {
|
||||||
let mut uses = vec![Field::offset(Offset(
|
let mut uses = vec![Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
))];
|
))];
|
||||||
if ((self.code >> 16u8) & 0x1f) != 0 {
|
if ((self.code >> 16u8) & 0x1f) != 0 {
|
||||||
uses.push(Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)));
|
uses.push(Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)));
|
||||||
|
@ -3273,7 +3275,7 @@ impl Ins {
|
||||||
Opcode::Lhzu => {
|
Opcode::Lhzu => {
|
||||||
let mut uses = vec![
|
let mut uses = vec![
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
];
|
];
|
||||||
|
@ -3295,7 +3297,7 @@ impl Ins {
|
||||||
}
|
}
|
||||||
Opcode::Lmw => {
|
Opcode::Lmw => {
|
||||||
let mut uses = vec![Field::offset(Offset(
|
let mut uses = vec![Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
))];
|
))];
|
||||||
if ((self.code >> 16u8) & 0x1f) != 0 {
|
if ((self.code >> 16u8) & 0x1f) != 0 {
|
||||||
uses.push(Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)));
|
uses.push(Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)));
|
||||||
|
@ -3332,7 +3334,7 @@ impl Ins {
|
||||||
}
|
}
|
||||||
Opcode::Lwz => {
|
Opcode::Lwz => {
|
||||||
let mut uses = vec![Field::offset(Offset(
|
let mut uses = vec![Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
))];
|
))];
|
||||||
if ((self.code >> 16u8) & 0x1f) != 0 {
|
if ((self.code >> 16u8) & 0x1f) != 0 {
|
||||||
uses.push(Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)));
|
uses.push(Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)));
|
||||||
|
@ -3342,7 +3344,7 @@ impl Ins {
|
||||||
Opcode::Lwzu => {
|
Opcode::Lwzu => {
|
||||||
let mut uses = vec![
|
let mut uses = vec![
|
||||||
Field::offset(Offset(
|
Field::offset(Offset(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _,
|
||||||
)),
|
)),
|
||||||
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Field::rA(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
];
|
];
|
||||||
|
@ -4963,7 +4965,8 @@ impl Ins {
|
||||||
args: vec![
|
args: vec![
|
||||||
Argument::GPR(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
Argument::GPR(GPR(((self.code >> 21u8) & 0x1f) as _)),
|
||||||
Argument::Simm(Simm(
|
Argument::Simm(Simm(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32)
|
||||||
|
as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
ins: self,
|
ins: self,
|
||||||
|
@ -4997,8 +5000,9 @@ impl Ins {
|
||||||
return SimplifiedIns {
|
return SimplifiedIns {
|
||||||
mnemonic: "blt",
|
mnemonic: "blt",
|
||||||
args: vec![Argument::BranchDest(BranchDest(
|
args: vec![Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000)) << 2u8)
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
as _,
|
as i32)
|
||||||
|
<< 2u8) as _,
|
||||||
))],
|
))],
|
||||||
ins: self,
|
ins: self,
|
||||||
};
|
};
|
||||||
|
@ -5010,7 +5014,8 @@ impl Ins {
|
||||||
args: vec![
|
args: vec![
|
||||||
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
||||||
Argument::BranchDest(BranchDest(
|
Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
|
as i32)
|
||||||
<< 2u8) as _,
|
<< 2u8) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
@ -5024,8 +5029,9 @@ impl Ins {
|
||||||
return SimplifiedIns {
|
return SimplifiedIns {
|
||||||
mnemonic: "ble",
|
mnemonic: "ble",
|
||||||
args: vec![Argument::BranchDest(BranchDest(
|
args: vec![Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000)) << 2u8)
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
as _,
|
as i32)
|
||||||
|
<< 2u8) as _,
|
||||||
))],
|
))],
|
||||||
ins: self,
|
ins: self,
|
||||||
};
|
};
|
||||||
|
@ -5037,7 +5043,8 @@ impl Ins {
|
||||||
args: vec![
|
args: vec![
|
||||||
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
||||||
Argument::BranchDest(BranchDest(
|
Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
|
as i32)
|
||||||
<< 2u8) as _,
|
<< 2u8) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
@ -5051,8 +5058,9 @@ impl Ins {
|
||||||
return SimplifiedIns {
|
return SimplifiedIns {
|
||||||
mnemonic: "beq",
|
mnemonic: "beq",
|
||||||
args: vec![Argument::BranchDest(BranchDest(
|
args: vec![Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000)) << 2u8)
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
as _,
|
as i32)
|
||||||
|
<< 2u8) as _,
|
||||||
))],
|
))],
|
||||||
ins: self,
|
ins: self,
|
||||||
};
|
};
|
||||||
|
@ -5064,7 +5072,8 @@ impl Ins {
|
||||||
args: vec![
|
args: vec![
|
||||||
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
||||||
Argument::BranchDest(BranchDest(
|
Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
|
as i32)
|
||||||
<< 2u8) as _,
|
<< 2u8) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
@ -5078,8 +5087,9 @@ impl Ins {
|
||||||
return SimplifiedIns {
|
return SimplifiedIns {
|
||||||
mnemonic: "bge",
|
mnemonic: "bge",
|
||||||
args: vec![Argument::BranchDest(BranchDest(
|
args: vec![Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000)) << 2u8)
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
as _,
|
as i32)
|
||||||
|
<< 2u8) as _,
|
||||||
))],
|
))],
|
||||||
ins: self,
|
ins: self,
|
||||||
};
|
};
|
||||||
|
@ -5091,7 +5101,8 @@ impl Ins {
|
||||||
args: vec![
|
args: vec![
|
||||||
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
||||||
Argument::BranchDest(BranchDest(
|
Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
|
as i32)
|
||||||
<< 2u8) as _,
|
<< 2u8) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
@ -5105,8 +5116,9 @@ impl Ins {
|
||||||
return SimplifiedIns {
|
return SimplifiedIns {
|
||||||
mnemonic: "bgt",
|
mnemonic: "bgt",
|
||||||
args: vec![Argument::BranchDest(BranchDest(
|
args: vec![Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000)) << 2u8)
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
as _,
|
as i32)
|
||||||
|
<< 2u8) as _,
|
||||||
))],
|
))],
|
||||||
ins: self,
|
ins: self,
|
||||||
};
|
};
|
||||||
|
@ -5118,7 +5130,8 @@ impl Ins {
|
||||||
args: vec![
|
args: vec![
|
||||||
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
||||||
Argument::BranchDest(BranchDest(
|
Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
|
as i32)
|
||||||
<< 2u8) as _,
|
<< 2u8) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
@ -5132,8 +5145,9 @@ impl Ins {
|
||||||
return SimplifiedIns {
|
return SimplifiedIns {
|
||||||
mnemonic: "bne",
|
mnemonic: "bne",
|
||||||
args: vec![Argument::BranchDest(BranchDest(
|
args: vec![Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000)) << 2u8)
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
as _,
|
as i32)
|
||||||
|
<< 2u8) as _,
|
||||||
))],
|
))],
|
||||||
ins: self,
|
ins: self,
|
||||||
};
|
};
|
||||||
|
@ -5145,7 +5159,8 @@ impl Ins {
|
||||||
args: vec![
|
args: vec![
|
||||||
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
||||||
Argument::BranchDest(BranchDest(
|
Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
|
as i32)
|
||||||
<< 2u8) as _,
|
<< 2u8) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
@ -5159,8 +5174,9 @@ impl Ins {
|
||||||
return SimplifiedIns {
|
return SimplifiedIns {
|
||||||
mnemonic: "bso",
|
mnemonic: "bso",
|
||||||
args: vec![Argument::BranchDest(BranchDest(
|
args: vec![Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000)) << 2u8)
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
as _,
|
as i32)
|
||||||
|
<< 2u8) as _,
|
||||||
))],
|
))],
|
||||||
ins: self,
|
ins: self,
|
||||||
};
|
};
|
||||||
|
@ -5172,7 +5188,8 @@ impl Ins {
|
||||||
args: vec![
|
args: vec![
|
||||||
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
||||||
Argument::BranchDest(BranchDest(
|
Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
|
as i32)
|
||||||
<< 2u8) as _,
|
<< 2u8) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
@ -5186,8 +5203,9 @@ impl Ins {
|
||||||
return SimplifiedIns {
|
return SimplifiedIns {
|
||||||
mnemonic: "bns",
|
mnemonic: "bns",
|
||||||
args: vec![Argument::BranchDest(BranchDest(
|
args: vec![Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000)) << 2u8)
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
as _,
|
as i32)
|
||||||
|
<< 2u8) as _,
|
||||||
))],
|
))],
|
||||||
ins: self,
|
ins: self,
|
||||||
};
|
};
|
||||||
|
@ -5199,7 +5217,8 @@ impl Ins {
|
||||||
args: vec![
|
args: vec![
|
||||||
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
Argument::CRField(CRField(((self.code >> 18u8) & 0x7) as _)),
|
||||||
Argument::BranchDest(BranchDest(
|
Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
|
as i32)
|
||||||
<< 2u8) as _,
|
<< 2u8) as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
@ -5210,8 +5229,9 @@ impl Ins {
|
||||||
return SimplifiedIns {
|
return SimplifiedIns {
|
||||||
mnemonic: "bdnz",
|
mnemonic: "bdnz",
|
||||||
args: vec![Argument::BranchDest(BranchDest(
|
args: vec![Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000)) << 2u8)
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
as _,
|
as i32)
|
||||||
|
<< 2u8) as _,
|
||||||
))],
|
))],
|
||||||
ins: self,
|
ins: self,
|
||||||
};
|
};
|
||||||
|
@ -5220,8 +5240,9 @@ impl Ins {
|
||||||
return SimplifiedIns {
|
return SimplifiedIns {
|
||||||
mnemonic: "bdz",
|
mnemonic: "bdz",
|
||||||
args: vec![Argument::BranchDest(BranchDest(
|
args: vec![Argument::BranchDest(BranchDest(
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000)) << 2u8)
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000))
|
||||||
as _,
|
as i32)
|
||||||
|
<< 2u8) as _,
|
||||||
))],
|
))],
|
||||||
ins: self,
|
ins: self,
|
||||||
};
|
};
|
||||||
|
@ -5552,7 +5573,8 @@ impl Ins {
|
||||||
args: vec![
|
args: vec![
|
||||||
Argument::GPR(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Argument::GPR(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Argument::Simm(Simm(
|
Argument::Simm(Simm(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32)
|
||||||
|
as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
ins: self,
|
ins: self,
|
||||||
|
@ -5565,7 +5587,8 @@ impl Ins {
|
||||||
Argument::CRField(CRField(((self.code >> 23u8) & 0x7) as _)),
|
Argument::CRField(CRField(((self.code >> 23u8) & 0x7) as _)),
|
||||||
Argument::GPR(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Argument::GPR(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Argument::Simm(Simm(
|
Argument::Simm(Simm(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32)
|
||||||
|
as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
ins: self,
|
ins: self,
|
||||||
|
@ -5872,7 +5895,8 @@ impl Ins {
|
||||||
args: vec![
|
args: vec![
|
||||||
Argument::GPR(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Argument::GPR(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Argument::Simm(Simm(
|
Argument::Simm(Simm(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32)
|
||||||
|
as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
ins: self,
|
ins: self,
|
||||||
|
@ -5884,7 +5908,8 @@ impl Ins {
|
||||||
args: vec![
|
args: vec![
|
||||||
Argument::GPR(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
Argument::GPR(GPR(((self.code >> 16u8) & 0x1f) as _)),
|
||||||
Argument::Simm(Simm(
|
Argument::Simm(Simm(
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _,
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32)
|
||||||
|
as _,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
ins: self,
|
ins: self,
|
||||||
|
@ -5900,7 +5925,7 @@ impl Ins {
|
||||||
impl Ins {
|
impl Ins {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn field_simm(&self) -> isize {
|
pub fn field_simm(&self) -> isize {
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _
|
||||||
}
|
}
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn field_uimm(&self) -> usize {
|
pub fn field_uimm(&self) -> usize {
|
||||||
|
@ -5908,11 +5933,11 @@ impl Ins {
|
||||||
}
|
}
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn field_offset(&self) -> isize {
|
pub fn field_offset(&self) -> isize {
|
||||||
(((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as _
|
((((self.code & 0xffff) ^ 0x8000).wrapping_sub(0x8000)) as i32) as _
|
||||||
}
|
}
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn field_ps_offset(&self) -> isize {
|
pub fn field_ps_offset(&self) -> isize {
|
||||||
(((self.code & 0xfff) ^ 0x800).wrapping_sub(0x800)) as _
|
((((self.code & 0xfff) ^ 0x800).wrapping_sub(0x800)) as i32) as _
|
||||||
}
|
}
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn field_BO(&self) -> usize {
|
pub fn field_BO(&self) -> usize {
|
||||||
|
@ -5924,11 +5949,11 @@ impl Ins {
|
||||||
}
|
}
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn field_BD(&self) -> isize {
|
pub fn field_BD(&self) -> isize {
|
||||||
(((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000)) << 2u8) as _
|
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000)) as i32) << 2u8) as _
|
||||||
}
|
}
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn field_LI(&self) -> isize {
|
pub fn field_LI(&self) -> isize {
|
||||||
(((((self.code >> 2u8) & 0xffffff) ^ 0x800000).wrapping_sub(0x800000)) << 2u8) as _
|
((((((self.code >> 2u8) & 0xffffff) ^ 0x800000).wrapping_sub(0x800000)) as i32) << 2u8) as _
|
||||||
}
|
}
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn field_SH(&self) -> usize {
|
pub fn field_SH(&self) -> usize {
|
||||||
|
|
|
@ -136,7 +136,7 @@ impl Field {
|
||||||
if self.signed {
|
if self.signed {
|
||||||
let mask2 = 1u32 << (self.bits.0.len() - 1);
|
let mask2 = 1u32 << (self.bits.0.len() - 1);
|
||||||
let mask2 = LitInt::new(&format!("0x{:x}", mask2), Span::call_site());
|
let mask2 = LitInt::new(&format!("0x{:x}", mask2), Span::call_site());
|
||||||
val = quote!(((#val ^ #mask2).wrapping_sub(#mask2)))
|
val = quote!((((#val ^ #mask2).wrapping_sub(#mask2)) as i32))
|
||||||
}
|
}
|
||||||
|
|
||||||
let val_shift = self.shift_left;
|
let val_shift = self.shift_left;
|
||||||
|
|
Loading…
Reference in New Issue