@@ -77,7 +77,7 @@ impl ArchMips {
7777 . and_then ( |section| section. data ( ) . ok ( ) )
7878 . and_then ( |data| data. get ( 0x14 ..0x18 ) )
7979 . and_then ( |s| s. try_into ( ) . ok ( ) )
80- . map ( |bytes| endianness. read_i32_bytes ( bytes) )
80+ . map ( |bytes| endianness. read_i32 ( bytes) )
8181 . unwrap_or ( 0 ) ;
8282
8383 // Parse all relocations to pair R_MIPS_HI16 and R_MIPS_LO16. Since the instructions only
@@ -98,13 +98,13 @@ impl ArchMips {
9898 match reloc. flags ( ) {
9999 object:: RelocationFlags :: Elf { r_type : elf:: R_MIPS_HI16 } => {
100100 let code = data[ addr as usize ..addr as usize + 4 ] . try_into ( ) ?;
101- let addend = ( ( endianness. read_u32_bytes ( code) & 0x0000FFFF ) << 16 ) as i32 ;
101+ let addend = ( ( endianness. read_u32 ( code) & 0x0000FFFF ) << 16 ) as i32 ;
102102 last_hi = Some ( addr) ;
103103 last_hi_addend = addend;
104104 }
105105 object:: RelocationFlags :: Elf { r_type : elf:: R_MIPS_LO16 } => {
106106 let code = data[ addr as usize ..addr as usize + 4 ] . try_into ( ) ?;
107- let addend = ( endianness. read_u32_bytes ( code) & 0x0000FFFF ) as i16 as i32 ;
107+ let addend = ( endianness. read_u32 ( code) & 0x0000FFFF ) as i16 as i32 ;
108108 let full_addend = ( last_hi_addend + addend) as i64 ;
109109 if let Some ( hi_addr) = last_hi. take ( ) {
110110 addends. insert ( hi_addr, full_addend) ;
@@ -197,7 +197,7 @@ impl ArchMips {
197197 diff_config : & DiffObjConfig ,
198198 ) -> Result < rabbitizer:: Instruction > {
199199 Ok ( rabbitizer:: Instruction :: new (
200- self . endianness . read_u32_bytes ( code. try_into ( ) ?) ,
200+ self . endianness . read_u32 ( code. try_into ( ) ?) ,
201201 Vram :: new ( ins_ref. address as u32 ) ,
202202 self . instruction_flags ( diff_config) ,
203203 ) )
@@ -217,7 +217,7 @@ impl Arch for ArchMips {
217217 let mut ops = Vec :: < InstructionRef > :: with_capacity ( code. len ( ) / 4 ) ;
218218 let mut cur_addr = address as u32 ;
219219 for chunk in code. chunks_exact ( 4 ) {
220- let code = self . endianness . read_u32_bytes ( chunk. try_into ( ) ?) ;
220+ let code = self . endianness . read_u32 ( chunk. try_into ( ) ?) ;
221221 let instruction =
222222 rabbitizer:: Instruction :: new ( code, Vram :: new ( cur_addr) , instruction_flags) ;
223223 let opcode = instruction. opcode ( ) as u16 ;
@@ -269,7 +269,7 @@ impl Arch for ArchMips {
269269 let data = section. data ( ) ?;
270270 let code = self
271271 . endianness
272- . read_u32_bytes ( data[ address as usize ..address as usize + 4 ] . try_into ( ) ?) ;
272+ . read_u32 ( data[ address as usize ..address as usize + 4 ] . try_into ( ) ?) ;
273273 let addend = match r_type {
274274 elf:: R_MIPS_32 => code as i64 ,
275275 elf:: R_MIPS_26 => ( ( code & 0x03FFFFFF ) << 2 ) as i64 ,
@@ -366,7 +366,7 @@ impl Arch for ArchMips {
366366 && new_address >= symbol. address + 4
367367 && let Some ( data) = section. data_range ( new_address - 4 , 4 )
368368 && let instruction = rabbitizer:: Instruction :: new (
369- self . endianness . read_u32_bytes ( data. try_into ( ) . unwrap ( ) ) ,
369+ self . endianness . read_u32 ( data. try_into ( ) . unwrap ( ) ) ,
370370 Vram :: new ( ( new_address - 4 ) as u32 ) ,
371371 self . default_instruction_flags ( ) ,
372372 )
0 commit comments