1
Fork 0

Merge commit '1eded3619d' into sync_cg_clif-2023-07-22

This commit is contained in:
bjorn3 2023-07-22 13:32:34 +00:00
commit 36708123c1
30 changed files with 668 additions and 170 deletions

View file

@ -1,4 +1,12 @@
#![feature(core_intrinsics, generators, generator_trait, is_sorted, repr_simd)]
#![feature(
core_intrinsics,
generators,
generator_trait,
is_sorted,
repr_simd,
tuple_trait,
unboxed_closures
)]
#[cfg(target_arch = "x86_64")]
use std::arch::x86_64::*;
@ -155,12 +163,34 @@ fn main() {
}
foo(I64X2(0, 0));
transmute_fat_pointer();
rust_call_abi();
}
fn panic(_: u128) {
panic!();
}
use std::mem::transmute;
#[cfg(target_pointer_width = "32")]
type TwoPtrs = i64;
#[cfg(target_pointer_width = "64")]
type TwoPtrs = i128;
fn transmute_fat_pointer() -> TwoPtrs {
unsafe { transmute::<_, TwoPtrs>("true !") }
}
extern "rust-call" fn rust_call_abi_callee<T: std::marker::Tuple>(_: T) {}
fn rust_call_abi() {
rust_call_abi_callee(());
rust_call_abi_callee((1, 2));
}
#[repr(simd)]
struct I64X2(i64, i64);