Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compilation on x86 #168

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
needs:
- test
- simd
- check_x86
- msrv_x64
- msrv_aarch64
- miri
Expand Down Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/simd/avx2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@

#[inline(always)]
#[allow(non_snake_case, overflowing_literals)]
unsafe fn match_url_char_32_avx(buf: &[u8]) -> usize {

Check warning on line 29 in src/simd/avx2.rs

View workflow job for this annotation

GitHub Actions / check x86

function is never used: `match_url_char_32_avx`
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();
Expand Down Expand Up @@ -93,14 +91,12 @@

#[inline(always)]
#[allow(non_snake_case)]
unsafe fn match_header_value_char_32_avx(buf: &[u8]) -> usize {

Check warning on line 94 in src/simd/avx2.rs

View workflow job for this annotation

GitHub Actions / check x86

function is never used: `match_header_value_char_32_avx`
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();
Expand Down
Loading