1
- #[ cfg( target_arch = "x86" ) ]
2
- pub ( crate ) unsafe fn match_uri_vectored ( _: & [ u8 ] ) -> usize {
3
- unreachable ! ( "AVX2 detection should be disabled for x86" ) ;
4
- }
5
-
6
1
#[ inline]
7
- #[ cfg( target_arch = "x86_64" ) ]
8
2
#[ target_feature( enable = "avx2" , enable = "sse4.2" ) ]
9
3
pub ( crate ) unsafe fn match_uri_vectored ( bytes : & [ u8 ] ) -> usize {
10
4
let mut len = 0usize ;
@@ -26,6 +20,7 @@ pub(crate) unsafe fn match_uri_vectored(bytes: &[u8]) -> usize {
26
20
27
21
#[ inline( always) ]
28
22
#[ allow( non_snake_case, overflowing_literals) ]
23
+ #[ allow( unused) ]
29
24
unsafe fn match_url_char_32_avx ( buf : & [ u8 ] ) -> usize {
30
25
debug_assert ! ( buf. len( ) >= 32 ) ;
31
26
@@ -64,12 +59,6 @@ unsafe fn match_url_char_32_avx(buf: &[u8]) -> usize {
64
59
r. trailing_zeros ( ) as usize
65
60
}
66
61
67
- #[ cfg( target_arch = "x86" ) ]
68
- pub ( crate ) unsafe fn match_header_value_vectored ( _: & [ u8 ] ) -> usize {
69
- unreachable ! ( "AVX2 detection should be disabled for x86" ) ;
70
- }
71
-
72
- #[ cfg( target_arch = "x86_64" ) ]
73
62
#[ target_feature( enable = "avx2" , enable = "sse4.2" ) ]
74
63
pub ( crate ) unsafe fn match_header_value_vectored ( bytes : & [ u8 ] ) -> usize {
75
64
let mut len = 0usize ;
@@ -91,6 +80,7 @@ pub(crate) unsafe fn match_header_value_vectored(bytes: &[u8]) -> usize {
91
80
92
81
#[ inline( always) ]
93
82
#[ allow( non_snake_case) ]
83
+ #[ allow( unused) ]
94
84
unsafe fn match_header_value_char_32_avx ( buf : & [ u8 ] ) -> usize {
95
85
debug_assert ! ( buf. len( ) >= 32 ) ;
96
86
0 commit comments