File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
cranelift/codegen/src/machinst Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -2495,7 +2495,9 @@ impl TryCallInfo {
24952495 TryCallHandler :: Default ( label) => MachExceptionHandler :: Default ( * label) ,
24962496 TryCallHandler :: Context ( reg) => {
24972497 let loc = if let Some ( spillslot) = reg. to_spillslot ( ) {
2498- let offset = layout. spillslot_offset ( spillslot) ;
2498+ // The spillslot offset is relative to the "fixed
2499+ // storage area", which comes after outgoing args.
2500+ let offset = layout. spillslot_offset ( spillslot) + i64:: from ( layout. outgoing_args_size ) ;
24992501 ExceptionContextLoc :: SPOffset ( u32:: try_from ( offset) . expect ( "SP offset cannot be negative or larger than 4GiB" ) )
25002502 } else if let Some ( realreg) = reg. to_real_reg ( ) {
25012503 ExceptionContextLoc :: GPR ( realreg. hw_enc ( ) )
You can’t perform that action at this time.
0 commit comments