Skip to content

Commit

Permalink
wasm simd128: more powerpc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed May 20, 2023
1 parent 4de999a commit 7cb5691
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 22 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ jobs:
arch_deb: s390x
# power: 150 failures: x86/{avx512/range,sse,sse3}, arm/neon/*, wasm_simd128/, wasm_relexad_simd/*
# https://github.com/simd-everywhere/simde/issues/903
# - version: 12
# distro: ubuntu-22.04
# cross: power9
# arch_gnu: powerpc64le
# arch_deb: ppc64el
- version: 12
distro: ubuntu-22.04
cross: power9
arch_gnu: powerpc64le
arch_deb: ppc64el
runs-on: ${{ matrix.distro }}
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion docker/cross-files/power9-gcc-12-ccache.cross
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ cpp_args = ['-mcpu=power9', '-Wextra', '-Werror']

[host_machine]
system = 'linux'
cpu_family = 'powerpc64'
cpu_family = 'ppc64'
cpu = 'ppc64el'
endian = 'little'
2 changes: 1 addition & 1 deletion docker/cross-files/power9-gcc-12.cross
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ cpp_args = ['-mcpu=power9', '-Wextra', '-Werror']

[host_machine]
system = 'linux'
cpu_family = 'powerpc64'
cpu_family = 'ppc64'
cpu = 'ppc64el'
endian = 'little'
2 changes: 1 addition & 1 deletion docker/cross-files/ppc64el-gcc-10-debflags.cross
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ cpp_link_args = ['-Wl,-z,relro', '-Wl,-z,now']

[host_machine]
system = 'linux'
cpu_family = 'powerpc64'
cpu_family = 'ppc64'
cpu = 'ppc64el'
endian = 'little'
2 changes: 1 addition & 1 deletion docker/cross-files/ppc64el-gcc-10.cross
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ cpp_args = ['-Wextra', '-Werror', '-g',]

[host_machine]
system = 'linux'
cpu_family = 'powerpc64'
cpu_family = 'ppc64'
cpu = 'ppc64el'
endian = 'little'
2 changes: 1 addition & 1 deletion docker/cross-files/ppc64el-gcc-11-debflags.cross
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ cpp_link_args = ['-Wl,-z,relro', '-Wl,-z,now']

[host_machine]
system = 'linux'
cpu_family = 'powerpc64'
cpu_family = 'ppc64'
cpu = 'ppc64el'
endian = 'little'
2 changes: 1 addition & 1 deletion docker/cross-files/ppc64el-gcc-11.cross
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ cpp_args = ['-Wextra', '-Werror', '-g',]

[host_machine]
system = 'linux'
cpu_family = 'powerpc64'
cpu_family = 'ppc64'
cpu = 'ppc64el'
endian = 'little'
2 changes: 1 addition & 1 deletion docker/cross-files/ppc64el-gcc-12-debflags.cross
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ cpp_link_args = ['-Wl,-z,relro', '-Wl,-z,now']

[host_machine]
system = 'linux'
cpu_family = 'powerpc64'
cpu_family = 'ppc64'
cpu = 'ppc64el'
endian = 'little'
2 changes: 1 addition & 1 deletion simde/arm/neon/dup_n.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ simde_vdupq_n_f16(simde_float16 value) {
return simde_float16x8_from_private(r_);
#endif
}
#define simde_vmovq_n_f32 simde_vdupq_n_f32
#define simde_vmovq_n_f16 simde_vdupq_n_f16
#if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
#undef vdupq_n_f16
#define vdupq_n_f16(value) simde_vdupq_n_f16((value))
Expand Down
12 changes: 3 additions & 9 deletions simde/wasm/simd128.h
Original file line number Diff line number Diff line change
Expand Up @@ -4367,7 +4367,7 @@ simde_wasm_u16x8_shr (simde_v128_t a, uint32_t count) {
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
r_.neon_u16 = vshlq_u16(a_.neon_u16, vdupq_n_s16(-HEDLEY_STATIC_CAST(int16_t, count & 15)));
#elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
r_.altivec_i16 = vec_sra(a_.altivec_i16, vec_splats(HEDLEY_STATIC_CAST(unsigned short, count & 15)));
r_.altivec_u16 = vec_sr(a_.altivec_u16, vec_splats(HEDLEY_STATIC_CAST(unsigned short, count & 15)));
#elif defined(SIMDE_VECTOR_SUBSCRIPT) && defined(SIMDE_VECTOR_SCALAR)
r_.u16 = a_.u16 >> (count & 15);
#else
Expand Down Expand Up @@ -4399,7 +4399,7 @@ simde_wasm_u32x4_shr (simde_v128_t a, uint32_t count) {
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
r_.neon_u32 = vshlq_u32(a_.neon_u32, vdupq_n_s32(-HEDLEY_STATIC_CAST(int32_t, count & 31)));
#elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
r_.altivec_i32 = vec_sra(a_.altivec_i32, vec_splats(HEDLEY_STATIC_CAST(unsigned int, count & 31)));
r_.altivec_u32 = vec_sr(a_.altivec_u32, vec_splats(HEDLEY_STATIC_CAST(unsigned int, count & 31)));
#elif defined(SIMDE_VECTOR_SUBSCRIPT) && defined(SIMDE_VECTOR_SCALAR)
r_.u32 = a_.u32 >> (count & 31);
#else
Expand Down Expand Up @@ -4434,7 +4434,7 @@ simde_wasm_u64x2_shr (simde_v128_t a, uint32_t count) {
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
r_.neon_u64 = vshlq_u64(a_.neon_u64, vdupq_n_s64(-HEDLEY_STATIC_CAST(int64_t, count & 63)));
#elif defined(SIMDE_POWER_ALTIVEC_P8_NATIVE)
r_.altivec_i64 = vec_sra(a_.altivec_i64, vec_splats(HEDLEY_STATIC_CAST(unsigned long long, count & 63)));
r_.altivec_u64 = vec_sr(a_.altivec_u64, vec_splats(HEDLEY_STATIC_CAST(unsigned long long, count & 63)));
#elif defined(SIMDE_VECTOR_SUBSCRIPT) && defined(SIMDE_VECTOR_SCALAR)
r_.u64 = a_.u64 >> (count & 63);
#else
Expand Down Expand Up @@ -4820,12 +4820,6 @@ simde_wasm_i16x8_mul (simde_v128_t a, simde_v128_t b) {
r_.sse_m128i = _mm_mullo_epi16(a_.sse_m128i, b_.sse_m128i);
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
r_.neon_i16 = vmulq_s16(a_.neon_i16, b_.neon_i16);
#elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
r_.altivec_i16 =
vec_pack(
vec_mule(a_.altivec_i16, b_.altivec_i16),
vec_mulo(a_.altivec_i16, b_.altivec_i16)
);
#elif defined(SIMDE_VECTOR_SUBSCRIPT)
r_.i16 = a_.i16 * b_.i16;
#else
Expand Down

0 comments on commit 7cb5691

Please sign in to comment.