diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-05-25 18:51:16 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-05-25 18:51:16 +0000 |
| commit | 3816385b09db445ab580043ed45218df8c1198ad (patch) | |
| tree | 72c83caba4898e2393bf300c084aac0abb363271 /compiler/rustc_codegen_cranelift/example | |
| parent | 283db70ace62a0ae704a624e43b68c2ee44b87a6 (diff) | |
| parent | 979dcf8e2f213e4f4b645cb62e7fe9f4f2c0c785 (diff) | |
| download | rust-3816385b09db445ab580043ed45218df8c1198ad.tar.gz rust-3816385b09db445ab580043ed45218df8c1198ad.zip | |
Merge commit '979dcf8e2f213e4f4b645cb62e7fe9f4f2c0c785' into sync_cg_clif-2025-05-25
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/example/mini_core.rs | 20 | ||||
| -rw-r--r-- | compiler/rustc_codegen_cranelift/example/std_example.rs | 3 |
2 files changed, 22 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/example/mini_core.rs b/compiler/rustc_codegen_cranelift/example/mini_core.rs index 6e345b2a6fd..1dc799c0aee 100644 --- a/compiler/rustc_codegen_cranelift/example/mini_core.rs +++ b/compiler/rustc_codegen_cranelift/example/mini_core.rs @@ -521,10 +521,28 @@ fn panic_cannot_unwind() -> ! { } #[lang = "eh_personality"] -fn eh_personality() -> ! { +// FIXME personality signature depends on target +fn eh_personality( + _version: i32, + _actions: i32, + _exception_class: u64, + _exception_object: *mut (), + _context: *mut (), +) -> i32 { loop {} } +#[lang = "panic_in_cleanup"] +fn panic_in_cleanup() -> ! { + loop {} +} + +#[cfg(all(unix, not(target_vendor = "apple")))] +#[link(name = "gcc_s")] +extern "C" { + fn _Unwind_Resume(exc: *mut ()) -> !; +} + #[lang = "drop_in_place"] #[allow(unconditional_recursion)] pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) { diff --git a/compiler/rustc_codegen_cranelift/example/std_example.rs b/compiler/rustc_codegen_cranelift/example/std_example.rs index 2d9de2a5b8d..5d83066cffb 100644 --- a/compiler/rustc_codegen_cranelift/example/std_example.rs +++ b/compiler/rustc_codegen_cranelift/example/std_example.rs @@ -166,6 +166,7 @@ fn main() { enum Never {} } + #[cfg(not(target_arch = "s390x"))] // s390x doesn't have vector instructions enabled by default foo(I64X2([0, 0])); transmute_wide_pointer(); @@ -203,9 +204,11 @@ fn rust_call_abi() { rust_call_abi_callee((1, 2)); } +#[cfg_attr(target_arch = "s390x", allow(dead_code))] #[repr(simd)] struct I64X2([i64; 2]); +#[cfg_attr(target_arch = "s390x", allow(dead_code))] #[allow(improper_ctypes_definitions)] extern "C" fn foo(_a: I64X2) {} |
