diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fe40053c60..05353c31fc9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -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 diff --git a/src/impls.rs b/src/impls.rs index 81cd9223149..1deeb1fe395 100644 --- a/src/impls.rs +++ b/src/impls.rs @@ -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,