From cb80922d38525780dfb204856972394d20b5bdfa Mon Sep 17 00:00:00 2001 From: Jean-Marie Mineau Date: Wed, 17 Jul 2024 21:19:20 +0200 Subject: [PATCH] WIP --- androscalpel/src/dex_writer.rs | 195 +- androscalpel/src/instructions.rs | 3767 ++++++------------------------ 2 files changed, 775 insertions(+), 3187 deletions(-) diff --git a/androscalpel/src/dex_writer.rs b/androscalpel/src/dex_writer.rs index e3e9ae9..0c3c2b7 100644 --- a/androscalpel/src/dex_writer.rs +++ b/androscalpel/src/dex_writer.rs @@ -445,19 +445,11 @@ impl DexWriter { } Instruction::ConstString { .. } => { let size = ins - .get_raw_ins( - Some(&self.strings), - None, - None, - None, - None, - None, - None, - None, - None, - None, - ) - .with_context(|| format!("In code of {}", method_id.__repr__()))? + .get_raw_ins(GetRawInsParam { + strings: Some(&self.strings), + ..GetRawInsParam::default() + }) + .with_context(|| format!("Error in code of {}", method_id.__repr__()))? .size() / 2; min_addr += size; @@ -481,18 +473,10 @@ impl DexWriter { } Instruction::ConstString { .. } => { addr += ins - .get_raw_ins( - Some(&self.strings), - None, - None, - None, - None, - None, - None, - None, - None, - None, - )? + .get_raw_ins(GetRawInsParam { + strings: Some(&self.strings), + ..GetRawInsParam::default() + })? .size() / 2; // should not fail after @@ -539,45 +523,43 @@ impl DexWriter { // https://cs.android.com/android/platform/superproject/main/+/main:art/runtime/verifier/method_verifier.cc;drc=e8c3e7be783937a340cd4f3280b69962d6f1ea0c;l=1347 // The ART check if the array data table is 4 bytes aligned (= 2 ins alligned) // TODO: check how it is donne in android and other dex generation code. - let nop = (Instruction::Nop {}).get_raw_ins( - None, None, None, None, None, None, None, None, None, None, - )?; + let nop = (Instruction::Nop {}).get_raw_ins(GetRawInsParam::default())?; payload_addr += nop.size() / 2; payloads.push(nop); } let data_offset = payload_addr as i32 - addr as i32; payload_addr += payload.size() / 2; payloads.push(payload); - let ins = ins.get_raw_ins( - None, - None, - None, - None, - None, - None, - None, - None, - None, - Some(data_offset), - )?; + let ins = ins + .get_raw_ins(GetRawInsParam { + data_offset: Some(data_offset), + ..GetRawInsParam::default() + }) + .with_context(|| { + format!( + "Failed to convert instruction {} (found in code of {}) to raw instruction", + ins.__repr__(), + method_id.__repr__() + ) + })?; addr += ins.size() / 2; insns.push(ins); } Instruction::Goto { .. } => { let goto_size = goto_sizes[goto_idx]; goto_idx += 1; - let ins = ins.get_raw_ins( - None, - None, - None, - None, - None, - None, - None, - Some((addr, &label_addrs)), - Some(goto_size), - None, - )?; + let ins = ins.get_raw_ins(GetRawInsParam { + jump_data: Some((addr, &label_addrs)), + goto_size: Some(goto_size), + ..GetRawInsParam::default() + }) + .with_context(|| { + format!( + "Failed to convert instruction {} (found in code of {}) to raw instruction", + ins.__repr__(), + method_id.__repr__() + ) + })?; addr += ins.size() / 2; insns.push(ins); } @@ -608,63 +590,58 @@ impl DexWriter { // https://cs.android.com/android/platform/superproject/main/+/main:art/runtime/verifier/method_verifier.cc;drc=e8c3e7be783937a340cd4f3280b69962d6f1ea0c;l=1464 // The ART check if the switch table is 4 bytes aligned (= 2 ins alligned) // TODO: check how it is donne in android and other dex generation code. - let nop = (Instruction::Nop {}).get_raw_ins( - None, None, None, None, None, None, None, None, None, None, - )?; + let nop = (Instruction::Nop {}).get_raw_ins(GetRawInsParam::default())?; payload_addr += nop.size() / 2; payloads.push(nop); } let data_offset = payload_addr as i32 - addr as i32; payload_addr += payload.size() / 2; payloads.push(payload); - let ins = ins.get_raw_ins( - None, - None, - None, - None, - None, - None, - None, - None, - None, - Some(data_offset), - )?; + let ins = ins.get_raw_ins(GetRawInsParam { + data_offset: Some(data_offset), + ..GetRawInsParam::default() + }) + .with_context(|| { + format!( + "Failed to convert instruction {} (found in code of {}) to raw instruction", + ins.__repr__(), + method_id.__repr__() + ) + })?; addr += ins.size() / 2; insns.push(ins); } Instruction::InvokeCustom { call_site, .. } => { let call_site_idx = self.call_site_ids.len(); self.insert_call_site_item(&call_site)?; - let ins = ins.get_raw_ins( - None, - None, - None, - None, - None, - Some(call_site_idx), - None, - None, - None, - None, - )?; + let ins = ins.get_raw_ins(GetRawInsParam { + call_site_idx: Some(call_site_idx), + ..GetRawInsParam::default() + }) + .with_context(|| { + format!( + "Failed to convert instruction {} (found in code of {}) to raw instruction", + ins.__repr__(), + method_id.__repr__() + ) + })?; addr += ins.size() / 2; insns.push(ins); } Instruction::ConstMethodHandle { handle, .. } => { let method_handle_idx = self.method_handles.len(); self.insert_method_handle(&handle)?; - let ins = ins.get_raw_ins( - None, - None, - None, - None, - None, - None, - Some(method_handle_idx), - None, - None, - None, - )?; + let ins = ins.get_raw_ins(GetRawInsParam { + method_handle_idx: Some(method_handle_idx), + ..GetRawInsParam::default() + }) + .with_context(|| { + format!( + "Failed to convert instruction {} (found in code of {}) to raw instruction", + ins.__repr__(), + method_id.__repr__() + ) + })?; addr += ins.size() / 2; insns.push(ins); } @@ -728,24 +705,21 @@ impl DexWriter { Instruction::Label { .. } => (), _ => { let ins = ins - .get_raw_ins( - Some(&self.strings), - Some(&self.type_ids), - Some(&self.field_ids), - Some(&self.method_ids), - Some(&self.proto_ids), - None, - None, - Some((addr, &label_addrs)), - None, - None, - ) + .get_raw_ins(GetRawInsParam { + strings: Some(&self.strings), + type_ids: Some(&self.type_ids), + field_ids: Some(&self.field_ids), + method_ids: Some(&self.method_ids), + proto_ids: Some(&self.proto_ids), + jump_data: Some((addr, &label_addrs)), + ..GetRawInsParam::default() + }) .with_context(|| { format!( - "Failed to convert instruction {} (found in code of {}) to raw instruction", - ins.__repr__(), - method_id.__repr__() - ) + "Failed to convert instruction {} (found in code of {}) to raw instruction", + ins.__repr__(), + method_id.__repr__() + ) })?; addr += ins.size() / 2; insns.push(ins); @@ -754,8 +728,7 @@ impl DexWriter { } if addr % 2 != 0 { // make sure the payload section is 4 bytes aligned - let nop = (Instruction::Nop {}) - .get_raw_ins(None, None, None, None, None, None, None, None, None, None)?; + let nop = (Instruction::Nop {}).get_raw_ins(GetRawInsParam::default())?; //addr += nop.size() / 2; insns.push(nop); } @@ -796,10 +769,10 @@ impl DexWriter { self.debug_info_items.push(item); debug_info_off + 1 }; - let handlers = if handlers.list.is_empty() { + let handlers = if encoded_handlers.list.is_empty() { None } else { - Some(handlers) + Some(encoded_handlers) }; let item = CodeItem { registers_size: code.registers_size, diff --git a/androscalpel/src/instructions.rs b/androscalpel/src/instructions.rs index 0a2dd71..bfd40c7 100644 --- a/androscalpel/src/instructions.rs +++ b/androscalpel/src/instructions.rs @@ -3652,7 +3652,9 @@ impl Instruction { Self::ConstMethodType { .. } => Ok(4), Self::Try { .. } => Ok(0), Self::Label { .. } => Ok(0), - _ => self.get_raw_ins().map(|ins| ins.size()), + _ => self + .get_raw_ins(GetRawInsParam::default()) + .map(|ins| ins.size()), } } @@ -4019,12 +4021,29 @@ impl Instruction { } } +#[derive(Debug, Default)] +pub struct GetRawInsParam<'a> { + pub strings: Option<&'a HashMap>, + pub type_ids: Option<&'a HashMap>, + pub field_ids: Option<&'a HashMap>, + pub method_ids: Option<&'a HashMap>, + pub proto_ids: Option<&'a HashMap>, + pub call_site_idx: Option, + pub method_handle_idx: Option, + pub jump_data: Option<(usize, &'a HashMap)>, + pub goto_size: Option, + pub data_offset: Option, +} + impl Instruction { /// Return the raw instruction ([`InsFormat`]) when it does not need additionnal data. /// /// Some instruction require additional data, provided as options. If the required information /// is not provided, the method will return an error. /// + /// The parameters of the functions are pass as a [`GetRawInsParam`] to make is easier track + /// which parameter is which and make it easier to pass only one or two values. + /// /// # Variants that require `strings` /// /// `strings` is a lookup table that associate its idx to a string. @@ -4143,59 +4162,17 @@ impl Instruction { /// - `Try` /// - `Label` /// - pub fn get_raw_ins( - &self, - strings: Option<&HashMap>, - type_ids: Option<&HashMap>, - field_ids: Option<&HashMap>, - method_ids: Option<&HashMap>, - proto_ids: Option<&HashMap>, - call_site_idx: Option, - method_handle_idx: Option, - jump_data: Option<(usize, &HashMap)>, - goto_size: Option, - data_offset: Option, - ) -> Result { - match ( - self, - strings, - type_ids, - field_ids, - method_ids, - proto_ids, - call_site_idx, - method_handle_idx, - jump_data, - goto_size, - data_offset, - ) { - ( - Self::ConstString { .. }, - None, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Err(anyhow!( + pub fn get_raw_ins(&self, param: GetRawInsParam) -> Result { + match (self, param) { + (Self::ConstString { .. }, GetRawInsParam { strings: None, .. }) => Err(anyhow!( "Cannot get the raw instruction of a const-string without knowing the string idx" )), ( Self::ConstString { reg, lit }, - Some(strings), - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + strings: Some(strings), + .. + }, ) => { let string_idx = strings.get(lit).ok_or(anyhow!( "String {} not found in dex builder", @@ -4214,33 +4191,15 @@ impl Instruction { }), } } - ( - Self::ConstClass { .. }, - _strings, - None, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Err(anyhow!( + (Self::ConstClass { .. }, GetRawInsParam { type_ids: None, .. }) => Err(anyhow!( "Cannot get the raw instruction of a const-class without knowing the class idx" )), ( Self::ConstClass { reg, lit }, - _strings, - Some(types), - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + type_ids: Some(types), + .. + }, ) => Ok(InsFormat::Format21C { op: 0x1c, va: *reg, @@ -4249,33 +4208,15 @@ impl Instruction { .ok_or(anyhow!("Class {} not found in dex builder", lit.__repr__(),))? as u16, }), - ( - Self::CheckCast { .. }, - _strings, - None, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Err(anyhow!( + (Self::CheckCast { .. }, GetRawInsParam { type_ids: None, .. }) => Err(anyhow!( "Cannot get the raw instruction of a check-cast without knowing the type idx" )), ( Self::CheckCast { reg, lit }, - _strings, - Some(types), - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + type_ids: Some(types), + .. + }, ) => Ok(InsFormat::Format21C { op: 0x1f, va: *reg, @@ -4284,33 +4225,15 @@ impl Instruction { .ok_or(anyhow!("Class {} not found in dex builder", lit.__repr__(),))? as u16, }), - ( - Self::InstanceOf { .. }, - _strings, - None, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Err(anyhow!( + (Self::InstanceOf { .. }, GetRawInsParam { type_ids: None, .. }) => Err(anyhow!( "Cannot get the raw instruction of a instance-of without knowing the type idx" )), ( Self::InstanceOf { dest, obj, lit }, - _strings, - Some(types), - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + type_ids: Some(types), + .. + }, ) => Ok(InsFormat::Format22C { op: 0x20, va: *dest, @@ -4320,33 +4243,15 @@ impl Instruction { .ok_or(anyhow!("Class {} not found in dex builder", lit.__repr__(),))? as u16, }), - ( - Self::NewInstance { .. }, - _strings, - None, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Err(anyhow!( + (Self::NewInstance { .. }, GetRawInsParam { type_ids: None, .. }) => Err(anyhow!( "Cannot get the raw instruction of a new-instance without knowing the class idx" )), ( Self::NewInstance { reg, lit }, - _strings, - Some(types), - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + type_ids: Some(types), + .. + }, ) => Ok(InsFormat::Format21C { op: 0x22, va: *reg, @@ -4355,33 +4260,15 @@ impl Instruction { .ok_or(anyhow!("Class {} not found in dex builder", lit.__repr__(),))? as u16, }), - ( - Self::NewArray { .. }, - _strings, - None, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Err(anyhow!( + (Self::NewArray { .. }, GetRawInsParam { type_ids: None, .. }) => Err(anyhow!( "Cannot get the raw instruction of a new-array without knowing the type idx" )), ( Self::NewArray { reg, size_reg, lit }, - _strings, - Some(types), - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + type_ids: Some(types), + .. + }, ) => Ok(InsFormat::Format22C { op: 0x23, va: *reg, @@ -4391,33 +4278,15 @@ impl Instruction { .ok_or(anyhow!("Type {} not found in dex builder", lit.__repr__(),))? as u16, }), - ( - Self::FilledNewArray { .. }, - _strings, - None, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Err(anyhow!( + (Self::FilledNewArray { .. }, GetRawInsParam { type_ids: None, .. }) => Err(anyhow!( "Cannot get the raw instruction of a filled-new-array without knowing the type idx" )), ( Self::FilledNewArray { reg_values, type_ }, - _strings, - Some(types), - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + type_ids: Some(types), + .. + }, ) => { let mut last = None; let mut first = None; @@ -4486,32 +4355,19 @@ impl Instruction { } ( Self::FillArrayData { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - None, + GetRawInsParam { + data_offset: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a fill-array-data without knowing the offset \ to the -fill-array-data-payload" )), ( Self::FillArrayData { arr, .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - Some(data_offset), + GetRawInsParam { + data_offset: Some(data_offset), + .. + }, ) => Ok(InsFormat::Format31T { op: 0x26, va: *arr, @@ -4519,46 +4375,27 @@ impl Instruction { }), ( Self::Goto { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - None, - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: None, .. + }, ) => Err(anyhow!( "Cannot get the size of a goto without knowing the branch offset" )), ( Self::Goto { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - None, - _data_offset, + GetRawInsParam { + goto_size: None, .. + }, ) => Err(anyhow!( "Cannot get the size of a goto without knowing the size of the instruction" )), ( Self::Goto { label }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - Some((addr, label_addrs)), - Some(goto_size), - _data_offset, + GetRawInsParam { + jump_data: Some((addr, label_addrs)), + goto_size: Some(goto_size), + .. + }, ) => { let label_addr = label_addrs.get(label).ok_or(anyhow!( "Label {} not found, but found goto with this label", @@ -4588,32 +4425,19 @@ impl Instruction { } ( Self::Switch { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - None, + GetRawInsParam { + data_offset: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a switch without knowing the offset \ to the packed/sparse-switch-payload" )), ( Self::Switch { reg, .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - Some(data_offset), + GetRawInsParam { + data_offset: Some(data_offset), + .. + }, ) => Ok(InsFormat::Format31T { op: if self.is_packed()? { 0x2b } else { 0x2c }, va: *reg, @@ -4621,1309 +4445,710 @@ impl Instruction { }), ( Self::IfEq { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - None, - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a if-eq without knowing \ the offset to the branch" )), ( Self::IfNe { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - None, - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a if-ne without knowing \ the offset to the branch" )), ( Self::IfLt { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - None, - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a if-lt without knowing \ the offset to the branch" )), ( Self::IfGe { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - None, - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a if-ge without knowing \ the offset to the branch" )), ( Self::IfGt { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - None, - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a if-gt without knowing \ the offset to the branch" )), ( Self::IfLe { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - None, - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a if-le without knowing \ the offset to the branch" )), ( Self::IfEqZ { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - None, - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a if-eqz without knowing \ the offset to the branch" )), ( Self::IfNeZ { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - None, - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a if-nez without knowing \ the offset to the branch" )), ( Self::IfLtZ { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - None, - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a if-ltz without knowing \ the offset to the branch" )), ( Self::IfGeZ { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - None, - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a if-gez without knowing \ the offset to the branch" )), ( Self::IfGtZ { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - None, - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a if-gtz without knowing \ the offset to the branch" )), ( Self::IfLeZ { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - None, - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a if-lez without knowing \ the offset to the branch" )), ( Self::IfEq { a, b, label }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - Some((addr, label_addrs)), - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: Some((addr, label_addrs)), + .. + }, ) => raw_ins_if!(0x32, label_addrs, label, addr, a, b), ( Self::IfNe { a, b, label }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - Some((addr, label_addrs)), - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: Some((addr, label_addrs)), + .. + }, ) => raw_ins_if!(0x33, label_addrs, label, addr, a, b), ( Self::IfLt { a, b, label }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - Some((addr, label_addrs)), - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: Some((addr, label_addrs)), + .. + }, ) => raw_ins_if!(0x34, label_addrs, label, addr, a, b), ( Self::IfGe { a, b, label }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - Some((addr, label_addrs)), - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: Some((addr, label_addrs)), + .. + }, ) => raw_ins_if!(0x35, label_addrs, label, addr, a, b), ( Self::IfGt { a, b, label }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - Some((addr, label_addrs)), - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: Some((addr, label_addrs)), + .. + }, ) => raw_ins_if!(0x36, label_addrs, label, addr, a, b), ( Self::IfLe { a, b, label }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - Some((addr, label_addrs)), - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: Some((addr, label_addrs)), + .. + }, ) => raw_ins_if!(0x37, label_addrs, label, addr, a, b), ( Self::IfEqZ { a, label }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - Some((addr, label_addrs)), - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: Some((addr, label_addrs)), + .. + }, ) => raw_ins_ifz!(0x38, label_addrs, label, addr, a), ( Self::IfNeZ { a, label }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - Some((addr, label_addrs)), - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: Some((addr, label_addrs)), + .. + }, ) => raw_ins_ifz!(0x39, label_addrs, label, addr, a), ( Self::IfLtZ { a, label }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - Some((addr, label_addrs)), - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: Some((addr, label_addrs)), + .. + }, ) => raw_ins_ifz!(0x3a, label_addrs, label, addr, a), ( Self::IfGeZ { a, label }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - Some((addr, label_addrs)), - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: Some((addr, label_addrs)), + .. + }, ) => raw_ins_ifz!(0x3b, label_addrs, label, addr, a), ( Self::IfGtZ { a, label }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - Some((addr, label_addrs)), - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: Some((addr, label_addrs)), + .. + }, ) => raw_ins_ifz!(0x3c, label_addrs, label, addr, a), ( Self::IfLeZ { a, label }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - Some((addr, label_addrs)), - _goto_size, - _data_offset, + GetRawInsParam { + jump_data: Some((addr, label_addrs)), + .. + }, ) => raw_ins_ifz!(0x3b, label_addrs, label, addr, a), ( Self::IGet { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a iget without knowing the field idx" )), ( Self::IGetWide { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a iget-wide without knowing the field idx" )), ( Self::IGetObject { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a iget-object without knowing the field idx" )), ( Self::IGetBoolean { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a iget-boolean without knowing the field idx" )), ( Self::IGetByte { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a iget-byte without knowing the field idx" )), ( Self::IGetChar { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a iget-char without knowing the field idx" )), ( Self::IGetShort { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a iget-short without knowing the field idx" )), ( Self::IPut { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a iput without knowing the field idx" )), ( Self::IPutWide { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a iput-wide without knowing the field idx" )), ( Self::IPutObject { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a iput-object without knowing the field idx" )), ( Self::IPutBoolean { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a iput-boolean without knowing the field idx" )), ( Self::IPutByte { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a iput-byte without knowing the field idx" )), ( Self::IPutChar { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a iput-char without knowing the field idx" )), ( Self::IPutShort { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a iput-short without knowing the field idx" )), ( Self::IGet { to, obj, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_iget_put!(0x52, fields, field, to, obj), ( Self::IGetWide { to, obj, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_iget_put!(0x53, fields, field, to, obj), ( Self::IGetObject { to, obj, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_iget_put!(0x54, fields, field, to, obj), ( Self::IGetBoolean { to, obj, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_iget_put!(0x55, fields, field, to, obj), ( Self::IGetByte { to, obj, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_iget_put!(0x56, fields, field, to, obj), ( Self::IGetChar { to, obj, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_iget_put!(0x57, fields, field, to, obj), ( Self::IGetShort { to, obj, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_iget_put!(0x58, fields, field, to, obj), ( Self::IPut { from, obj, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_iget_put!(0x59, fields, field, from, obj), ( Self::IPutWide { from, obj, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_iget_put!(0x5a, fields, field, from, obj), ( Self::IPutObject { from, obj, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_iget_put!(0x5b, fields, field, from, obj), ( Self::IPutBoolean { from, obj, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_iget_put!(0x5c, fields, field, from, obj), ( Self::IPutByte { from, obj, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_iget_put!(0x5d, fields, field, from, obj), ( Self::IPutChar { from, obj, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_iget_put!(0x5e, fields, field, from, obj), ( Self::IPutShort { from, obj, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_iget_put!(0x5f, fields, field, from, obj), ( Self::SGet { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a sget without knowing the field idx" )), ( Self::SGetWide { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a sget-wide without knowing the field idx" )), ( Self::SGetObject { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a sget-object without knowing the field idx" )), ( Self::SGetBoolean { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a sget-boolean without knowing the field idx" )), ( Self::SGetByte { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a sget-byte without knowing the field idx" )), ( Self::SGetChar { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a sget-char without knowing the field idx" )), ( Self::SGetShort { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a sget-short without knowing the field idx" )), ( Self::SPut { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a sput without knowing the field idx" )), ( Self::SPutWide { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a sput-wide without knowing the field idx" )), ( Self::SPutObject { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a sput-object without knowing the field idx" )), ( Self::SPutBoolean { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a sput-boolean without knowing the field idx" )), ( Self::SPutByte { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a sput-byte without knowing the field idx" )), ( Self::SPutChar { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a sput-char without knowing the field idx" )), ( Self::SPutShort { .. }, - _strings, - _types, - None, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a sput-short without knowing the field idx" )), ( Self::SGet { to, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_sget_put!(0x60, fields, field, to), ( Self::SGetWide { to, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_sget_put!(0x61, fields, field, to), ( Self::SGetObject { to, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_sget_put!(0x62, fields, field, to), ( Self::SGetBoolean { to, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_sget_put!(0x63, fields, field, to), ( Self::SGetByte { to, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_sget_put!(0x64, fields, field, to), ( Self::SGetChar { to, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_sget_put!(0x65, fields, field, to), ( Self::SGetShort { to, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_sget_put!(0x66, fields, field, to), ( Self::SPut { from, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_sget_put!(0x67, fields, field, from), ( Self::SPutWide { from, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_sget_put!(0x68, fields, field, from), ( Self::SPutObject { from, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_sget_put!(0x69, fields, field, from), ( Self::SPutBoolean { from, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_sget_put!(0x6a, fields, field, from), ( Self::SPutByte { from, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_sget_put!(0x6b, fields, field, from), ( Self::SPutChar { from, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_sget_put!(0x6c, fields, field, from), ( Self::SPutShort { from, field }, - _strings, - _types, - Some(fields), - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + field_ids: Some(fields), + .. + }, ) => raw_ins_sget_put!(0x6d, fields, field, from), ( Self::InvokeVirtual { .. }, - _strings, - _types, - _fields, - None, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + method_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a invoke-virtual without knowing \ the method idx" )), ( Self::InvokeSuper { .. }, - _strings, - _types, - _fields, - None, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + method_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a invoke-super without knowing \ the method idx" )), ( Self::InvokeDirect { .. }, - _strings, - _types, - _fields, - None, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + method_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a invoke-direct without knowing \ the method idx" )), ( Self::InvokeStatic { .. }, - _strings, - _types, - _fields, - None, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + method_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a invoke-static without knowing \ the method idx" )), ( Self::InvokeInterface { .. }, - _strings, - _types, - _fields, - None, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + method_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a invoke-interface without knowing \ the method idx" )), ( Self::InvokeVirtual { args, method }, - _strings, - _types, - _fields, - Some(methods), - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + method_ids: Some(methods), + .. + }, ) => raw_ins_invoke!(0x6e, 0x74, methods, method, args), ( Self::InvokeSuper { args, method }, - _strings, - _types, - _fields, - Some(methods), - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + method_ids: Some(methods), + .. + }, ) => raw_ins_invoke!(0x6f, 0x75, methods, method, args), ( Self::InvokeDirect { args, method }, - _strings, - _types, - _fields, - Some(methods), - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + method_ids: Some(methods), + .. + }, ) => raw_ins_invoke!(0x70, 0x76, methods, method, args), ( Self::InvokeStatic { args, method }, - _strings, - _types, - _fields, - Some(methods), - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + method_ids: Some(methods), + .. + }, ) => raw_ins_invoke!(0x71, 0x77, methods, method, args), ( Self::InvokeInterface { args, method }, - _strings, - _types, - _fields, - Some(methods), - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + method_ids: Some(methods), + .. + }, ) => raw_ins_invoke!(0x72, 0x78, methods, method, args), ( Self::InvokePolymorphic { .. }, - _strings, - _types, - _fields, - None, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + method_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a invoke-polymorphic without knowing \ the method idx" )), ( Self::InvokePolymorphic { .. }, - _strings, - _types, - _fields, - _methods, - None, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + proto_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a invoke-polymorphic without knowing \ the proto idx" @@ -5934,16 +5159,11 @@ impl Instruction { method, proto, }, - _strings, - _types, - _fields, - Some(methods), - Some(protos), - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + method_ids: Some(methods), + proto_ids: Some(protos), + .. + }, ) => { let meth_idx = methods.get(method).ok_or(anyhow!( "Method {} (method of class {}) not found in dex builder", @@ -6027,32 +5247,20 @@ impl Instruction { } ( Self::InvokeCustom { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - None, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + call_site_idx: None, + .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a invoke-custom without knowing the \ call site idx" )), ( Self::InvokeCustom { args, .. }, - _strings, - _types, - _fields, - _methods, - _protos, - Some(call_site_idx), - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + call_site_idx: Some(call_site_idx), + .. + }, ) => { let mut last = None; let mut first = None; @@ -6115,32 +5323,20 @@ impl Instruction { } ( Self::ConstMethodHandle { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - None, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + method_handle_idx: None, + .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a const-method-handle \ without knowing the method handle idx" )), ( Self::ConstMethodHandle { to, .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - Some(handle_idx), - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + method_handle_idx: Some(handle_idx), + .. + }, ) => Ok(InsFormat::Format21C { op: 0xfe, va: *to, @@ -6148,32 +5344,19 @@ impl Instruction { }), ( Self::ConstMethodType { .. }, - _strings, - _types, - _fields, - _methods, - None, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + proto_ids: None, .. + }, ) => Err(anyhow!( "Cannot get the raw instruction of a const-method-type \ without knowing the proto idx" )), ( Self::ConstMethodType { to, proto }, - _strings, - _types, - _fields, - _methods, - Some(protos), - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, + GetRawInsParam { + proto_ids: Some(protos), + .. + }, ) => { let proto_idx = protos.get(proto).ok_or(anyhow!( "Prototype {} not found in dex builder", @@ -6185,60 +5368,14 @@ impl Instruction { b: *proto_idx as u16, }) } - ( - Self::Try { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Err(anyhow!( + (Self::Try { .. }, GetRawInsParam { .. }) => Err(anyhow!( "Try instruction cannot be converted to raw instruction" )), - ( - Self::Label { .. }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Err(anyhow!("Label cannot be converted to raw instruction")), - ( - Self::Nop {}, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format10X { op: 0x00 }), - ( - Self::Move { from, to }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => match (to, from) { + (Self::Label { .. }, GetRawInsParam { .. }) => { + Err(anyhow!("Label cannot be converted to raw instruction")) + } + (Self::Nop {}, GetRawInsParam { .. }) => Ok(InsFormat::Format10X { op: 0x00 }), + (Self::Move { from, to }, GetRawInsParam { .. }) => match (to, from) { (0..=0b0000_1111, 0..=0b0000_1111) => Ok(InsFormat::Format12X { op: 0x01, va: *to as u8, @@ -6255,19 +5392,7 @@ impl Instruction { vb: *from, }), }, - ( - Self::MoveWide { from, to }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => match (to, from) { + (Self::MoveWide { from, to }, GetRawInsParam { .. }) => match (to, from) { (0..=0b0000_1111, 0..=0b0000_1111) => Ok(InsFormat::Format12X { op: 0x04, va: *to as u8, @@ -6284,19 +5409,7 @@ impl Instruction { vb: *from, }), }, - ( - Self::MoveObject { from, to }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => match (to, from) { + (Self::MoveObject { from, to }, GetRawInsParam { .. }) => match (to, from) { (0..=0b0000_1111, 0..=0b0000_1111) => Ok(InsFormat::Format12X { op: 0x07, va: *to as u8, @@ -6313,123 +5426,29 @@ impl Instruction { vb: *from, }), }, - ( - Self::MoveResult { to }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format11X { op: 0x0a, va: *to }), - ( - Self::MoveResultWide { to }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format11X { op: 0x0b, va: *to }), - ( - Self::MoveResultObject { to }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format11X { op: 0x0c, va: *to }), - ( - Self::MoveException { to }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format11X { op: 0x0d, va: *to }), - ( - Self::ReturnVoid {}, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format10X { op: 0x0e }), - ( - Self::Return { reg }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format11X { op: 0x0f, va: *reg }), - ( - Self::ReturnWide { reg }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format11X { op: 0x10, va: *reg }), - ( - Self::ReturnObject { reg }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format11X { op: 0x11, va: *reg }), - ( - Self::Const { lit, reg }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => match (reg, lit) { + (Self::MoveResult { to }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format11X { op: 0x0a, va: *to }) + } + (Self::MoveResultWide { to }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format11X { op: 0x0b, va: *to }) + } + (Self::MoveResultObject { to }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format11X { op: 0x0c, va: *to }) + } + (Self::MoveException { to }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format11X { op: 0x0d, va: *to }) + } + (Self::ReturnVoid {}, GetRawInsParam { .. }) => Ok(InsFormat::Format10X { op: 0x0e }), + (Self::Return { reg }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format11X { op: 0x0f, va: *reg }) + } + (Self::ReturnWide { reg }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format11X { op: 0x10, va: *reg }) + } + (Self::ReturnObject { reg }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format11X { op: 0x11, va: *reg }) + } + (Self::Const { lit, reg }, GetRawInsParam { .. }) => match (reg, lit) { (0..=0b0000_1111, -8..=7) => Ok(InsFormat::Format11N { op: 0x12, va: *reg, @@ -6451,19 +5470,7 @@ impl Instruction { b: *lit, }), }, - ( - Self::ConstWide { lit, reg }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => match lit { + (Self::ConstWide { lit, reg }, GetRawInsParam { .. }) => match lit { I16_MIN_AS_I64..=I16_MAX_AS_I64 => Ok(InsFormat::Format21S { op: 0x16, va: *reg, @@ -6485,1894 +5492,620 @@ impl Instruction { b: *lit, }), }, - ( - Self::MonitorEnter { reg }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format11X { op: 0x1d, va: *reg }), - ( - Self::MonitorExit { reg }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format11X { op: 0x1e, va: *reg }), - ( - Self::ArrayLength { dest, arr }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::MonitorEnter { reg }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format11X { op: 0x1d, va: *reg }) + } + (Self::MonitorExit { reg }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format11X { op: 0x1e, va: *reg }) + } + (Self::ArrayLength { dest, arr }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x21, va: *dest, vb: *arr, }), - ( - Self::Throw { reg }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format11X { op: 0x27, va: *reg }), - ( - Self::CmpLFloat { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::Throw { reg }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format11X { op: 0x27, va: *reg }) + } + (Self::CmpLFloat { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x2d, va: *dest, vb: *b, vc: *c, }), - ( - Self::CmpGFloat { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::CmpGFloat { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x2e, va: *dest, vb: *b, vc: *c, }), - ( - Self::CmpLDouble { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::CmpLDouble { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x2f, va: *dest, vb: *b, vc: *c, }), - ( - Self::CmpGDouble { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::CmpGDouble { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x30, va: *dest, vb: *b, vc: *c, }), - ( - Self::CmpLong { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::CmpLong { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x31, va: *dest, vb: *b, vc: *c, }), - ( - Self::AGet { dest, arr, idx }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::AGet { dest, arr, idx }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x44, va: *dest, vb: *arr, vc: *idx, }), - ( - Self::AGetWide { dest, arr, idx }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { - op: 0x45, - va: *dest, - vb: *arr, - vc: *idx, - }), - ( - Self::AGetObject { dest, arr, idx }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { - op: 0x46, - va: *dest, - vb: *arr, - vc: *idx, - }), - ( - Self::AGetBoolean { dest, arr, idx }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { - op: 0x47, - va: *dest, - vb: *arr, - vc: *idx, - }), - ( - Self::AGetByte { dest, arr, idx }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { - op: 0x48, - va: *dest, - vb: *arr, - vc: *idx, - }), - ( - Self::AGetChar { dest, arr, idx }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { - op: 0x49, - va: *dest, - vb: *arr, - vc: *idx, - }), - ( - Self::AGetShort { dest, arr, idx }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { - op: 0x4a, - va: *dest, - vb: *arr, - vc: *idx, - }), - ( - Self::APut { from, arr, idx }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::AGetWide { dest, arr, idx }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format23X { + op: 0x45, + va: *dest, + vb: *arr, + vc: *idx, + }) + } + (Self::AGetObject { dest, arr, idx }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format23X { + op: 0x46, + va: *dest, + vb: *arr, + vc: *idx, + }) + } + (Self::AGetBoolean { dest, arr, idx }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format23X { + op: 0x47, + va: *dest, + vb: *arr, + vc: *idx, + }) + } + (Self::AGetByte { dest, arr, idx }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format23X { + op: 0x48, + va: *dest, + vb: *arr, + vc: *idx, + }) + } + (Self::AGetChar { dest, arr, idx }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format23X { + op: 0x49, + va: *dest, + vb: *arr, + vc: *idx, + }) + } + (Self::AGetShort { dest, arr, idx }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format23X { + op: 0x4a, + va: *dest, + vb: *arr, + vc: *idx, + }) + } + (Self::APut { from, arr, idx }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x4b, va: *from, vb: *arr, vc: *idx, }), - ( - Self::APutWide { from, arr, idx }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { - op: 0x4c, - va: *from, - vb: *arr, - vc: *idx, - }), - ( - Self::APutObject { from, arr, idx }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { - op: 0x4d, - va: *from, - vb: *arr, - vc: *idx, - }), - ( - Self::APutBoolean { from, arr, idx }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { - op: 0x4e, - va: *from, - vb: *arr, - vc: *idx, - }), - ( - Self::APutByte { from, arr, idx }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { - op: 0x4f, - va: *from, - vb: *arr, - vc: *idx, - }), - ( - Self::APutChar { from, arr, idx }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { - op: 0x50, - va: *from, - vb: *arr, - vc: *idx, - }), - ( - Self::APutShort { from, arr, idx }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { - op: 0x51, - va: *from, - vb: *arr, - vc: *idx, - }), - ( - Self::NegInt { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::APutWide { from, arr, idx }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format23X { + op: 0x4c, + va: *from, + vb: *arr, + vc: *idx, + }) + } + (Self::APutObject { from, arr, idx }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format23X { + op: 0x4d, + va: *from, + vb: *arr, + vc: *idx, + }) + } + (Self::APutBoolean { from, arr, idx }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format23X { + op: 0x4e, + va: *from, + vb: *arr, + vc: *idx, + }) + } + (Self::APutByte { from, arr, idx }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format23X { + op: 0x4f, + va: *from, + vb: *arr, + vc: *idx, + }) + } + (Self::APutChar { from, arr, idx }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format23X { + op: 0x50, + va: *from, + vb: *arr, + vc: *idx, + }) + } + (Self::APutShort { from, arr, idx }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format23X { + op: 0x51, + va: *from, + vb: *arr, + vc: *idx, + }) + } + (Self::NegInt { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x7b, va: *dest, vb: *val, }), - ( - Self::NotInt { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::NotInt { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x7c, va: *dest, vb: *val, }), - ( - Self::NegLong { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::NegLong { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x7d, va: *dest, vb: *val, }), - ( - Self::NotLong { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::NotLong { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x7e, va: *dest, vb: *val, }), - ( - Self::NegFloat { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::NegFloat { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x7f, va: *dest, vb: *val, }), - ( - Self::NegDouble { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::NegDouble { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x80, va: *dest, vb: *val, }), - ( - Self::IntToLong { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::IntToLong { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x81, va: *dest, vb: *val, }), - ( - Self::IntToFloat { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::IntToFloat { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x82, va: *dest, vb: *val, }), - ( - Self::IntToDouble { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::IntToDouble { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x83, va: *dest, vb: *val, }), - ( - Self::LongToInt { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::LongToInt { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x84, va: *dest, vb: *val, }), - ( - Self::LongToFloat { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::LongToFloat { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x85, va: *dest, vb: *val, }), - ( - Self::LongToDouble { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::LongToDouble { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x86, va: *dest, vb: *val, }), - ( - Self::FloatToInt { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::FloatToInt { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x87, va: *dest, vb: *val, }), - ( - Self::FloatToLong { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::FloatToLong { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x88, va: *dest, vb: *val, }), - ( - Self::FloatToDouble { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { - op: 0x89, - va: *dest, - vb: *val, - }), - ( - Self::DoubleToInt { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::FloatToDouble { dest, val }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format12X { + op: 0x89, + va: *dest, + vb: *val, + }) + } + (Self::DoubleToInt { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x8a, va: *dest, vb: *val, }), - ( - Self::DoubleToLong { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::DoubleToLong { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x8b, va: *dest, vb: *val, }), - ( - Self::DoubleToFloat { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { - op: 0x8c, - va: *dest, - vb: *val, - }), - ( - Self::IntToByte { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::DoubleToFloat { dest, val }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format12X { + op: 0x8c, + va: *dest, + vb: *val, + }) + } + (Self::IntToByte { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x8d, va: *dest, vb: *val, }), - ( - Self::IntToChar { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::IntToChar { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x8e, va: *dest, vb: *val, }), - ( - Self::IntToShort { dest, val }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::IntToShort { dest, val }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0x8f, va: *dest, vb: *val, }), - ( - Self::AddInt { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::AddInt { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x90, va: *dest, vb: *b, vc: *c, }), - ( - Self::SubInt { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::SubInt { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x91, va: *dest, vb: *b, vc: *c, }), - ( - Self::MulInt { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::MulInt { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x92, va: *dest, vb: *b, vc: *c, }), - ( - Self::DivInt { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::DivInt { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x93, va: *dest, vb: *b, vc: *c, }), - ( - Self::RemInt { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::RemInt { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x94, va: *dest, vb: *b, vc: *c, }), - ( - Self::AndInt { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::AndInt { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x95, va: *dest, vb: *b, vc: *c, }), - ( - Self::OrInt { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::OrInt { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x96, va: *dest, vb: *b, vc: *c, }), - ( - Self::XorInt { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::XorInt { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x97, va: *dest, vb: *b, vc: *c, }), - ( - Self::ShlInt { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::ShlInt { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x98, va: *dest, vb: *b, vc: *c, }), - ( - Self::ShrInt { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::ShrInt { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x99, va: *dest, vb: *b, vc: *c, }), - ( - Self::UshrInt { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::UshrInt { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x9a, va: *dest, vb: *b, vc: *c, }), - ( - Self::AddLong { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::AddLong { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x9b, va: *dest, vb: *b, vc: *c, }), - ( - Self::SubLong { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::SubLong { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x9c, va: *dest, vb: *b, vc: *c, }), - ( - Self::MulLong { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::MulLong { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x9d, va: *dest, vb: *b, vc: *c, }), - ( - Self::DivLong { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::DivLong { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x9e, va: *dest, vb: *b, vc: *c, }), - ( - Self::RemLong { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::RemLong { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0x9f, va: *dest, vb: *b, vc: *c, }), - ( - Self::AndLong { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::AndLong { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xa0, va: *dest, vb: *b, vc: *c, }), - ( - Self::OrLong { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::OrLong { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xa1, va: *dest, vb: *b, vc: *c, }), - ( - Self::XorLong { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::XorLong { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xa2, va: *dest, vb: *b, vc: *c, }), - ( - Self::ShlLong { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::ShlLong { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xa3, va: *dest, vb: *b, vc: *c, }), - ( - Self::ShrLong { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::ShrLong { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xa4, va: *dest, vb: *b, vc: *c, }), - ( - Self::UshrLong { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::UshrLong { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xa5, va: *dest, vb: *b, vc: *c, }), - ( - Self::AddFloat { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::AddFloat { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xa6, va: *dest, vb: *b, vc: *c, }), - ( - Self::SubFloat { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::SubFloat { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xa7, va: *dest, vb: *b, vc: *c, }), - ( - Self::MulFloat { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::MulFloat { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xa8, va: *dest, vb: *b, vc: *c, }), - ( - Self::DivFloat { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::DivFloat { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xa9, va: *dest, vb: *b, vc: *c, }), - ( - Self::RemFloat { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::RemFloat { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xaa, va: *dest, vb: *b, vc: *c, }), - ( - Self::AddDouble { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::AddDouble { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xab, va: *dest, vb: *b, vc: *c, }), - ( - Self::SubDouble { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::SubDouble { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xac, va: *dest, vb: *b, vc: *c, }), - ( - Self::MulDouble { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::MulDouble { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xad, va: *dest, vb: *b, vc: *c, }), - ( - Self::DivDouble { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::DivDouble { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xae, va: *dest, vb: *b, vc: *c, }), - ( - Self::RemDouble { dest, b, c }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format23X { + (Self::RemDouble { dest, b, c }, GetRawInsParam { .. }) => Ok(InsFormat::Format23X { op: 0xaf, va: *dest, vb: *b, vc: *c, }), - ( - Self::AddInt2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::AddInt2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xb0, va: *dest, vb: *b, }), - ( - Self::SubInt2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::SubInt2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xb1, va: *dest, vb: *b, }), - ( - Self::MulInt2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::MulInt2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xb2, va: *dest, vb: *b, }), - ( - Self::DivInt2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::DivInt2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xb3, va: *dest, vb: *b, }), - ( - Self::RemInt2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::RemInt2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xb4, va: *dest, vb: *b, }), - ( - Self::AndInt2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::AndInt2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xb5, va: *dest, vb: *b, }), - ( - Self::OrInt2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::OrInt2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xb6, va: *dest, vb: *b, }), - ( - Self::XorInt2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::XorInt2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xb7, va: *dest, vb: *b, }), - ( - Self::ShlInt2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::ShlInt2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xb8, va: *dest, vb: *b, }), - ( - Self::ShrInt2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::ShrInt2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xb9, va: *dest, vb: *b, }), - ( - Self::UshrInt2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::UshrInt2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xba, va: *dest, vb: *b, }), - ( - Self::AddLong2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::AddLong2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xbb, va: *dest, vb: *b, }), - ( - Self::SubLong2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::SubLong2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xbc, va: *dest, vb: *b, }), - ( - Self::MulLong2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::MulLong2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xbd, va: *dest, vb: *b, }), - ( - Self::DivLong2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::DivLong2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xbe, va: *dest, vb: *b, }), - ( - Self::RemLong2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::RemLong2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xbf, va: *dest, vb: *b, }), - ( - Self::AndLong2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::AndLong2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xc0, va: *dest, vb: *b, }), - ( - Self::OrLong2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::OrLong2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xc1, va: *dest, vb: *b, }), - ( - Self::XorLong2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::XorLong2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xc2, va: *dest, vb: *b, }), - ( - Self::ShlLong2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::ShlLong2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xc3, va: *dest, vb: *b, }), - ( - Self::ShrLong2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::ShrLong2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xc4, va: *dest, vb: *b, }), - ( - Self::UshrLong2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::UshrLong2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xc5, va: *dest, vb: *b, }), - ( - Self::AddFloat2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::AddFloat2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xc6, va: *dest, vb: *b, }), - ( - Self::SubFloat2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::SubFloat2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xc7, va: *dest, vb: *b, }), - ( - Self::MulFloat2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::MulFloat2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xc8, va: *dest, vb: *b, }), - ( - Self::DivFloat2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::DivFloat2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xc9, va: *dest, vb: *b, }), - ( - Self::RemFloat2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::RemFloat2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xca, va: *dest, vb: *b, }), - ( - Self::AddDouble2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::AddDouble2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xcb, va: *dest, vb: *b, }), - ( - Self::SubDouble2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::SubDouble2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xcc, va: *dest, vb: *b, }), - ( - Self::MulDouble2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::MulDouble2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xcd, va: *dest, vb: *b, }), - ( - Self::DivDouble2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::DivDouble2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xce, va: *dest, vb: *b, }), - ( - Self::RemDouble2Addr { b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format12X { + (Self::RemDouble2Addr { b, dest }, GetRawInsParam { .. }) => Ok(InsFormat::Format12X { op: 0xcf, va: *dest, vb: *b, }), - ( - Self::AddIntLit { lit, b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => { + (Self::AddIntLit { lit, b, dest }, GetRawInsParam { .. }) => { let mut reg_on_4_bit = true; let mut lit_on_8_bits = true; if dest & 0b1111_0000 != 0 { @@ -8409,19 +6142,7 @@ impl Instruction { }) } } - ( - Self::RsubIntLit { lit, b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => { + (Self::RsubIntLit { lit, b, dest }, GetRawInsParam { .. }) => { let mut reg_on_4_bit = true; let mut lit_on_8_bits = true; if dest & 0b1111_0000 != 0 { @@ -8458,19 +6179,7 @@ impl Instruction { }) } } - ( - Self::MulIntLit { lit, b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => { + (Self::MulIntLit { lit, b, dest }, GetRawInsParam { .. }) => { let mut reg_on_4_bit = true; let mut lit_on_8_bits = true; if dest & 0b1111_0000 != 0 { @@ -8507,19 +6216,7 @@ impl Instruction { }) } } - ( - Self::DivIntLit { lit, b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => { + (Self::DivIntLit { lit, b, dest }, GetRawInsParam { .. }) => { let mut reg_on_4_bit = true; let mut lit_on_8_bits = true; if dest & 0b1111_0000 != 0 { @@ -8556,19 +6253,7 @@ impl Instruction { }) } } - ( - Self::RemIntLit { lit, b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => { + (Self::RemIntLit { lit, b, dest }, GetRawInsParam { .. }) => { let mut reg_on_4_bit = true; let mut lit_on_8_bits = true; if dest & 0b1111_0000 != 0 { @@ -8605,19 +6290,7 @@ impl Instruction { }) } } - ( - Self::AndIntLit { lit, b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => { + (Self::AndIntLit { lit, b, dest }, GetRawInsParam { .. }) => { let mut reg_on_4_bit = true; let mut lit_on_8_bits = true; if dest & 0b1111_0000 != 0 { @@ -8654,19 +6327,7 @@ impl Instruction { }) } } - ( - Self::OrIntLit { lit, b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => { + (Self::OrIntLit { lit, b, dest }, GetRawInsParam { .. }) => { let mut reg_on_4_bit = true; let mut lit_on_8_bits = true; if dest & 0b1111_0000 != 0 { @@ -8703,19 +6364,7 @@ impl Instruction { }) } } - ( - Self::XorIntLit { lit, b, dest }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => { + (Self::XorIntLit { lit, b, dest }, GetRawInsParam { .. }) => { let mut reg_on_4_bit = true; let mut lit_on_8_bits = true; if dest & 0b1111_0000 != 0 { @@ -8752,60 +6401,26 @@ impl Instruction { }) } } - ( - Self::ShlIntLit { dest, b, lit }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format22B { + (Self::ShlIntLit { dest, b, lit }, GetRawInsParam { .. }) => Ok(InsFormat::Format22B { op: 0xe0, va: *dest, vb: *b, c: *lit, }), - ( - Self::ShrIntLit { dest, b, lit }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format22B { + (Self::ShrIntLit { dest, b, lit }, GetRawInsParam { .. }) => Ok(InsFormat::Format22B { op: 0xe1, va: *dest, vb: *b, c: *lit, }), - ( - Self::UshrIntLit { dest, b, lit }, - _strings, - _types, - _fields, - _methods, - _protos, - _call_site_idx, - _handle_idx, - _jump_data, - _goto_size, - _data_offset, - ) => Ok(InsFormat::Format22B { - op: 0xe2, - va: *dest, - vb: *b, - c: *lit, - }), + (Self::UshrIntLit { dest, b, lit }, GetRawInsParam { .. }) => { + Ok(InsFormat::Format22B { + op: 0xe2, + va: *dest, + vb: *b, + c: *lit, + }) + } } }