File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,16 @@ cfg_if::cfg_if! {
3737 #[ doc( hidden) ]
3838 #[ allow( non_camel_case_types) ]
3939 pub struct __jmp_buf( [ u64 ; 22 ] ) ;
40+ } else if #[ cfg( target_arch = "riscv64" ) ] {
41+ #[ repr( C ) ]
42+ #[ doc( hidden) ]
43+ #[ allow( non_camel_case_types) ]
44+ pub struct __jmp_buf {
45+ __pc: u64 ,
46+ __regs: [ u64 ; 12 ] ,
47+ __sp: u64 ,
48+ __fpregs: [ f64 ; 12 ] ,
49+ }
4050 }
4151}
4252
Original file line number Diff line number Diff line change @@ -457,6 +457,8 @@ impl HandlerInner {
457457 if ( * fp_ptr) . head. magic == crash_context:: FPSIMD_MAGIC {
458458 ptr:: copy_nonoverlapping( fp_ptr, & mut cc. float_state, 1 ) ;
459459 }
460+ } else if #[ cfg( target_arch = "riscv64" ) ] {
461+ cc. float_state = uc_ptr. uc_mcontext. __fpregs;
460462 } else if #[ cfg( not( target_arch = "arm" ) ) ] {
461463 if !uc_ptr. uc_mcontext. fpregs. is_null( ) {
462464 ptr:: copy_nonoverlapping( uc_ptr. uc_mcontext. fpregs, ( ( & mut cc. float_state) as * mut crash_context:: fpregset_t) . cast( ) , 1 ) ;
You can’t perform that action at this time.
0 commit comments