Skip to content

Commit

Permalink
[derive] Use fallback types for big endian types on aarch64
Browse files Browse the repository at this point in the history
Update src/impls.rs

Co-authored-by: Joshua Liebow-Feeser <[email protected]>
  • Loading branch information
lucarlig and joshlf committed Oct 2, 2024
1 parent f57b0d7 commit c729657
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,16 @@ jobs:
- target: "wasm32-wasi"
event_name: "pull_request"

include:
# big endian types should use fallback types till when
# Neon intrinsic are fixed
# https://github.com/rust-lang/stdarch/issues/1484
# https://github.com/google/zerocopy/pull/1786
- toolchain: "nightly"
target: "aarch64_be-unknown-linux-gnu"
features: "--all-features"
crate: "zerocopy"

name: Build & Test (${{ matrix.crate }} / ${{ matrix.toolchain }} / ${{ matrix.features }} / ${{ matrix.target }})

steps:
Expand Down Expand Up @@ -575,6 +585,14 @@ jobs:
# `roll-pinned-toolchain-versions.yml`.
kani-version: 0.55.0

check_be_aarch64:
runs-on: ubuntu-latest
name: Check big endian for aarch64 target
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Check big endian for aarch64 target
run: ./cargo.sh +nightly build --target=aarch64_be-unknown-linux-gnu -Zbuild-std --features simd

check_fmt:
runs-on: ubuntu-latest
name: Check Rust formatting
Expand Down
4 changes: 3 additions & 1 deletion src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,9 @@ mod simd {
);
#[cfg(zerocopy_aarch64_simd)]
simd_arch_mod!(
#[cfg(target_arch = "aarch64")]
// NOTE(https://github.com/rust-lang/stdarch/issues/1484): NEON intrinsics are currently
// broken on big-endian platforms.
#[cfg(all(target_arch = "aarch64", target_endian = "little"))]
aarch64, aarch64, float32x2_t, float32x4_t, float64x1_t, float64x2_t, int8x8_t, int8x8x2_t,
int8x8x3_t, int8x8x4_t, int8x16_t, int8x16x2_t, int8x16x3_t, int8x16x4_t, int16x4_t,
int16x8_t, int32x2_t, int32x4_t, int64x1_t, int64x2_t, poly8x8_t, poly8x8x2_t, poly8x8x3_t,
Expand Down

0 comments on commit c729657

Please sign in to comment.