From 93a4f471e7039d4b337c3ba72d056a8949b7b12a Mon Sep 17 00:00:00 2001 From: Lofty Date: Mon, 1 Sep 2025 18:27:41 +0100 Subject: [PATCH 1/2] bump yaxpeax-arch version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b1e7315..5fc99a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ description = "ia64 decoder for the yaxpeax project" readme = "README.md" [dependencies] -yaxpeax-arch = { version = "0.2.2", default-features = false, features = [] } +yaxpeax-arch = { version = "0.3.2", default-features = false, features = [] } bitvec = "0.19" [features] From a9147409113c8624765f8fd551d5e9a947c35a86 Mon Sep 17 00:00:00 2001 From: Lofty Date: Mon, 1 Sep 2025 19:05:58 +0100 Subject: [PATCH 2/2] bump to bitvec 1.0, too --- Cargo.toml | 2 +- src/lib.rs | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5fc99a1..576bb4c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ readme = "README.md" [dependencies] yaxpeax-arch = { version = "0.3.2", default-features = false, features = [] } -bitvec = "0.19" +bitvec = "1.0" [features] default = ["std"] diff --git a/src/lib.rs b/src/lib.rs index da50fc4..9fdfc8d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1728,7 +1728,7 @@ impl Decoder for InstDecoder { fn decode_into::Address, ::Word>>(&self, inst: &mut InstructionBundle, bytes: &mut T) -> Result<(), ::DecodeError> { let mut ia64_word = [0u8; 16]; bytes.next_n(&mut ia64_word)?; - let mut instruction_bytes = bitarr![Lsb0, u8; 0u8; 128]; + let mut instruction_bytes = bitarr![u8, Lsb0; 0u8; 128]; for i in 0..0u64.wrapping_offset(InstructionBundle::min_size()).to_linear() { instruction_bytes[(i * 8)..(i * 8 + 8)].store(ia64_word[i]); } @@ -1742,7 +1742,7 @@ impl Decoder for InstDecoder { ]; let (instruction_types, _) = BUNDLE_TAGS[bundle_tag as usize].ok_or(DecodeError::BadBundle)?; - fn decode_l_instruction(word2: &BitSlice, word: &BitSlice) -> Instruction { + fn decode_l_instruction(word2: &BitSlice, word: &BitSlice) -> Instruction { let tag = word[37..41].load::(); let (opcode, operand_encoding) = get_l_opcode_and_encoding(tag, word); @@ -1761,7 +1761,7 @@ impl Decoder for InstDecoder { } } - fn decode_instruction(word: &BitSlice, ty: InstructionType) -> Instruction { + fn decode_instruction(word: &BitSlice, ty: InstructionType) -> Instruction { let tag = word[37..41].load::(); let ty = if tag >= 8 && (ty == InstructionType::M || ty == InstructionType::I) { @@ -2001,7 +2001,7 @@ fn four_op(dest: Option, op1: Operand, op2: Operand, op3: Operand, op4: Oper (dest, [op1, op2, op3, op4, Operand::None]) } -fn read_l_operands(encoding: OperandEncodingX, word: &BitSlice, word2: &BitSlice) -> (Option, [Operand; 5]) { +fn read_l_operands(encoding: OperandEncodingX, word: &BitSlice, word2: &BitSlice) -> (Option, [Operand; 5]) { use OperandEncodingX::*; match encoding { None => { @@ -2079,7 +2079,7 @@ fn read_l_operands(encoding: OperandEncodingX, word: &BitSlice, word2: } } } -fn read_b_operands(encoding: OperandEncodingB, word: &BitSlice) -> (Option, [Operand; 5]) { +fn read_b_operands(encoding: OperandEncodingB, word: &BitSlice) -> (Option, [Operand; 5]) { use OperandEncodingB::*; match encoding { None => { @@ -2191,7 +2191,7 @@ fn read_b_operands(encoding: OperandEncodingB, word: &BitSlice) -> (Op } } } -fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Option, [Operand; 5]) { +fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Option, [Operand; 5]) { use OperandEncodingF::*; match encoding { None => { @@ -2319,7 +2319,7 @@ fn read_f_operands(encoding: OperandEncodingF, word: &BitSlice) -> (Op }, } } -fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Option, [Operand; 5]) { +fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Option, [Operand; 5]) { use OperandEncodingI::*; match encoding { None => { @@ -2666,7 +2666,7 @@ fn read_i_operands(encoding: OperandEncodingI, word: &BitSlice) -> (Op } } } -fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Option, [Operand; 5]) { +fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Option, [Operand; 5]) { use OperandEncodingM::*; match encoding { None => { unreachable!("none operand encoding"); } @@ -3177,7 +3177,7 @@ fn read_m_operands(encoding: OperandEncodingM, word: &BitSlice) -> (Op } } -fn read_a_operands(encoding: OperandEncodingA, word: &BitSlice) -> (Option, [Operand; 5]) { +fn read_a_operands(encoding: OperandEncodingA, word: &BitSlice) -> (Option, [Operand; 5]) { use OperandEncodingA::*; match encoding { None => { unreachable!("none operand encoding"); } @@ -3309,7 +3309,7 @@ fn read_a_operands(encoding: OperandEncodingA, word: &BitSlice) -> (Op } } -fn get_l_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, OperandEncodingX) { +fn get_l_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, OperandEncodingX) { use Opcode::*; use OperandEncodingX::*; @@ -3350,7 +3350,7 @@ fn get_l_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope } } -fn get_b_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, OperandEncodingB) { +fn get_b_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, OperandEncodingB) { use Opcode::*; use OperandEncodingB::*; @@ -3424,7 +3424,7 @@ fn get_b_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope } } -fn get_f_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, OperandEncodingF) { +fn get_f_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, OperandEncodingF) { use Opcode::*; use OperandEncodingF::*; @@ -3592,7 +3592,7 @@ fn get_f_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope } } -fn get_i_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, OperandEncodingI) { +fn get_i_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, OperandEncodingI) { use Opcode::*; use OperandEncodingI::*; @@ -3811,7 +3811,7 @@ fn get_i_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope } } -fn get_m_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, OperandEncodingM) { +fn get_m_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, OperandEncodingM) { use Opcode::*; use OperandEncodingM::*; @@ -4121,7 +4121,7 @@ fn get_m_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, Ope } } -fn get_a_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, OperandEncodingA) { +fn get_a_opcode_and_encoding(tag: u8, word: &BitSlice) -> (Opcode, OperandEncodingA) { use Opcode::*; use OperandEncodingA::*;