Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/zmij/src/stdarch_x86.rs # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / zmij / src / stdarch_x86.rs` 65 lines ยท 1241 bytes Raw Blame History 1 use core::mem; 2 3 pub use core::arch::x86_64::*; 4 5 pub const fn _MM_SHUFFLE(z: u32, y: u32, x: u32, w: u32) -> i32 { 6 ((z << 6) | (y << 4) | (x << 2) | w) as i32 7 } 8 9 pub const fn _mm_set_epi64x(e1: i64, e0: i64) -> __m128i { 10 unsafe { mem::transmute([e0, e1]) } 11 } 12 13 pub const fn _mm_set_epi32(e3: i32, e2: i32, e1: i32, e0: i32) -> __m128i { 14 unsafe { mem::transmute([e0, e1, e2, e3]) } 15 } 16 17 pub const fn _mm_set_epi16( 18 e7: i16, 19 e6: i16, 20 e5: i16, 21 e4: i16, 22 e3: i16, 23 e2: i16, 24 e1: i16, 25 e0: i16, 26 ) -> __m128i { 27 unsafe { mem::transmute([e0, e1, e2, e3, e4, e5, e6, e7]) } 28 } 29 30 pub const fn _mm_set_epi8( 31 e15: i8, 32 e14: i8, 33 e13: i8, 34 e12: i8, 35 e11: i8, 36 e10: i8, 37 e9: i8, 38 e8: i8, 39 e7: i8, 40 e6: i8, 41 e5: i8, 42 e4: i8, 43 e3: i8, 44 e2: i8, 45 e1: i8, 46 e0: i8, 47 ) -> __m128i { 48 unsafe { 49 mem::transmute([ 50 e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, 51 ]) 52 } 53 } 54 55 pub const fn _mm_set1_epi64x(a: i64) -> __m128i { 56 _mm_set_epi64x(a, a) 57 } 58 59 pub const fn _mm_set1_epi32(a: i32) -> __m128i { 60 _mm_set_epi32(a, a, a, a) 61 } 62 63 pub const fn _mm_set1_epi16(a: i16) -> __m128i { 64 _mm_set_epi16(a, a, a, a, a, a, a, a) 65 }