isa: Add missing argument to `bcctr` and `bclr`
This commit is contained in:
parent
d03a713a2b
commit
b90b46ef8e
|
@ -1133,6 +1133,7 @@ pub enum Field {
|
|||
ps_offset(Offset),
|
||||
BO(OpaqueU),
|
||||
BI(OpaqueU),
|
||||
BH(OpaqueU),
|
||||
BD(BranchDest),
|
||||
LI(BranchDest),
|
||||
SH(OpaqueU),
|
||||
|
@ -1176,6 +1177,7 @@ impl Field {
|
|||
Field::ps_offset(x) => Some(Argument::Offset(*x)),
|
||||
Field::BO(x) => Some(Argument::OpaqueU(*x)),
|
||||
Field::BI(x) => Some(Argument::OpaqueU(*x)),
|
||||
Field::BH(x) => Some(Argument::OpaqueU(*x)),
|
||||
Field::BD(x) => Some(Argument::BranchDest(*x)),
|
||||
Field::LI(x) => Some(Argument::BranchDest(*x)),
|
||||
Field::SH(x) => Some(Argument::OpaqueU(*x)),
|
||||
|
@ -1217,6 +1219,7 @@ impl Field {
|
|||
Field::ps_offset(_) => "ps_offset",
|
||||
Field::BO(_) => "BO",
|
||||
Field::BI(_) => "BI",
|
||||
Field::BH(_) => "BH",
|
||||
Field::BD(_) => "BD",
|
||||
Field::LI(_) => "LI",
|
||||
Field::SH(_) => "SH",
|
||||
|
@ -1342,10 +1345,12 @@ impl Ins {
|
|||
Opcode::Bcctr => vec![
|
||||
Field::BO(OpaqueU(((self.code >> 21u8) & 0x1f) as _)),
|
||||
Field::BI(OpaqueU(((self.code >> 16u8) & 0x1f) as _)),
|
||||
Field::BH(OpaqueU(((self.code >> 11u8) & 0x3) as _)),
|
||||
],
|
||||
Opcode::Bclr => vec![
|
||||
Field::BO(OpaqueU(((self.code >> 21u8) & 0x1f) as _)),
|
||||
Field::BI(OpaqueU(((self.code >> 16u8) & 0x1f) as _)),
|
||||
Field::BH(OpaqueU(((self.code >> 11u8) & 0x3) as _)),
|
||||
],
|
||||
Opcode::Cmp => vec![
|
||||
Field::crfD(CRField(((self.code >> 23u8) & 0x7) as _)),
|
||||
|
@ -5948,6 +5953,10 @@ impl Ins {
|
|||
((self.code >> 16u8) & 0x1f) as _
|
||||
}
|
||||
#[inline(always)]
|
||||
pub fn field_BH(&self) -> usize {
|
||||
((self.code >> 11u8) & 0x3) as _
|
||||
}
|
||||
#[inline(always)]
|
||||
pub fn field_BD(&self) -> isize {
|
||||
((((((self.code >> 2u8) & 0x3fff) ^ 0x2000).wrapping_sub(0x2000)) as i32) << 2u8) as _
|
||||
}
|
||||
|
|
7
isa.yaml
7
isa.yaml
|
@ -22,6 +22,9 @@ fields:
|
|||
- name: BI
|
||||
arg: OpaqueU
|
||||
bits: 11..16
|
||||
- name: BH
|
||||
arg: OpaqueU
|
||||
bits: 19..21
|
||||
- name: BD
|
||||
arg: BranchDest
|
||||
bits: 16..30
|
||||
|
@ -289,7 +292,7 @@ opcodes:
|
|||
bitmask: 0xfc007ffe
|
||||
pattern: 0x4c000420
|
||||
modifiers: [ LK ]
|
||||
args: [ BO, BI ]
|
||||
args: [ BO, BI, BH ]
|
||||
uses: [ ctr ]
|
||||
|
||||
- name: bclr
|
||||
|
@ -297,7 +300,7 @@ opcodes:
|
|||
bitmask: 0xfc007ffe
|
||||
pattern: 0x4c000020
|
||||
modifiers: [ LK ]
|
||||
args: [ BO, BI ]
|
||||
args: [ BO, BI, BH ]
|
||||
uses: [ lr ]
|
||||
|
||||
- name: cmp
|
||||
|
|
Loading…
Reference in New Issue