mirror of
https://github.com/encounter/objdiff.git
synced 2025-08-03 18:55:43 +00:00
Update rabbitizer to v2.0.0-alpha.4 (#226)
* Update rabbitizer to v2.0.0-alpha.4 * Cargo update
This commit is contained in:
parent
00ad0d8094
commit
85fb18a21a
1155
Cargo.lock
generated
1155
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -7,10 +7,7 @@ use alloc::{
|
|||||||
use anyhow::{Result, bail};
|
use anyhow::{Result, bail};
|
||||||
use object::{Endian as _, Object as _, ObjectSection as _, ObjectSymbol as _, elf};
|
use object::{Endian as _, Object as _, ObjectSection as _, ObjectSymbol as _, elf};
|
||||||
use rabbitizer::{
|
use rabbitizer::{
|
||||||
IsaExtension, IsaVersion, Vram,
|
IsaExtension, IsaVersion, Vram, abi::Abi, operands::ValuedOperand, registers_meta::Register,
|
||||||
abi::Abi,
|
|
||||||
operands::{IU16, ValuedOperand},
|
|
||||||
registers_meta::Register,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
@ -349,14 +346,18 @@ fn push_args(
|
|||||||
}
|
}
|
||||||
|
|
||||||
match op {
|
match op {
|
||||||
ValuedOperand::core_immediate(imm) => {
|
ValuedOperand::core_imm_i16(imm) => {
|
||||||
if let Some(resolved) = relocation {
|
if let Some(resolved) = relocation {
|
||||||
push_reloc(resolved.relocation, &mut arg_cb)?;
|
push_reloc(resolved.relocation, &mut arg_cb)?;
|
||||||
} else {
|
} else {
|
||||||
arg_cb(match imm {
|
arg_cb(InstructionPart::signed(imm))?;
|
||||||
IU16::Integer(s) => InstructionPart::signed(s),
|
}
|
||||||
IU16::Unsigned(u) => InstructionPart::unsigned(u),
|
}
|
||||||
})?;
|
ValuedOperand::core_imm_u16(imm) => {
|
||||||
|
if let Some(resolved) = relocation {
|
||||||
|
push_reloc(resolved.relocation, &mut arg_cb)?;
|
||||||
|
} else {
|
||||||
|
arg_cb(InstructionPart::unsigned(imm))?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ValuedOperand::core_label(..) | ValuedOperand::core_branch_target_label(..) => {
|
ValuedOperand::core_label(..) | ValuedOperand::core_branch_target_label(..) => {
|
||||||
@ -373,14 +374,13 @@ fn push_args(
|
|||||||
))?;
|
))?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ValuedOperand::core_immediate_base(imm, base) => {
|
ValuedOperand::core_imm_rs(imm, base) => {
|
||||||
if let Some(resolved) = relocation {
|
if let Some(resolved) = relocation {
|
||||||
push_reloc(resolved.relocation, &mut arg_cb)?;
|
push_reloc(resolved.relocation, &mut arg_cb)?;
|
||||||
} else {
|
} else {
|
||||||
arg_cb(InstructionPart::Arg(InstructionArg::Value(match imm {
|
arg_cb(InstructionPart::Arg(InstructionArg::Value(
|
||||||
IU16::Integer(s) => InstructionArgValue::Signed(s as i64),
|
InstructionArgValue::Signed(imm as i64),
|
||||||
IU16::Unsigned(u) => InstructionArgValue::Unsigned(u as u64),
|
)))?;
|
||||||
})))?;
|
|
||||||
}
|
}
|
||||||
arg_cb(InstructionPart::basic("("))?;
|
arg_cb(InstructionPart::basic("("))?;
|
||||||
arg_cb(InstructionPart::opaque(base.either_name(
|
arg_cb(InstructionPart::opaque(base.either_name(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user