@@ -20,14 +20,11 @@ const ARCH_MAX_ACCESS_SIZE: usize = 64;
2020/// The largest arm64 simd instruction operates on 16 bytes.
2121#[ cfg( any( target_arch = "arm" , target_arch = "aarch64" ) ) ]
2222const 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 ;
2623
2724/// 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" ) ) ]
2926const 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" ) ) ]
3128const ARCH_WORD_SIZE : usize = 8 ;
3229
3330/// 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 {
9188 fn set_sp ( & mut self , sp : usize ) { self . sp = sp as _ }
9289}
9390
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-
10691/// A unified event representing something happening on the child process. Wraps
10792/// `nix`'s `WaitStatus` and our custom signals so it can all be done with one
10893/// `match` statement.
@@ -341,10 +326,6 @@ fn get_disasm() -> capstone::Capstone {
341326 { cs_pre. arm64 ( ) . mode ( arch:: arm64:: ArchMode :: Arm ) }
342327 #[ cfg( target_arch = "arm" ) ]
343328 { 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 ) }
348329 }
349330 . detail ( true )
350331 . build ( )
@@ -501,18 +482,6 @@ fn handle_segfault(
501482 }
502483 _ => ( ) ,
503484 } ,
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- }
516485 _ => unimplemented ! ( ) ,
517486 }
518487 }
0 commit comments