@@ -45,6 +45,11 @@ unsafe fn test_crc() {
45
45
let v = 0xef ;
46
46
let i = _mm_crc32_u8 ( crc, v) ;
47
47
assert_eq ! ( i, 0xb95511db ) ;
48
+
49
+ let crc = 0xbadeafe ;
50
+ let v = 0xc0 ;
51
+ let i = _mm_crc32_u8 ( crc, v) ;
52
+ assert_eq ! ( i, 0x9c905b7c ) ;
48
53
}
49
54
test_mm_crc32_u8 ( ) ;
50
55
@@ -59,6 +64,11 @@ unsafe fn test_crc() {
59
64
let v = 0xa6c0 ;
60
65
let i = _mm_crc32_u16 ( crc, v) ;
61
66
assert_eq ! ( i, 0xab04fe4e ) ;
67
+
68
+ let crc = 0xbadeafe ;
69
+ let v = 0xc0fe ;
70
+ let i = _mm_crc32_u16 ( crc, v) ;
71
+ assert_eq ! ( i, 0x4b5fad4b ) ;
62
72
}
63
73
test_mm_crc32_u16 ( ) ;
64
74
@@ -73,6 +83,11 @@ unsafe fn test_crc() {
73
83
let v = 0x885585c2 ;
74
84
let i = _mm_crc32_u32 ( crc, v) ;
75
85
assert_eq ! ( i, 0x22443a7b ) ;
86
+
87
+ let crc = 0xbadeafe ;
88
+ let v = 0xc0febeef ;
89
+ let i = _mm_crc32_u32 ( crc, v) ;
90
+ assert_eq ! ( i, 0xb309502f ) ;
76
91
}
77
92
test_mm_crc32_u32 ( ) ;
78
93
@@ -88,6 +103,11 @@ unsafe fn test_crc() {
88
103
let v = 0x1a7ea8fb571746b0 ;
89
104
let i = _mm_crc32_u64 ( crc, v) ;
90
105
assert_eq ! ( i, 0x315b4f6 ) ;
106
+
107
+ let crc = 0xbadeafe ;
108
+ let v = 0xc0febeefdadafefe ;
109
+ let i = _mm_crc32_u64 ( crc, v) ;
110
+ assert_eq ! ( i, 0x5b44f54f ) ;
91
111
}
92
112
#[ cfg( not( target_arch = "x86_64" ) ) ]
93
113
unsafe fn test_mm_crc32_u64 ( ) { }
0 commit comments