Update ABI user

This commit is contained in:
Gary Guo 2023-08-06 14:30:50 +01:00
parent de5dd40a4f
commit a421b6d55c
3 changed files with 6 additions and 6 deletions

View File

@ -21,7 +21,7 @@ pub fn begin_panic<E: Exception>(exception: E) -> UnwindReasonCode {
unsafe {
(*ex).exception_class = u64::from_be_bytes(E::CLASS);
(*ex).exception_cleanup = Some(exception_cleanup::<E>);
_Unwind_RaiseException(&mut *ex)
_Unwind_RaiseException(ex)
}
}

View File

@ -136,11 +136,11 @@ fn find_eh_action(
}
#[lang = "eh_personality"]
fn rust_eh_personality(
unsafe fn rust_eh_personality(
version: c_int,
actions: UnwindAction,
_exception_class: u64,
exception: &mut UnwindException,
exception: *mut UnwindException,
unwind_ctx: &mut UnwindContext<'_>,
) -> UnwindReasonCode {
if version != 1 {
@ -170,7 +170,7 @@ fn rust_eh_personality(
_Unwind_SetGR(
unwind_ctx,
Arch::UNWIND_DATA_REG.0 .0 as _,
exception as *mut _ as usize,
exception as usize,
);
_Unwind_SetGR(unwind_ctx, Arch::UNWIND_DATA_REG.1 .0 as _, 0);
_Unwind_SetIP(unwind_ctx, lpad);

View File

@ -2,11 +2,11 @@ use crate::abi::*;
use crate::util::*;
#[lang = "eh_personality"]
extern "C" fn personality(
unsafe extern "C" fn personality(
version: c_int,
_actions: UnwindAction,
_exception_class: u64,
_exception: &mut UnwindException,
_exception: *mut UnwindException,
_ctx: &mut UnwindContext<'_>,
) -> UnwindReasonCode {
if version != 1 {