Skip to content

Commit 2425c7f

Browse files
committed
Refactor the x86 verify implementation
* Support instructions defined multiple times in the XML (just match one of them) * Support AVX-512 in more locations * Add support for printing lists of missing intrinsics * Add a few constants to hopefully tweak the program easily
1 parent acda101 commit 2425c7f

File tree

2 files changed

+206
-146
lines changed

2 files changed

+206
-146
lines changed

coresimd/src/x86/i586/sse.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,16 +1501,16 @@ pub unsafe fn _MM_SET_ROUNDING_MODE(x: u32) {
15011501
}
15021502

15031503
/// See [`_mm_prefetch`](fn._mm_prefetch.html).
1504-
pub const _MM_HINT_T0: i8 = 3;
1504+
pub const _MM_HINT_T0: i32 = 3;
15051505

15061506
/// See [`_mm_prefetch`](fn._mm_prefetch.html).
1507-
pub const _MM_HINT_T1: i8 = 2;
1507+
pub const _MM_HINT_T1: i32 = 2;
15081508

15091509
/// See [`_mm_prefetch`](fn._mm_prefetch.html).
1510-
pub const _MM_HINT_T2: i8 = 1;
1510+
pub const _MM_HINT_T2: i32 = 1;
15111511

15121512
/// See [`_mm_prefetch`](fn._mm_prefetch.html).
1513-
pub const _MM_HINT_NTA: i8 = 0;
1513+
pub const _MM_HINT_NTA: i32 = 0;
15141514

15151515
/// Fetch the cache line that contains address `p` using the given `strategy`.
15161516
///
@@ -1554,7 +1554,7 @@ pub const _MM_HINT_NTA: i8 = 0;
15541554
#[cfg_attr(test, assert_instr(prefetcht1, strategy = _MM_HINT_T1))]
15551555
#[cfg_attr(test, assert_instr(prefetcht2, strategy = _MM_HINT_T2))]
15561556
#[cfg_attr(test, assert_instr(prefetchnta, strategy = _MM_HINT_NTA))]
1557-
pub unsafe fn _mm_prefetch(p: *const u8, strategy: i8) {
1557+
pub unsafe fn _mm_prefetch(p: *const i8, strategy: i32) {
15581558
// The `strategy` must be a compile-time constant, so we use a short form
15591559
// of `constify_imm8!` for now.
15601560
// We use the `llvm.prefetch` instrinsic with `rw` = 0 (read), and
@@ -1673,7 +1673,7 @@ extern "C" {
16731673
#[link_name = "llvm.x86.sse.ldmxcsr"]
16741674
fn ldmxcsr(p: *const i8);
16751675
#[link_name = "llvm.prefetch"]
1676-
fn prefetch(p: *const u8, rw: i32, loc: i32, ty: i32);
1676+
fn prefetch(p: *const i8, rw: i32, loc: i32, ty: i32);
16771677
#[link_name = "llvm.x86.sse.cmp.ss"]
16781678
fn cmpss(a: __m128, b: __m128, imm8: i8) -> __m128;
16791679
#[link_name = "llvm.x86.mmx.movnt.dq"]

0 commit comments

Comments
 (0)