@@ -20,14 +20,11 @@ const ARCH_MAX_ACCESS_SIZE: usize = 64;
20
20
/// The largest arm64 simd instruction operates on 16 bytes.
21
21
#[ cfg( any( target_arch = "arm" , target_arch = "aarch64" ) ) ]
22
22
const ARCH_MAX_ACCESS_SIZE : usize = 16 ;
23
- /// The max riscv vector instruction can access 8 consecutive 32-bit values.
24
- #[ cfg( any( target_arch = "riscv32" , target_arch = "riscv64" ) ) ]
25
- const ARCH_MAX_ACCESS_SIZE : usize = 32 ;
26
23
27
24
/// The default word size on a given platform, in bytes.
28
- #[ cfg( any( target_arch = "x86" , target_arch = "arm" , target_arch = "riscv32" ) ) ]
25
+ #[ cfg( any( target_arch = "x86" , target_arch = "arm" ) ) ]
29
26
const ARCH_WORD_SIZE : usize = 4 ;
30
- #[ cfg( any( target_arch = "x86_64" , target_arch = "aarch64" , target_arch = "riscv64" ) ) ]
27
+ #[ cfg( any( target_arch = "x86_64" , target_arch = "aarch64" ) ) ]
31
28
const ARCH_WORD_SIZE : usize = 8 ;
32
29
33
30
/// The address of the page set to be edited, initialised to a sentinel null
@@ -91,18 +88,6 @@ impl ArchIndependentRegs for libc::user_regs_struct {
91
88
fn set_sp ( & mut self , sp : usize ) { self . sp = sp as _ }
92
89
}
93
90
94
- #[ cfg( any( target_arch = "riscv32" , target_arch = "riscv64" ) ) ]
95
- #[ expect( clippy:: as_conversions) ]
96
- #[ rustfmt:: skip]
97
- impl ArchIndependentRegs for libc:: user_regs_struct {
98
- #[ inline]
99
- fn ip ( & self ) -> usize { self . pc as _ }
100
- #[ inline]
101
- fn set_ip ( & mut self , ip : usize ) { self . pc = ip as _ }
102
- #[ inline]
103
- fn set_sp ( & mut self , sp : usize ) { self . sp = sp as _ }
104
- }
105
-
106
91
/// A unified event representing something happening on the child process. Wraps
107
92
/// `nix`'s `WaitStatus` and our custom signals so it can all be done with one
108
93
/// `match` statement.
@@ -341,10 +326,6 @@ fn get_disasm() -> capstone::Capstone {
341
326
{ cs_pre. arm64 ( ) . mode ( arch:: arm64:: ArchMode :: Arm ) }
342
327
#[ cfg( target_arch = "arm" ) ]
343
328
{ cs_pre. arm ( ) . mode ( arch:: arm:: ArchMode :: Arm ) }
344
- #[ cfg( target_arch = "riscv64" ) ]
345
- { cs_pre. riscv ( ) . mode ( arch:: riscv:: ArchMode :: RiscV64 ) }
346
- #[ cfg( target_arch = "riscv32" ) ]
347
- { cs_pre. riscv ( ) . mode ( arch:: riscv:: ArchMode :: RiscV32 ) }
348
329
}
349
330
. detail ( true )
350
331
. build ( )
@@ -501,18 +482,6 @@ fn handle_segfault(
501
482
}
502
483
_ => ( ) ,
503
484
} ,
504
- #[ cfg( any( target_arch = "riscv32" , target_arch = "riscv64" ) ) ]
505
- arch:: ArchOperand :: RiscVOperand ( risc_voperand) => {
506
- match risc_voperand {
507
- arch:: riscv:: RiscVOperand :: Mem ( _) => {
508
- // We get basically no info here.
509
- let push = addr..addr. strict_add ( size) ;
510
- acc_events. push ( AccessEvent :: Read ( push. clone ( ) ) ) ;
511
- acc_events. push ( AccessEvent :: Write ( push) ) ;
512
- }
513
- _ => ( ) ,
514
- }
515
- }
516
485
_ => unimplemented ! ( ) ,
517
486
}
518
487
}
0 commit comments