From 2c9011ef547549e8db781561beabbff0bafd63f8 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Mon, 10 Jun 2024 09:47:47 -0400 Subject: [PATCH 1/2] ci: check x86 --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9150881..058b697 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,7 @@ jobs: needs: - test - simd + - check_x86 - msrv_x64 - msrv_aarch64 - miri @@ -111,6 +112,28 @@ jobs: RUSTFLAGS: -C target_feature=${{ matrix.target_feature }} CARGO_CFG_HTTPARSE_DISABLE_SIMD_COMPILETIME: ${{ matrix.disable_compiletime }} + check_x86: + name: check x86 + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: 1.36.0 + override: true + target: i686-unknown-linux-musl + + # Only build, dev-dependencies don't compile on 1.36.0 + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --target i686-unknown-linux-musl + msrv_x64: name: msrv (x64) runs-on: ubuntu-latest From 10942b32e041b85998a62e200bb9979ba8f7a810 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Mon, 10 Jun 2024 09:58:49 -0400 Subject: [PATCH 2/2] fix avx simd on x86 --- src/simd/avx2.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/simd/avx2.rs b/src/simd/avx2.rs index 4f7d6fa..e6237c2 100644 --- a/src/simd/avx2.rs +++ b/src/simd/avx2.rs @@ -29,11 +29,9 @@ pub(crate) unsafe fn match_uri_vectored(bytes: &[u8]) -> usize { unsafe fn match_url_char_32_avx(buf: &[u8]) -> usize { debug_assert!(buf.len() >= 32); - /* #[cfg(target_arch = "x86")] use core::arch::x86::*; #[cfg(target_arch = "x86_64")] - */ use core::arch::x86_64::*; let ptr = buf.as_ptr(); @@ -96,11 +94,9 @@ pub(crate) unsafe fn match_header_value_vectored(bytes: &[u8]) -> usize { unsafe fn match_header_value_char_32_avx(buf: &[u8]) -> usize { debug_assert!(buf.len() >= 32); - /* #[cfg(target_arch = "x86")] use core::arch::x86::*; #[cfg(target_arch = "x86_64")] - */ use core::arch::x86_64::*; let ptr = buf.as_ptr();