diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-03-26 10:22:37 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-03-26 10:22:37 +0000 |
| commit | c3ee03011962d53f44d9d0faf26260f914191cfc (patch) | |
| tree | 02d10ad56eebda5a3e2914b8954cd2a7dca3b08d /example | |
| parent | eed1f754151965c4f9f7eef877801043101b83e1 (diff) | |
| download | rust-c3ee03011962d53f44d9d0faf26260f914191cfc.tar.gz rust-c3ee03011962d53f44d9d0faf26260f914191cfc.zip | |
Fix passing and returning vector types
Diffstat (limited to 'example')
| -rw-r--r-- | example/std_example.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/example/std_example.rs b/example/std_example.rs index c86063f60b9..ab4045d11a6 100644 --- a/example/std_example.rs +++ b/example/std_example.rs @@ -1,4 +1,4 @@ -#![feature(core_intrinsics, generators, generator_trait, is_sorted)] +#![feature(core_intrinsics, generators, generator_trait, is_sorted, repr_simd)] #[cfg(target_arch = "x86_64")] use std::arch::x86_64::*; @@ -153,12 +153,20 @@ fn main() { enum Never {} } + + foo(I64X2(0, 0)); } fn panic(_: u128) { panic!(); } +#[repr(simd)] +struct I64X2(i64, i64); + +#[allow(improper_ctypes_definitions)] +extern "C" fn foo(_a: I64X2) {} + #[cfg(target_arch = "x86_64")] #[target_feature(enable = "sse2")] unsafe fn test_simd() { |
