diff options
| author | Ralf Jung <post@ralfj.de> | 2024-06-13 20:17:10 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-06-13 20:18:36 +0200 |
| commit | 0cd41b9f23029912cef7be30161c78511d87c6fa (patch) | |
| tree | 409d724e4d8b5a49a16e19ed9c97e9d5f80c0b48 | |
| parent | 75571774d601487a6f79cd42826a71bbee42dcc0 (diff) | |
| download | rust-0cd41b9f23029912cef7be30161c78511d87c6fa.tar.gz rust-0cd41b9f23029912cef7be30161c78511d87c6fa.zip | |
add some more CRC tests
| -rw-r--r-- | src/tools/miri/tests/pass/shims/x86/intrinsics-x86-sse42.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tools/miri/tests/pass/shims/x86/intrinsics-x86-sse42.rs b/src/tools/miri/tests/pass/shims/x86/intrinsics-x86-sse42.rs index 586caf4f280..3ac53ea8b93 100644 --- a/src/tools/miri/tests/pass/shims/x86/intrinsics-x86-sse42.rs +++ b/src/tools/miri/tests/pass/shims/x86/intrinsics-x86-sse42.rs @@ -45,6 +45,11 @@ unsafe fn test_crc() { let v = 0xef; let i = _mm_crc32_u8(crc, v); assert_eq!(i, 0xb95511db); + + let crc = 0xbadeafe; + let v = 0xc0; + let i = _mm_crc32_u8(crc, v); + assert_eq!(i, 0x9c905b7c); } test_mm_crc32_u8(); @@ -59,6 +64,11 @@ unsafe fn test_crc() { let v = 0xa6c0; let i = _mm_crc32_u16(crc, v); assert_eq!(i, 0xab04fe4e); + + let crc = 0xbadeafe; + let v = 0xc0fe; + let i = _mm_crc32_u16(crc, v); + assert_eq!(i, 0x4b5fad4b); } test_mm_crc32_u16(); @@ -73,6 +83,11 @@ unsafe fn test_crc() { let v = 0x885585c2; let i = _mm_crc32_u32(crc, v); assert_eq!(i, 0x22443a7b); + + let crc = 0xbadeafe; + let v = 0xc0febeef; + let i = _mm_crc32_u32(crc, v); + assert_eq!(i, 0xb309502f); } test_mm_crc32_u32(); @@ -88,6 +103,11 @@ unsafe fn test_crc() { let v = 0x1a7ea8fb571746b0; let i = _mm_crc32_u64(crc, v); assert_eq!(i, 0x315b4f6); + + let crc = 0xbadeafe; + let v = 0xc0febeefdadafefe; + let i = _mm_crc32_u64(crc, v); + assert_eq!(i, 0x5b44f54f); } #[cfg(not(target_arch = "x86_64"))] unsafe fn test_mm_crc32_u64() {} |
