fix arm build

This commit is contained in:
Konstantinos Margaritis 2024-02-19 19:42:14 +08:00
parent 9643bb4636
commit 880d6bcbf0

View File

@ -182,7 +182,7 @@ static really_inline m128 set1_2x64(u64a c) {
}
static really_inline m128 insert32_m128(m128 in, u32 val, const int imm) {
return vsetq_lane_u32((uint32x4_t)in, val, imm);
return (m128) vsetq_lane_u32(val, (uint32x4_t)in, imm);
}
static really_inline u32 movd(const m128 in) {
@ -199,12 +199,6 @@ m128 load_m128_from_u64a(const u64a *p) {
return (m128) vsetq_lane_u64(*p, (uint64x2_t) zeroes128(), 0);
}
/* another form of movq */
static really_inline
m128 load_m128_from_u64a(const u64a *p) {
return (m128) vsetq_lane_u64(*p, (uint64x2_t) zeroes128(), 0);
}
static really_inline u32 extract32from128(const m128 in, unsigned imm) {
#if defined(HAVE__BUILTIN_CONSTANT_P)
if (__builtin_constant_p(imm)) {
@ -449,4 +443,14 @@ m128 set2x64(u64a hi, u64a lo) {
return (m128) vld1q_u64((uint64_t *) data);
}
static really_inline
m128 widenlo128(m128 x) {
return (m128) vmovl_u32(vget_low_u32((uint32x4_t)x));
}
static really_inline
m128 widenhi128(m128 x) {
return (m128) vmovl_u32(vget_high_u32((uint32x4_t)x));
}
#endif // ARCH_ARM_SIMD_UTILS_H