Skip to content

Commit

Permalink
arm 32 bits: native def fixes; workarounds for gcc
Browse files Browse the repository at this point in the history
Co-authored-by: Michael R. Crusoe <crusoe@debian.org>
  • Loading branch information
Cuda-Chen and mr-c committed Mar 22, 2024
1 parent 72bde75 commit 22900e6
Show file tree
Hide file tree
Showing 17 changed files with 163 additions and 153 deletions.
16 changes: 8 additions & 8 deletions simde/arm/neon/cvt.h
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,7 @@ simde_vcvta_u64_f64(simde_float64x1_t a) {
SIMDE_FUNCTION_ATTRIBUTES
simde_int32x2_t
simde_vcvta_s32_f32(simde_float32x2_t a) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vcvta_s32_f32(a);
#else
simde_float32x2_private a_ = simde_float32x2_to_private(a);
Expand All @@ -1756,7 +1756,7 @@ simde_vcvta_s32_f32(simde_float32x2_t a) {
return simde_int32x2_from_private(r_);
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vcvta_s32_f32
#define vcvta_s32_f32(a) simde_vcvta_s32_f32(a)
#endif
Expand Down Expand Up @@ -1811,7 +1811,7 @@ simde_vcvtaq_u16_f16(simde_float16x8_t a) {
SIMDE_FUNCTION_ATTRIBUTES
simde_int32x4_t
simde_vcvtaq_s32_f32(simde_float32x4_t a) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vcvtaq_s32_f32(a);
#else
simde_float32x4_private a_ = simde_float32x4_to_private(a);
Expand All @@ -1825,7 +1825,7 @@ simde_vcvtaq_s32_f32(simde_float32x4_t a) {
return simde_int32x4_from_private(r_);
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vcvtaq_s32_f32
#define vcvtaq_s32_f32(a) simde_vcvtaq_s32_f32(a)
#endif
Expand Down Expand Up @@ -1878,7 +1878,7 @@ simde_vcvtaq_u64_f64(simde_float64x2_t a) {
SIMDE_FUNCTION_ATTRIBUTES
simde_uint32x2_t
simde_vcvta_u32_f32(simde_float32x2_t a) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vcvta_u32_f32(a);
#else
simde_float32x2_private a_ = simde_float32x2_to_private(a);
Expand All @@ -1892,15 +1892,15 @@ simde_vcvta_u32_f32(simde_float32x2_t a) {
return simde_uint32x2_from_private(r_);
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vcvta_u32_f32
#define vcvta_u32_f32(a) simde_vcvta_u32_f32(a)
#endif

SIMDE_FUNCTION_ATTRIBUTES
simde_uint32x4_t
simde_vcvtaq_u32_f32(simde_float32x4_t a) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vcvtaq_u32_f32(a);
#else
simde_float32x4_private a_ = simde_float32x4_to_private(a);
Expand All @@ -1914,7 +1914,7 @@ simde_vcvtaq_u32_f32(simde_float32x4_t a) {
return simde_uint32x4_from_private(r_);
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vcvtaq_u32_f32
#define vcvtaq_u32_f32(a) simde_vcvtaq_u32_f32(a)
#endif
Expand Down
8 changes: 4 additions & 4 deletions simde/arm/neon/cvtm.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ simde_vcvtmq_u16_f16(simde_float16x8_t a) {
SIMDE_FUNCTION_ATTRIBUTES
simde_uint32x4_t
simde_vcvtmq_u32_f32(simde_float32x4_t a) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE) && !defined(SIMDE_BUG_CLANG_46844)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE) && !defined(SIMDE_BUG_CLANG_46844)
return vcvtmq_u32_f32(a);
#else
simde_float32x4_private a_ = simde_float32x4_to_private(a);
Expand All @@ -422,7 +422,7 @@ simde_vcvtmq_u32_f32(simde_float32x4_t a) {
return simde_uint32x4_from_private(r_);
#endif
}
#if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vcvtmq_u32_f32
#define vcvtmq_u32_f32(a) simde_vcvtmq_u32_f32(a)
#endif
Expand Down Expand Up @@ -512,7 +512,7 @@ simde_vcvtm_u16_f16(simde_float16x4_t a) {
SIMDE_FUNCTION_ATTRIBUTES
simde_uint32x2_t
simde_vcvtm_u32_f32(simde_float32x2_t a) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vcvtm_u32_f32(a);
#else
simde_float32x2_private a_ = simde_float32x2_to_private(a);
Expand All @@ -526,7 +526,7 @@ simde_vcvtm_u32_f32(simde_float32x2_t a) {
return simde_uint32x2_from_private(r_);
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vcvtm_u32_f32
#define vcvtm_u32_f32(a) simde_vcvtm_u32_f32(a)
#endif
Expand Down
16 changes: 8 additions & 8 deletions simde/arm/neon/cvtn.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ SIMDE_BEGIN_DECLS_
SIMDE_FUNCTION_ATTRIBUTES
simde_int32x4_t
simde_vcvtnq_s32_f32(simde_float32x4_t a) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vcvtnq_s32_f32(a);
#else
simde_float32x4_private a_ = simde_float32x4_to_private(a);
Expand All @@ -65,7 +65,7 @@ simde_vcvtnq_s32_f32(simde_float32x4_t a) {
return simde_int32x4_from_private(r_);
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vcvtnq_s32_f32
#define vcvtnq_s32_f32(a) simde_vcvtnq_s32_f32(a)
#endif
Expand Down Expand Up @@ -307,7 +307,7 @@ simde_vcvtns_u32_f32(simde_float32 a) {
SIMDE_FUNCTION_ATTRIBUTES
simde_uint32x4_t
simde_vcvtnq_u32_f32(simde_float32x4_t a) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE) && !defined(SIMDE_BUG_CLANG_46844)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE) && !defined(SIMDE_BUG_CLANG_46844)
return vcvtnq_u32_f32(a);
#else
simde_float32x4_private a_ = simde_float32x4_to_private(a);
Expand All @@ -333,7 +333,7 @@ simde_vcvtnq_u32_f32(simde_float32x4_t a) {
return simde_uint32x4_from_private(r_);
#endif
}
#if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vcvtnq_u32_f32
#define vcvtnq_u32_f32(a) simde_vcvtnq_u32_f32(a)
#endif
Expand Down Expand Up @@ -514,7 +514,7 @@ simde_vcvtn_u16_f16(simde_float16x4_t a) {
SIMDE_FUNCTION_ATTRIBUTES
simde_uint32x2_t
simde_vcvtn_u32_f32(simde_float32x2_t a) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vcvtn_u32_f32(a);
#else
simde_float32x2_private a_ = simde_float32x2_to_private(a);
Expand All @@ -528,15 +528,15 @@ simde_vcvtn_u32_f32(simde_float32x2_t a) {
return simde_uint32x2_from_private(r_);
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vcvtn_u32_f32
#define vcvtn_u32_f32(a) simde_vcvtn_u32_f32(a)
#endif

SIMDE_FUNCTION_ATTRIBUTES
simde_int32x2_t
simde_vcvtn_s32_f32(simde_float32x2_t a) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vcvtn_s32_f32(a);
#else
simde_float32x2_private a_ = simde_float32x2_to_private(a);
Expand All @@ -550,7 +550,7 @@ simde_vcvtn_s32_f32(simde_float32x2_t a) {
return simde_int32x2_from_private(r_);
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vcvtn_s32_f32
#define vcvtn_s32_f32(a) simde_vcvtn_s32_f32(a)
#endif
Expand Down
8 changes: 4 additions & 4 deletions simde/arm/neon/cvtp.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ simde_vcvtpq_u16_f16(simde_float16x8_t a) {
SIMDE_FUNCTION_ATTRIBUTES
simde_uint32x4_t
simde_vcvtpq_u32_f32(simde_float32x4_t a) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE) && !defined(SIMDE_BUG_CLANG_46844)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE) && !defined(SIMDE_BUG_CLANG_46844)
return vcvtpq_u32_f32(a);
#else
simde_float32x4_private a_ = simde_float32x4_to_private(a);
Expand All @@ -422,7 +422,7 @@ simde_vcvtpq_u32_f32(simde_float32x4_t a) {
return simde_uint32x4_from_private(r_);
#endif
}
#if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vcvtpq_u32_f32
#define vcvtpq_u32_f32(a) simde_vcvtpq_u32_f32(a)
#endif
Expand Down Expand Up @@ -512,7 +512,7 @@ simde_vcvtp_u16_f16(simde_float16x4_t a) {
SIMDE_FUNCTION_ATTRIBUTES
simde_uint32x2_t
simde_vcvtp_u32_f32(simde_float32x2_t a) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vcvtp_u32_f32(a);
#else
simde_float32x2_private a_ = simde_float32x2_to_private(a);
Expand All @@ -526,7 +526,7 @@ simde_vcvtp_u32_f32(simde_float32x2_t a) {
return simde_uint32x2_from_private(r_);
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vcvtp_u32_f32
#define vcvtp_u32_f32(a) simde_vcvtp_u32_f32(a)
#endif
Expand Down
4 changes: 2 additions & 2 deletions simde/arm/neon/ld2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ simde_vld2q_p16(simde_poly16_t const ptr[HEDLEY_ARRAY_PARAM(16)]) {
SIMDE_FUNCTION_ATTRIBUTES
simde_poly64x2x2_t
simde_vld2q_p64(simde_poly64_t const ptr[HEDLEY_ARRAY_PARAM(4)]) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vld2q_p64(ptr);
#else
simde_poly64x2_private r_[2];
Expand All @@ -1262,7 +1262,7 @@ simde_vld2q_p64(simde_poly64_t const ptr[HEDLEY_ARRAY_PARAM(4)]) {
return r;
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vld2q_p64
#define vld2q_p64(a) simde_vld2q_p64((a))
#endif
Expand Down
36 changes: 18 additions & 18 deletions simde/arm/neon/ld2_dup.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ simde_vld2q_dup_f16(simde_float16_t const * ptr) {
SIMDE_FUNCTION_ATTRIBUTES
simde_float32x4x2_t
simde_vld2q_dup_f32(simde_float32 const * ptr) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vld2q_dup_f32(ptr);
#else
simde_float32x4x2_t r;
Expand All @@ -276,7 +276,7 @@ simde_vld2q_dup_f32(simde_float32 const * ptr) {
return r;
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vld2q_dup_f32
#define vld2q_dup_f32(a) simde_vld2q_dup_f32((a))
#endif
Expand All @@ -303,7 +303,7 @@ simde_vld2q_dup_f64(simde_float64 const * ptr) {
SIMDE_FUNCTION_ATTRIBUTES
simde_int8x16x2_t
simde_vld2q_dup_s8(int8_t const * ptr) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vld2q_dup_s8(ptr);
#else
simde_int8x16x2_t r;
Expand All @@ -314,15 +314,15 @@ simde_vld2q_dup_s8(int8_t const * ptr) {
return r;
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vld2q_dup_s8
#define vld2q_dup_s8(a) simde_vld2q_dup_s8((a))
#endif

SIMDE_FUNCTION_ATTRIBUTES
simde_int16x8x2_t
simde_vld2q_dup_s16(int16_t const * ptr) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vld2q_dup_s16(ptr);
#else
simde_int16x8x2_t r;
Expand All @@ -333,15 +333,15 @@ simde_vld2q_dup_s16(int16_t const * ptr) {
return r;
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vld2q_dup_s16
#define vld2q_dup_s16(a) simde_vld2q_dup_s16((a))
#endif

SIMDE_FUNCTION_ATTRIBUTES
simde_int32x4x2_t
simde_vld2q_dup_s32(int32_t const * ptr) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vld2q_dup_s32(ptr);
#else
simde_int32x4x2_t r;
Expand All @@ -352,15 +352,15 @@ simde_vld2q_dup_s32(int32_t const * ptr) {
return r;
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vld2q_dup_s32
#define vld2q_dup_s32(a) simde_vld2q_dup_s32((a))
#endif

SIMDE_FUNCTION_ATTRIBUTES
simde_int64x2x2_t
simde_vld2q_dup_s64(int64_t const * ptr) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vld2q_dup_s64(ptr);
#else
simde_int64x2x2_t r;
Expand All @@ -371,15 +371,15 @@ simde_vld2q_dup_s64(int64_t const * ptr) {
return r;
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vld2q_dup_s64
#define vld2q_dup_s64(a) simde_vld2q_dup_s64((a))
#endif

SIMDE_FUNCTION_ATTRIBUTES
simde_uint8x16x2_t
simde_vld2q_dup_u8(uint8_t const * ptr) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vld2q_dup_u8(ptr);
#else
simde_uint8x16x2_t r;
Expand All @@ -390,15 +390,15 @@ simde_vld2q_dup_u8(uint8_t const * ptr) {
return r;
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vld2q_dup_u8
#define vld2q_dup_u8(a) simde_vld2q_dup_u8((a))
#endif

SIMDE_FUNCTION_ATTRIBUTES
simde_uint16x8x2_t
simde_vld2q_dup_u16(uint16_t const * ptr) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vld2q_dup_u16(ptr);
#else
simde_uint16x8x2_t r;
Expand All @@ -409,15 +409,15 @@ simde_vld2q_dup_u16(uint16_t const * ptr) {
return r;
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vld2q_dup_u16
#define vld2q_dup_u16(a) simde_vld2q_dup_u16((a))
#endif

SIMDE_FUNCTION_ATTRIBUTES
simde_uint32x4x2_t
simde_vld2q_dup_u32(uint32_t const * ptr) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vld2q_dup_u32(ptr);
#else
simde_uint32x4x2_t r;
Expand All @@ -428,15 +428,15 @@ simde_vld2q_dup_u32(uint32_t const * ptr) {
return r;
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vld2q_dup_u32
#define vld2q_dup_u32(a) simde_vld2q_dup_u32((a))
#endif

SIMDE_FUNCTION_ATTRIBUTES
simde_uint64x2x2_t
simde_vld2q_dup_u64(uint64_t const * ptr) {
#if defined(SIMDE_ARM_NEON_A32V8_NATIVE)
#if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
return vld2q_dup_u64(ptr);
#else
simde_uint64x2x2_t r;
Expand All @@ -447,7 +447,7 @@ simde_vld2q_dup_u64(uint64_t const * ptr) {
return r;
#endif
}
#if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
#if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
#undef vld2q_dup_u64
#define vld2q_dup_u64(a) simde_vld2q_dup_u64((a))
#endif
Expand Down

0 comments on commit 22900e6

Please sign in to comment.