about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-11-04 16:03:28 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-11-04 16:03:28 +0100
commit901bb488772bf167b3cf4321369c5f7609620648 (patch)
treef0558b6b7d949e97fd670d0646c59e7db122c1d9 /tests
parent9fc37e6418858f0b2ac277dbb0aefbf8e2cd1ea5 (diff)
downloadbox64-901bb488772bf167b3cf4321369c5f7609620648.tar.gz
box64-901bb488772bf167b3cf4321369c5f7609620648.zip
Added 66 0F F2 38 F1 opcode, and fixed all 66 0F F2/F3 xx opcodes (should help #1013)
Diffstat (limited to 'tests')
-rw-r--r--tests/ref27.txt6
-rwxr-xr-xtests/test27bin215616 -> 232896 bytes
-rw-r--r--tests/test27.c20
3 files changed, 26 insertions, 0 deletions
diff --git a/tests/ref27.txt b/tests/ref27.txt
index 9eb9868d..6283aec8 100644
--- a/tests/ref27.txt
+++ b/tests/ref27.txt
@@ -863,3 +863,9 @@ mm_cmpestrm("", 0, "This is a string", 16, 0x75) = 00000000ffffffff-00000000ffff
 _mm_cmpistri("", "This is a string", 0x75) => 7
 _mm_cmpestri("", "This is a string", 0x75) flags: a:0 s:1 z:0 c:1 o:1
 mm_cmpestrm("", "This is a string", 0x75) = 00000000ffffffff-00000000ffffffff
+crc32(0x0, byte:0x0) => 0x0
+crc32(0x0, byte:0xa) => 0x6be22838
+crc32(0x6be22838, dword:0x0) => 0xb545d4c9
+crc32(0xb545d4c9, dword:0x123456) => 0xc4dd37b5
+crc32(0xc4dd37b5, word:0x8765) => 0x89047b68
+crc32(0x89047b68, qword:0x34567890) => 0x68d0e9ae
diff --git a/tests/test27 b/tests/test27
index 24fb8aa9..fdde43c8 100755
--- a/tests/test27
+++ b/tests/test27
Binary files differdiff --git a/tests/test27.c b/tests/test27.c
index 82b72030..140cb4c2 100644
--- a/tests/test27.c
+++ b/tests/test27.c
@@ -107,5 +107,25 @@ int main(int argc, const char** argv)
   GO2(0b0110110)
   GO2(0b1110100)
 
+  unsigned int crc = 0;
+  printf("crc32(0x%x, byte:0x%x) => ", crc, 0);
+  crc = _mm_crc32_u8(crc, 0);
+  printf("0x%x\n", crc);
+  printf("crc32(0x%x, byte:0x%x) => ", crc, 10);
+  crc = _mm_crc32_u8(crc, 10);
+  printf("0x%x\n", crc);
+  printf("crc32(0x%x, dword:0x%x) => ", crc, 0);
+  crc = _mm_crc32_u32(crc, 0);
+  printf("0x%x\n", crc);
+  printf("crc32(0x%x, dword:0x%x) => ", crc, 0x123456);
+  crc = _mm_crc32_u32(crc, 0x123456);
+  printf("0x%x\n", crc);
+  printf("crc32(0x%x, word:0x%x) => ", crc, 0x8765);
+  crc = _mm_crc32_u16(crc, 0x8765);
+  printf("0x%x\n", crc);
+  printf("crc32(0x%x, qword:0x%x) => ", crc, 0xff1234567890);
+  uint64_t crc64 = _mm_crc32_u64(crc, 0xff1234567890);
+  printf("0x%x\n", crc64);
+
   return 0;
 }