1*13fbcb42Sjoerg /*===---- wasm_simd128.h - WebAssembly portable SIMD intrinsics ------------===
2*13fbcb42Sjoerg *
3*13fbcb42Sjoerg * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*13fbcb42Sjoerg * See https://llvm.org/LICENSE.txt for license information.
5*13fbcb42Sjoerg * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*13fbcb42Sjoerg *
7*13fbcb42Sjoerg *===-----------------------------------------------------------------------===
8*13fbcb42Sjoerg */
9*13fbcb42Sjoerg
10*13fbcb42Sjoerg #ifndef __WASM_SIMD128_H
11*13fbcb42Sjoerg #define __WASM_SIMD128_H
12*13fbcb42Sjoerg
13*13fbcb42Sjoerg #include <stdbool.h>
14*13fbcb42Sjoerg #include <stdint.h>
15*13fbcb42Sjoerg
16*13fbcb42Sjoerg // User-facing type
17*13fbcb42Sjoerg typedef int32_t v128_t __attribute__((__vector_size__(16), __aligned__(16)));
18*13fbcb42Sjoerg
19*13fbcb42Sjoerg // Internal types determined by clang builtin definitions
20*13fbcb42Sjoerg typedef int32_t __v128_u __attribute__((__vector_size__(16), __aligned__(1)));
21*13fbcb42Sjoerg typedef signed char __i8x16
22*13fbcb42Sjoerg __attribute__((__vector_size__(16), __aligned__(16)));
23*13fbcb42Sjoerg typedef unsigned char __u8x16
24*13fbcb42Sjoerg __attribute__((__vector_size__(16), __aligned__(16)));
25*13fbcb42Sjoerg typedef short __i16x8 __attribute__((__vector_size__(16), __aligned__(16)));
26*13fbcb42Sjoerg typedef unsigned short __u16x8
27*13fbcb42Sjoerg __attribute__((__vector_size__(16), __aligned__(16)));
28*13fbcb42Sjoerg typedef int __i32x4 __attribute__((__vector_size__(16), __aligned__(16)));
29*13fbcb42Sjoerg typedef unsigned int __u32x4
30*13fbcb42Sjoerg __attribute__((__vector_size__(16), __aligned__(16)));
31*13fbcb42Sjoerg typedef long long __i64x2 __attribute__((__vector_size__(16), __aligned__(16)));
32*13fbcb42Sjoerg typedef unsigned long long __u64x2
33*13fbcb42Sjoerg __attribute__((__vector_size__(16), __aligned__(16)));
34*13fbcb42Sjoerg typedef float __f32x4 __attribute__((__vector_size__(16), __aligned__(16)));
35*13fbcb42Sjoerg typedef double __f64x2 __attribute__((__vector_size__(16), __aligned__(16)));
36*13fbcb42Sjoerg
37*13fbcb42Sjoerg typedef signed char __i8x8 __attribute__((__vector_size__(8), __aligned__(8)));
38*13fbcb42Sjoerg typedef unsigned char __u8x8
39*13fbcb42Sjoerg __attribute__((__vector_size__(8), __aligned__(8)));
40*13fbcb42Sjoerg typedef short __i16x4 __attribute__((__vector_size__(8), __aligned__(8)));
41*13fbcb42Sjoerg typedef unsigned short __u16x4
42*13fbcb42Sjoerg __attribute__((__vector_size__(8), __aligned__(8)));
43*13fbcb42Sjoerg typedef int __i32x2 __attribute__((__vector_size__(8), __aligned__(8)));
44*13fbcb42Sjoerg typedef unsigned int __u32x2
45*13fbcb42Sjoerg __attribute__((__vector_size__(8), __aligned__(8)));
46*13fbcb42Sjoerg
47*13fbcb42Sjoerg #define __DEFAULT_FN_ATTRS \
48*13fbcb42Sjoerg __attribute__((__always_inline__, __nodebug__, __target__("simd128"), \
49*13fbcb42Sjoerg __min_vector_width__(128)))
50*13fbcb42Sjoerg
51*13fbcb42Sjoerg #define __REQUIRE_CONSTANT(c) \
52*13fbcb42Sjoerg __attribute__((__diagnose_if__(!__builtin_constant_p(c), \
53*13fbcb42Sjoerg #c " must be constant", "error")))
54*13fbcb42Sjoerg
wasm_v128_load(const void * __mem)55*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_load(const void *__mem) {
56*13fbcb42Sjoerg // UB-free unaligned access copied from xmmintrin.h
57*13fbcb42Sjoerg struct __wasm_v128_load_struct {
58*13fbcb42Sjoerg __v128_u __v;
59*13fbcb42Sjoerg } __attribute__((__packed__, __may_alias__));
60*13fbcb42Sjoerg return ((const struct __wasm_v128_load_struct *)__mem)->__v;
61*13fbcb42Sjoerg }
62*13fbcb42Sjoerg
63*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_v128_load8_splat(const void * __mem)64*13fbcb42Sjoerg wasm_v128_load8_splat(const void *__mem) {
65*13fbcb42Sjoerg struct __wasm_v128_load8_splat_struct {
66*13fbcb42Sjoerg uint8_t __v;
67*13fbcb42Sjoerg } __attribute__((__packed__, __may_alias__));
68*13fbcb42Sjoerg uint8_t __v = ((const struct __wasm_v128_load8_splat_struct *)__mem)->__v;
69*13fbcb42Sjoerg return (v128_t)(__u8x16){__v, __v, __v, __v, __v, __v, __v, __v,
70*13fbcb42Sjoerg __v, __v, __v, __v, __v, __v, __v, __v};
71*13fbcb42Sjoerg }
72*13fbcb42Sjoerg
73*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_v128_load16_splat(const void * __mem)74*13fbcb42Sjoerg wasm_v128_load16_splat(const void *__mem) {
75*13fbcb42Sjoerg struct __wasm_v128_load16_splat_struct {
76*13fbcb42Sjoerg uint16_t __v;
77*13fbcb42Sjoerg } __attribute__((__packed__, __may_alias__));
78*13fbcb42Sjoerg uint16_t __v = ((const struct __wasm_v128_load16_splat_struct *)__mem)->__v;
79*13fbcb42Sjoerg return (v128_t)(__u16x8){__v, __v, __v, __v, __v, __v, __v, __v};
80*13fbcb42Sjoerg }
81*13fbcb42Sjoerg
82*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_v128_load32_splat(const void * __mem)83*13fbcb42Sjoerg wasm_v128_load32_splat(const void *__mem) {
84*13fbcb42Sjoerg struct __wasm_v128_load32_splat_struct {
85*13fbcb42Sjoerg uint32_t __v;
86*13fbcb42Sjoerg } __attribute__((__packed__, __may_alias__));
87*13fbcb42Sjoerg uint32_t __v = ((const struct __wasm_v128_load32_splat_struct *)__mem)->__v;
88*13fbcb42Sjoerg return (v128_t)(__u32x4){__v, __v, __v, __v};
89*13fbcb42Sjoerg }
90*13fbcb42Sjoerg
91*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_v128_load64_splat(const void * __mem)92*13fbcb42Sjoerg wasm_v128_load64_splat(const void *__mem) {
93*13fbcb42Sjoerg struct __wasm_v128_load64_splat_struct {
94*13fbcb42Sjoerg uint64_t __v;
95*13fbcb42Sjoerg } __attribute__((__packed__, __may_alias__));
96*13fbcb42Sjoerg uint64_t __v = ((const struct __wasm_v128_load64_splat_struct *)__mem)->__v;
97*13fbcb42Sjoerg return (v128_t)(__u64x2){__v, __v};
98*13fbcb42Sjoerg }
99*13fbcb42Sjoerg
100*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i16x8_load8x8(const void * __mem)101*13fbcb42Sjoerg wasm_i16x8_load8x8(const void *__mem) {
102*13fbcb42Sjoerg struct __wasm_i16x8_load8x8_struct {
103*13fbcb42Sjoerg __i8x8 __v;
104*13fbcb42Sjoerg } __attribute__((__packed__, __may_alias__));
105*13fbcb42Sjoerg __i8x8 __v = ((const struct __wasm_i16x8_load8x8_struct *)__mem)->__v;
106*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(__v, __i16x8);
107*13fbcb42Sjoerg }
108*13fbcb42Sjoerg
109*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u16x8_load8x8(const void * __mem)110*13fbcb42Sjoerg wasm_u16x8_load8x8(const void *__mem) {
111*13fbcb42Sjoerg struct __wasm_u16x8_load8x8_struct {
112*13fbcb42Sjoerg __u8x8 __v;
113*13fbcb42Sjoerg } __attribute__((__packed__, __may_alias__));
114*13fbcb42Sjoerg __u8x8 __v = ((const struct __wasm_u16x8_load8x8_struct *)__mem)->__v;
115*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(__v, __u16x8);
116*13fbcb42Sjoerg }
117*13fbcb42Sjoerg
118*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i32x4_load16x4(const void * __mem)119*13fbcb42Sjoerg wasm_i32x4_load16x4(const void *__mem) {
120*13fbcb42Sjoerg struct __wasm_i32x4_load16x4_struct {
121*13fbcb42Sjoerg __i16x4 __v;
122*13fbcb42Sjoerg } __attribute__((__packed__, __may_alias__));
123*13fbcb42Sjoerg __i16x4 __v = ((const struct __wasm_i32x4_load16x4_struct *)__mem)->__v;
124*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(__v, __i32x4);
125*13fbcb42Sjoerg }
126*13fbcb42Sjoerg
127*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u32x4_load16x4(const void * __mem)128*13fbcb42Sjoerg wasm_u32x4_load16x4(const void *__mem) {
129*13fbcb42Sjoerg struct __wasm_u32x4_load16x4_struct {
130*13fbcb42Sjoerg __u16x4 __v;
131*13fbcb42Sjoerg } __attribute__((__packed__, __may_alias__));
132*13fbcb42Sjoerg __u16x4 __v = ((const struct __wasm_u32x4_load16x4_struct *)__mem)->__v;
133*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(__v, __u32x4);
134*13fbcb42Sjoerg }
135*13fbcb42Sjoerg
136*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i64x2_load32x2(const void * __mem)137*13fbcb42Sjoerg wasm_i64x2_load32x2(const void *__mem) {
138*13fbcb42Sjoerg struct __wasm_i64x2_load32x2_struct {
139*13fbcb42Sjoerg __i32x2 __v;
140*13fbcb42Sjoerg } __attribute__((__packed__, __may_alias__));
141*13fbcb42Sjoerg __i32x2 __v = ((const struct __wasm_i64x2_load32x2_struct *)__mem)->__v;
142*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(__v, __i64x2);
143*13fbcb42Sjoerg }
144*13fbcb42Sjoerg
145*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u64x2_load32x2(const void * __mem)146*13fbcb42Sjoerg wasm_u64x2_load32x2(const void *__mem) {
147*13fbcb42Sjoerg struct __wasm_u64x2_load32x2_struct {
148*13fbcb42Sjoerg __u32x2 __v;
149*13fbcb42Sjoerg } __attribute__((__packed__, __may_alias__));
150*13fbcb42Sjoerg __u32x2 __v = ((const struct __wasm_u64x2_load32x2_struct *)__mem)->__v;
151*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(__v, __u64x2);
152*13fbcb42Sjoerg }
153*13fbcb42Sjoerg
154*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_v128_load32_zero(const void * __mem)155*13fbcb42Sjoerg wasm_v128_load32_zero(const void *__mem) {
156*13fbcb42Sjoerg struct __wasm_v128_load32_zero_struct {
157*13fbcb42Sjoerg int32_t __v;
158*13fbcb42Sjoerg } __attribute__((__packed__, __may_alias__));
159*13fbcb42Sjoerg int32_t __v = ((const struct __wasm_v128_load32_zero_struct *)__mem)->__v;
160*13fbcb42Sjoerg return (v128_t)(__i32x4){__v, 0, 0, 0};
161*13fbcb42Sjoerg }
162*13fbcb42Sjoerg
163*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_v128_load64_zero(const void * __mem)164*13fbcb42Sjoerg wasm_v128_load64_zero(const void *__mem) {
165*13fbcb42Sjoerg struct __wasm_v128_load64_zero_struct {
166*13fbcb42Sjoerg int64_t __v;
167*13fbcb42Sjoerg } __attribute__((__packed__, __may_alias__));
168*13fbcb42Sjoerg int64_t __v = ((const struct __wasm_v128_load64_zero_struct *)__mem)->__v;
169*13fbcb42Sjoerg return (v128_t)(__i64x2){__v, 0};
170*13fbcb42Sjoerg }
171*13fbcb42Sjoerg
172*13fbcb42Sjoerg #define wasm_v128_load8_lane(__ptr, __vec, __i) \
173*13fbcb42Sjoerg ((v128_t)__builtin_wasm_load8_lane((const signed char *)(__ptr), \
174*13fbcb42Sjoerg (__i8x16)(__vec), (__i)))
175*13fbcb42Sjoerg
176*13fbcb42Sjoerg #define wasm_v128_load16_lane(__ptr, __vec, __i) \
177*13fbcb42Sjoerg ((v128_t)__builtin_wasm_load16_lane((const short *)(__ptr), \
178*13fbcb42Sjoerg (__i16x8)(__vec), (__i)))
179*13fbcb42Sjoerg
180*13fbcb42Sjoerg #define wasm_v128_load32_lane(__ptr, __vec, __i) \
181*13fbcb42Sjoerg ((v128_t)__builtin_wasm_load32_lane((const int *)(__ptr), (__i32x4)(__vec), \
182*13fbcb42Sjoerg (__i)))
183*13fbcb42Sjoerg
184*13fbcb42Sjoerg #define wasm_v128_load64_lane(__ptr, __vec, __i) \
185*13fbcb42Sjoerg ((v128_t)__builtin_wasm_load64_lane((const long long int *)(__ptr), \
186*13fbcb42Sjoerg (__i64x2)(__vec), (__i)))
187*13fbcb42Sjoerg
wasm_v128_store(void * __mem,v128_t __a)188*13fbcb42Sjoerg static __inline__ void __DEFAULT_FN_ATTRS wasm_v128_store(void *__mem,
189*13fbcb42Sjoerg v128_t __a) {
190*13fbcb42Sjoerg // UB-free unaligned access copied from xmmintrin.h
191*13fbcb42Sjoerg struct __wasm_v128_store_struct {
192*13fbcb42Sjoerg __v128_u __v;
193*13fbcb42Sjoerg } __attribute__((__packed__, __may_alias__));
194*13fbcb42Sjoerg ((struct __wasm_v128_store_struct *)__mem)->__v = __a;
195*13fbcb42Sjoerg }
196*13fbcb42Sjoerg
197*13fbcb42Sjoerg #define wasm_v128_store8_lane(__ptr, __vec, __i) \
198*13fbcb42Sjoerg (__builtin_wasm_store8_lane((signed char *)(__ptr), (__i8x16)(__vec), (__i)))
199*13fbcb42Sjoerg
200*13fbcb42Sjoerg #define wasm_v128_store16_lane(__ptr, __vec, __i) \
201*13fbcb42Sjoerg (__builtin_wasm_store16_lane((short *)(__ptr), (__i16x8)(__vec), (__i)))
202*13fbcb42Sjoerg
203*13fbcb42Sjoerg #define wasm_v128_store32_lane(__ptr, __vec, __i) \
204*13fbcb42Sjoerg (__builtin_wasm_store32_lane((int *)(__ptr), (__i32x4)(__vec), (__i)))
205*13fbcb42Sjoerg
206*13fbcb42Sjoerg #define wasm_v128_store64_lane(__ptr, __vec, __i) \
207*13fbcb42Sjoerg (__builtin_wasm_store64_lane((long long int *)(__ptr), (__i64x2)(__vec), \
208*13fbcb42Sjoerg (__i)))
209*13fbcb42Sjoerg
210*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i8x16_make(int8_t __c0,int8_t __c1,int8_t __c2,int8_t __c3,int8_t __c4,int8_t __c5,int8_t __c6,int8_t __c7,int8_t __c8,int8_t __c9,int8_t __c10,int8_t __c11,int8_t __c12,int8_t __c13,int8_t __c14,int8_t __c15)211*13fbcb42Sjoerg wasm_i8x16_make(int8_t __c0, int8_t __c1, int8_t __c2, int8_t __c3, int8_t __c4,
212*13fbcb42Sjoerg int8_t __c5, int8_t __c6, int8_t __c7, int8_t __c8, int8_t __c9,
213*13fbcb42Sjoerg int8_t __c10, int8_t __c11, int8_t __c12, int8_t __c13,
214*13fbcb42Sjoerg int8_t __c14, int8_t __c15) {
215*13fbcb42Sjoerg return (v128_t)(__i8x16){__c0, __c1, __c2, __c3, __c4, __c5,
216*13fbcb42Sjoerg __c6, __c7, __c8, __c9, __c10, __c11,
217*13fbcb42Sjoerg __c12, __c13, __c14, __c15};
218*13fbcb42Sjoerg }
219*13fbcb42Sjoerg
220*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i16x8_make(int16_t __c0,int16_t __c1,int16_t __c2,int16_t __c3,int16_t __c4,int16_t __c5,int16_t __c6,int16_t __c7)221*13fbcb42Sjoerg wasm_i16x8_make(int16_t __c0, int16_t __c1, int16_t __c2, int16_t __c3,
222*13fbcb42Sjoerg int16_t __c4, int16_t __c5, int16_t __c6, int16_t __c7) {
223*13fbcb42Sjoerg return (v128_t)(__i16x8){__c0, __c1, __c2, __c3, __c4, __c5, __c6, __c7};
224*13fbcb42Sjoerg }
225*13fbcb42Sjoerg
wasm_i32x4_make(int32_t __c0,int32_t __c1,int32_t __c2,int32_t __c3)226*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_make(int32_t __c0,
227*13fbcb42Sjoerg int32_t __c1,
228*13fbcb42Sjoerg int32_t __c2,
229*13fbcb42Sjoerg int32_t __c3) {
230*13fbcb42Sjoerg return (v128_t)(__i32x4){__c0, __c1, __c2, __c3};
231*13fbcb42Sjoerg }
232*13fbcb42Sjoerg
wasm_i64x2_make(int64_t __c0,int64_t __c1)233*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_make(int64_t __c0,
234*13fbcb42Sjoerg int64_t __c1) {
235*13fbcb42Sjoerg return (v128_t)(__i64x2){__c0, __c1};
236*13fbcb42Sjoerg }
237*13fbcb42Sjoerg
wasm_f32x4_make(float __c0,float __c1,float __c2,float __c3)238*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_make(float __c0,
239*13fbcb42Sjoerg float __c1,
240*13fbcb42Sjoerg float __c2,
241*13fbcb42Sjoerg float __c3) {
242*13fbcb42Sjoerg return (v128_t)(__f32x4){__c0, __c1, __c2, __c3};
243*13fbcb42Sjoerg }
244*13fbcb42Sjoerg
wasm_f64x2_make(double __c0,double __c1)245*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_make(double __c0,
246*13fbcb42Sjoerg double __c1) {
247*13fbcb42Sjoerg return (v128_t)(__f64x2){__c0, __c1};
248*13fbcb42Sjoerg }
249*13fbcb42Sjoerg
250*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i8x16_const(int8_t __c0,int8_t __c1,int8_t __c2,int8_t __c3,int8_t __c4,int8_t __c5,int8_t __c6,int8_t __c7,int8_t __c8,int8_t __c9,int8_t __c10,int8_t __c11,int8_t __c12,int8_t __c13,int8_t __c14,int8_t __c15)251*13fbcb42Sjoerg wasm_i8x16_const(int8_t __c0, int8_t __c1, int8_t __c2, int8_t __c3,
252*13fbcb42Sjoerg int8_t __c4, int8_t __c5, int8_t __c6, int8_t __c7,
253*13fbcb42Sjoerg int8_t __c8, int8_t __c9, int8_t __c10, int8_t __c11,
254*13fbcb42Sjoerg int8_t __c12, int8_t __c13, int8_t __c14, int8_t __c15)
255*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c0) __REQUIRE_CONSTANT(__c1) __REQUIRE_CONSTANT(__c2)
256*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c3) __REQUIRE_CONSTANT(__c4)
257*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c5) __REQUIRE_CONSTANT(__c6)
258*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c7) __REQUIRE_CONSTANT(__c8)
259*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c9) __REQUIRE_CONSTANT(__c10)
260*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c11) __REQUIRE_CONSTANT(__c12)
261*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c13) __REQUIRE_CONSTANT(__c14)
262*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c15) {
263*13fbcb42Sjoerg return (v128_t)(__i8x16){__c0, __c1, __c2, __c3, __c4, __c5,
264*13fbcb42Sjoerg __c6, __c7, __c8, __c9, __c10, __c11,
265*13fbcb42Sjoerg __c12, __c13, __c14, __c15};
266*13fbcb42Sjoerg }
267*13fbcb42Sjoerg
268*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i16x8_const(int16_t __c0,int16_t __c1,int16_t __c2,int16_t __c3,int16_t __c4,int16_t __c5,int16_t __c6,int16_t __c7)269*13fbcb42Sjoerg wasm_i16x8_const(int16_t __c0, int16_t __c1, int16_t __c2, int16_t __c3,
270*13fbcb42Sjoerg int16_t __c4, int16_t __c5, int16_t __c6, int16_t __c7)
271*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c0) __REQUIRE_CONSTANT(__c1) __REQUIRE_CONSTANT(__c2)
272*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c3) __REQUIRE_CONSTANT(__c4)
273*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c5) __REQUIRE_CONSTANT(__c6)
274*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c7) {
275*13fbcb42Sjoerg return (v128_t)(__i16x8){__c0, __c1, __c2, __c3, __c4, __c5, __c6, __c7};
276*13fbcb42Sjoerg }
277*13fbcb42Sjoerg
278*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i32x4_const(int32_t __c0,int32_t __c1,int32_t __c2,int32_t __c3)279*13fbcb42Sjoerg wasm_i32x4_const(int32_t __c0, int32_t __c1, int32_t __c2, int32_t __c3)
280*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c0) __REQUIRE_CONSTANT(__c1) __REQUIRE_CONSTANT(__c2)
281*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c3) {
282*13fbcb42Sjoerg return (v128_t)(__i32x4){__c0, __c1, __c2, __c3};
283*13fbcb42Sjoerg }
284*13fbcb42Sjoerg
wasm_i64x2_const(int64_t __c0,int64_t __c1)285*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_const(int64_t __c0,
286*13fbcb42Sjoerg int64_t __c1)
287*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c0) __REQUIRE_CONSTANT(__c1) {
288*13fbcb42Sjoerg return (v128_t)(__i64x2){__c0, __c1};
289*13fbcb42Sjoerg }
290*13fbcb42Sjoerg
291*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_f32x4_const(float __c0,float __c1,float __c2,float __c3)292*13fbcb42Sjoerg wasm_f32x4_const(float __c0, float __c1, float __c2, float __c3)
293*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c0) __REQUIRE_CONSTANT(__c1) __REQUIRE_CONSTANT(__c2)
294*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c3) {
295*13fbcb42Sjoerg return (v128_t)(__f32x4){__c0, __c1, __c2, __c3};
296*13fbcb42Sjoerg }
297*13fbcb42Sjoerg
wasm_f64x2_const(double __c0,double __c1)298*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_const(double __c0,
299*13fbcb42Sjoerg double __c1)
300*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c0) __REQUIRE_CONSTANT(__c1) {
301*13fbcb42Sjoerg return (v128_t)(__f64x2){__c0, __c1};
302*13fbcb42Sjoerg }
303*13fbcb42Sjoerg
wasm_i8x16_const_splat(int8_t __c)304*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_const_splat(int8_t __c)
305*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c) {
306*13fbcb42Sjoerg return (v128_t)(__i8x16){__c, __c, __c, __c, __c, __c, __c, __c,
307*13fbcb42Sjoerg __c, __c, __c, __c, __c, __c, __c, __c};
308*13fbcb42Sjoerg }
309*13fbcb42Sjoerg
wasm_i16x8_const_splat(int16_t __c)310*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_const_splat(int16_t __c)
311*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c) {
312*13fbcb42Sjoerg return (v128_t)(__i16x8){__c, __c, __c, __c, __c, __c, __c, __c};
313*13fbcb42Sjoerg }
314*13fbcb42Sjoerg
wasm_i32x4_const_splat(int32_t __c)315*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_const_splat(int32_t __c)
316*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c) {
317*13fbcb42Sjoerg return (v128_t)(__i32x4){__c, __c, __c, __c};
318*13fbcb42Sjoerg }
319*13fbcb42Sjoerg
wasm_i64x2_const_splat(int64_t __c)320*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_const_splat(int64_t __c)
321*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c) {
322*13fbcb42Sjoerg return (v128_t)(__i64x2){__c, __c};
323*13fbcb42Sjoerg }
324*13fbcb42Sjoerg
wasm_f32x4_const_splat(float __c)325*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_const_splat(float __c)
326*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c) {
327*13fbcb42Sjoerg return (v128_t)(__f32x4){__c, __c, __c, __c};
328*13fbcb42Sjoerg }
329*13fbcb42Sjoerg
wasm_f64x2_const_splat(double __c)330*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_const_splat(double __c)
331*13fbcb42Sjoerg __REQUIRE_CONSTANT(__c) {
332*13fbcb42Sjoerg return (v128_t)(__f64x2){__c, __c};
333*13fbcb42Sjoerg }
334*13fbcb42Sjoerg
wasm_i8x16_splat(int8_t __a)335*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_splat(int8_t __a) {
336*13fbcb42Sjoerg return (v128_t)(__i8x16){__a, __a, __a, __a, __a, __a, __a, __a,
337*13fbcb42Sjoerg __a, __a, __a, __a, __a, __a, __a, __a};
338*13fbcb42Sjoerg }
339*13fbcb42Sjoerg
340*13fbcb42Sjoerg #define wasm_i8x16_extract_lane(__a, __i) \
341*13fbcb42Sjoerg (__builtin_wasm_extract_lane_s_i8x16((__i8x16)(__a), __i))
342*13fbcb42Sjoerg
343*13fbcb42Sjoerg #define wasm_u8x16_extract_lane(__a, __i) \
344*13fbcb42Sjoerg (__builtin_wasm_extract_lane_u_i8x16((__u8x16)(__a), __i))
345*13fbcb42Sjoerg
346*13fbcb42Sjoerg #define wasm_i8x16_replace_lane(__a, __i, __b) \
347*13fbcb42Sjoerg ((v128_t)__builtin_wasm_replace_lane_i8x16((__i8x16)(__a), __i, __b))
348*13fbcb42Sjoerg
wasm_i16x8_splat(int16_t __a)349*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_splat(int16_t __a) {
350*13fbcb42Sjoerg return (v128_t)(__i16x8){__a, __a, __a, __a, __a, __a, __a, __a};
351*13fbcb42Sjoerg }
352*13fbcb42Sjoerg
353*13fbcb42Sjoerg #define wasm_i16x8_extract_lane(__a, __i) \
354*13fbcb42Sjoerg (__builtin_wasm_extract_lane_s_i16x8((__i16x8)(__a), __i))
355*13fbcb42Sjoerg
356*13fbcb42Sjoerg #define wasm_u16x8_extract_lane(__a, __i) \
357*13fbcb42Sjoerg (__builtin_wasm_extract_lane_u_i16x8((__u16x8)(__a), __i))
358*13fbcb42Sjoerg
359*13fbcb42Sjoerg #define wasm_i16x8_replace_lane(__a, __i, __b) \
360*13fbcb42Sjoerg ((v128_t)__builtin_wasm_replace_lane_i16x8((__i16x8)(__a), __i, __b))
361*13fbcb42Sjoerg
wasm_i32x4_splat(int32_t __a)362*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_splat(int32_t __a) {
363*13fbcb42Sjoerg return (v128_t)(__i32x4){__a, __a, __a, __a};
364*13fbcb42Sjoerg }
365*13fbcb42Sjoerg
366*13fbcb42Sjoerg #define wasm_i32x4_extract_lane(__a, __i) \
367*13fbcb42Sjoerg (__builtin_wasm_extract_lane_i32x4((__i32x4)(__a), __i))
368*13fbcb42Sjoerg
369*13fbcb42Sjoerg #define wasm_i32x4_replace_lane(__a, __i, __b) \
370*13fbcb42Sjoerg ((v128_t)__builtin_wasm_replace_lane_i32x4((__i32x4)(__a), __i, __b))
371*13fbcb42Sjoerg
wasm_i64x2_splat(int64_t __a)372*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_splat(int64_t __a) {
373*13fbcb42Sjoerg return (v128_t)(__i64x2){__a, __a};
374*13fbcb42Sjoerg }
375*13fbcb42Sjoerg
376*13fbcb42Sjoerg #define wasm_i64x2_extract_lane(__a, __i) \
377*13fbcb42Sjoerg (__builtin_wasm_extract_lane_i64x2((__i64x2)(__a), __i))
378*13fbcb42Sjoerg
379*13fbcb42Sjoerg #define wasm_i64x2_replace_lane(__a, __i, __b) \
380*13fbcb42Sjoerg ((v128_t)__builtin_wasm_replace_lane_i64x2((__i64x2)(__a), __i, __b))
381*13fbcb42Sjoerg
wasm_f32x4_splat(float __a)382*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_splat(float __a) {
383*13fbcb42Sjoerg return (v128_t)(__f32x4){__a, __a, __a, __a};
384*13fbcb42Sjoerg }
385*13fbcb42Sjoerg
386*13fbcb42Sjoerg #define wasm_f32x4_extract_lane(__a, __i) \
387*13fbcb42Sjoerg (__builtin_wasm_extract_lane_f32x4((__f32x4)(__a), __i))
388*13fbcb42Sjoerg
389*13fbcb42Sjoerg #define wasm_f32x4_replace_lane(__a, __i, __b) \
390*13fbcb42Sjoerg ((v128_t)__builtin_wasm_replace_lane_f32x4((__f32x4)(__a), __i, __b))
391*13fbcb42Sjoerg
wasm_f64x2_splat(double __a)392*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_splat(double __a) {
393*13fbcb42Sjoerg return (v128_t)(__f64x2){__a, __a};
394*13fbcb42Sjoerg }
395*13fbcb42Sjoerg
396*13fbcb42Sjoerg #define wasm_f64x2_extract_lane(__a, __i) \
397*13fbcb42Sjoerg (__builtin_wasm_extract_lane_f64x2((__f64x2)(__a), __i))
398*13fbcb42Sjoerg
399*13fbcb42Sjoerg #define wasm_f64x2_replace_lane(__a, __i, __b) \
400*13fbcb42Sjoerg ((v128_t)__builtin_wasm_replace_lane_f64x2((__f64x2)(__a), __i, __b))
401*13fbcb42Sjoerg
wasm_i8x16_eq(v128_t __a,v128_t __b)402*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_eq(v128_t __a,
403*13fbcb42Sjoerg v128_t __b) {
404*13fbcb42Sjoerg return (v128_t)((__i8x16)__a == (__i8x16)__b);
405*13fbcb42Sjoerg }
406*13fbcb42Sjoerg
wasm_i8x16_ne(v128_t __a,v128_t __b)407*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_ne(v128_t __a,
408*13fbcb42Sjoerg v128_t __b) {
409*13fbcb42Sjoerg return (v128_t)((__i8x16)__a != (__i8x16)__b);
410*13fbcb42Sjoerg }
411*13fbcb42Sjoerg
wasm_i8x16_lt(v128_t __a,v128_t __b)412*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_lt(v128_t __a,
413*13fbcb42Sjoerg v128_t __b) {
414*13fbcb42Sjoerg return (v128_t)((__i8x16)__a < (__i8x16)__b);
415*13fbcb42Sjoerg }
416*13fbcb42Sjoerg
wasm_u8x16_lt(v128_t __a,v128_t __b)417*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_lt(v128_t __a,
418*13fbcb42Sjoerg v128_t __b) {
419*13fbcb42Sjoerg return (v128_t)((__u8x16)__a < (__u8x16)__b);
420*13fbcb42Sjoerg }
421*13fbcb42Sjoerg
wasm_i8x16_gt(v128_t __a,v128_t __b)422*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_gt(v128_t __a,
423*13fbcb42Sjoerg v128_t __b) {
424*13fbcb42Sjoerg return (v128_t)((__i8x16)__a > (__i8x16)__b);
425*13fbcb42Sjoerg }
426*13fbcb42Sjoerg
wasm_u8x16_gt(v128_t __a,v128_t __b)427*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_gt(v128_t __a,
428*13fbcb42Sjoerg v128_t __b) {
429*13fbcb42Sjoerg return (v128_t)((__u8x16)__a > (__u8x16)__b);
430*13fbcb42Sjoerg }
431*13fbcb42Sjoerg
wasm_i8x16_le(v128_t __a,v128_t __b)432*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_le(v128_t __a,
433*13fbcb42Sjoerg v128_t __b) {
434*13fbcb42Sjoerg return (v128_t)((__i8x16)__a <= (__i8x16)__b);
435*13fbcb42Sjoerg }
436*13fbcb42Sjoerg
wasm_u8x16_le(v128_t __a,v128_t __b)437*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_le(v128_t __a,
438*13fbcb42Sjoerg v128_t __b) {
439*13fbcb42Sjoerg return (v128_t)((__u8x16)__a <= (__u8x16)__b);
440*13fbcb42Sjoerg }
441*13fbcb42Sjoerg
wasm_i8x16_ge(v128_t __a,v128_t __b)442*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_ge(v128_t __a,
443*13fbcb42Sjoerg v128_t __b) {
444*13fbcb42Sjoerg return (v128_t)((__i8x16)__a >= (__i8x16)__b);
445*13fbcb42Sjoerg }
446*13fbcb42Sjoerg
wasm_u8x16_ge(v128_t __a,v128_t __b)447*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_ge(v128_t __a,
448*13fbcb42Sjoerg v128_t __b) {
449*13fbcb42Sjoerg return (v128_t)((__u8x16)__a >= (__u8x16)__b);
450*13fbcb42Sjoerg }
451*13fbcb42Sjoerg
wasm_i16x8_eq(v128_t __a,v128_t __b)452*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_eq(v128_t __a,
453*13fbcb42Sjoerg v128_t __b) {
454*13fbcb42Sjoerg return (v128_t)((__i16x8)__a == (__i16x8)__b);
455*13fbcb42Sjoerg }
456*13fbcb42Sjoerg
wasm_i16x8_ne(v128_t __a,v128_t __b)457*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_ne(v128_t __a,
458*13fbcb42Sjoerg v128_t __b) {
459*13fbcb42Sjoerg return (v128_t)((__u16x8)__a != (__u16x8)__b);
460*13fbcb42Sjoerg }
461*13fbcb42Sjoerg
wasm_i16x8_lt(v128_t __a,v128_t __b)462*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_lt(v128_t __a,
463*13fbcb42Sjoerg v128_t __b) {
464*13fbcb42Sjoerg return (v128_t)((__i16x8)__a < (__i16x8)__b);
465*13fbcb42Sjoerg }
466*13fbcb42Sjoerg
wasm_u16x8_lt(v128_t __a,v128_t __b)467*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_lt(v128_t __a,
468*13fbcb42Sjoerg v128_t __b) {
469*13fbcb42Sjoerg return (v128_t)((__u16x8)__a < (__u16x8)__b);
470*13fbcb42Sjoerg }
471*13fbcb42Sjoerg
wasm_i16x8_gt(v128_t __a,v128_t __b)472*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_gt(v128_t __a,
473*13fbcb42Sjoerg v128_t __b) {
474*13fbcb42Sjoerg return (v128_t)((__i16x8)__a > (__i16x8)__b);
475*13fbcb42Sjoerg }
476*13fbcb42Sjoerg
wasm_u16x8_gt(v128_t __a,v128_t __b)477*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_gt(v128_t __a,
478*13fbcb42Sjoerg v128_t __b) {
479*13fbcb42Sjoerg return (v128_t)((__u16x8)__a > (__u16x8)__b);
480*13fbcb42Sjoerg }
481*13fbcb42Sjoerg
wasm_i16x8_le(v128_t __a,v128_t __b)482*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_le(v128_t __a,
483*13fbcb42Sjoerg v128_t __b) {
484*13fbcb42Sjoerg return (v128_t)((__i16x8)__a <= (__i16x8)__b);
485*13fbcb42Sjoerg }
486*13fbcb42Sjoerg
wasm_u16x8_le(v128_t __a,v128_t __b)487*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_le(v128_t __a,
488*13fbcb42Sjoerg v128_t __b) {
489*13fbcb42Sjoerg return (v128_t)((__u16x8)__a <= (__u16x8)__b);
490*13fbcb42Sjoerg }
491*13fbcb42Sjoerg
wasm_i16x8_ge(v128_t __a,v128_t __b)492*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_ge(v128_t __a,
493*13fbcb42Sjoerg v128_t __b) {
494*13fbcb42Sjoerg return (v128_t)((__i16x8)__a >= (__i16x8)__b);
495*13fbcb42Sjoerg }
496*13fbcb42Sjoerg
wasm_u16x8_ge(v128_t __a,v128_t __b)497*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_ge(v128_t __a,
498*13fbcb42Sjoerg v128_t __b) {
499*13fbcb42Sjoerg return (v128_t)((__u16x8)__a >= (__u16x8)__b);
500*13fbcb42Sjoerg }
501*13fbcb42Sjoerg
wasm_i32x4_eq(v128_t __a,v128_t __b)502*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_eq(v128_t __a,
503*13fbcb42Sjoerg v128_t __b) {
504*13fbcb42Sjoerg return (v128_t)((__i32x4)__a == (__i32x4)__b);
505*13fbcb42Sjoerg }
506*13fbcb42Sjoerg
wasm_i32x4_ne(v128_t __a,v128_t __b)507*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_ne(v128_t __a,
508*13fbcb42Sjoerg v128_t __b) {
509*13fbcb42Sjoerg return (v128_t)((__i32x4)__a != (__i32x4)__b);
510*13fbcb42Sjoerg }
511*13fbcb42Sjoerg
wasm_i32x4_lt(v128_t __a,v128_t __b)512*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_lt(v128_t __a,
513*13fbcb42Sjoerg v128_t __b) {
514*13fbcb42Sjoerg return (v128_t)((__i32x4)__a < (__i32x4)__b);
515*13fbcb42Sjoerg }
516*13fbcb42Sjoerg
wasm_u32x4_lt(v128_t __a,v128_t __b)517*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_lt(v128_t __a,
518*13fbcb42Sjoerg v128_t __b) {
519*13fbcb42Sjoerg return (v128_t)((__u32x4)__a < (__u32x4)__b);
520*13fbcb42Sjoerg }
521*13fbcb42Sjoerg
wasm_i32x4_gt(v128_t __a,v128_t __b)522*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_gt(v128_t __a,
523*13fbcb42Sjoerg v128_t __b) {
524*13fbcb42Sjoerg return (v128_t)((__i32x4)__a > (__i32x4)__b);
525*13fbcb42Sjoerg }
526*13fbcb42Sjoerg
wasm_u32x4_gt(v128_t __a,v128_t __b)527*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_gt(v128_t __a,
528*13fbcb42Sjoerg v128_t __b) {
529*13fbcb42Sjoerg return (v128_t)((__u32x4)__a > (__u32x4)__b);
530*13fbcb42Sjoerg }
531*13fbcb42Sjoerg
wasm_i32x4_le(v128_t __a,v128_t __b)532*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_le(v128_t __a,
533*13fbcb42Sjoerg v128_t __b) {
534*13fbcb42Sjoerg return (v128_t)((__i32x4)__a <= (__i32x4)__b);
535*13fbcb42Sjoerg }
536*13fbcb42Sjoerg
wasm_u32x4_le(v128_t __a,v128_t __b)537*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_le(v128_t __a,
538*13fbcb42Sjoerg v128_t __b) {
539*13fbcb42Sjoerg return (v128_t)((__u32x4)__a <= (__u32x4)__b);
540*13fbcb42Sjoerg }
541*13fbcb42Sjoerg
wasm_i32x4_ge(v128_t __a,v128_t __b)542*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_ge(v128_t __a,
543*13fbcb42Sjoerg v128_t __b) {
544*13fbcb42Sjoerg return (v128_t)((__i32x4)__a >= (__i32x4)__b);
545*13fbcb42Sjoerg }
546*13fbcb42Sjoerg
wasm_u32x4_ge(v128_t __a,v128_t __b)547*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_ge(v128_t __a,
548*13fbcb42Sjoerg v128_t __b) {
549*13fbcb42Sjoerg return (v128_t)((__u32x4)__a >= (__u32x4)__b);
550*13fbcb42Sjoerg }
551*13fbcb42Sjoerg
wasm_i64x2_eq(v128_t __a,v128_t __b)552*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_eq(v128_t __a,
553*13fbcb42Sjoerg v128_t __b) {
554*13fbcb42Sjoerg return (v128_t)((__i64x2)__a == (__i64x2)__b);
555*13fbcb42Sjoerg }
556*13fbcb42Sjoerg
wasm_i64x2_ne(v128_t __a,v128_t __b)557*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_ne(v128_t __a,
558*13fbcb42Sjoerg v128_t __b) {
559*13fbcb42Sjoerg return (v128_t)((__i64x2)__a != (__i64x2)__b);
560*13fbcb42Sjoerg }
561*13fbcb42Sjoerg
wasm_i64x2_lt(v128_t __a,v128_t __b)562*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_lt(v128_t __a,
563*13fbcb42Sjoerg v128_t __b) {
564*13fbcb42Sjoerg return (v128_t)((__i64x2)__a < (__i64x2)__b);
565*13fbcb42Sjoerg }
566*13fbcb42Sjoerg
wasm_i64x2_gt(v128_t __a,v128_t __b)567*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_gt(v128_t __a,
568*13fbcb42Sjoerg v128_t __b) {
569*13fbcb42Sjoerg return (v128_t)((__i64x2)__a > (__i64x2)__b);
570*13fbcb42Sjoerg }
571*13fbcb42Sjoerg
wasm_i64x2_le(v128_t __a,v128_t __b)572*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_le(v128_t __a,
573*13fbcb42Sjoerg v128_t __b) {
574*13fbcb42Sjoerg return (v128_t)((__i64x2)__a <= (__i64x2)__b);
575*13fbcb42Sjoerg }
576*13fbcb42Sjoerg
wasm_i64x2_ge(v128_t __a,v128_t __b)577*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_ge(v128_t __a,
578*13fbcb42Sjoerg v128_t __b) {
579*13fbcb42Sjoerg return (v128_t)((__i64x2)__a >= (__i64x2)__b);
580*13fbcb42Sjoerg }
581*13fbcb42Sjoerg
wasm_f32x4_eq(v128_t __a,v128_t __b)582*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_eq(v128_t __a,
583*13fbcb42Sjoerg v128_t __b) {
584*13fbcb42Sjoerg return (v128_t)((__f32x4)__a == (__f32x4)__b);
585*13fbcb42Sjoerg }
586*13fbcb42Sjoerg
wasm_f32x4_ne(v128_t __a,v128_t __b)587*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_ne(v128_t __a,
588*13fbcb42Sjoerg v128_t __b) {
589*13fbcb42Sjoerg return (v128_t)((__f32x4)__a != (__f32x4)__b);
590*13fbcb42Sjoerg }
591*13fbcb42Sjoerg
wasm_f32x4_lt(v128_t __a,v128_t __b)592*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_lt(v128_t __a,
593*13fbcb42Sjoerg v128_t __b) {
594*13fbcb42Sjoerg return (v128_t)((__f32x4)__a < (__f32x4)__b);
595*13fbcb42Sjoerg }
596*13fbcb42Sjoerg
wasm_f32x4_gt(v128_t __a,v128_t __b)597*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_gt(v128_t __a,
598*13fbcb42Sjoerg v128_t __b) {
599*13fbcb42Sjoerg return (v128_t)((__f32x4)__a > (__f32x4)__b);
600*13fbcb42Sjoerg }
601*13fbcb42Sjoerg
wasm_f32x4_le(v128_t __a,v128_t __b)602*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_le(v128_t __a,
603*13fbcb42Sjoerg v128_t __b) {
604*13fbcb42Sjoerg return (v128_t)((__f32x4)__a <= (__f32x4)__b);
605*13fbcb42Sjoerg }
606*13fbcb42Sjoerg
wasm_f32x4_ge(v128_t __a,v128_t __b)607*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_ge(v128_t __a,
608*13fbcb42Sjoerg v128_t __b) {
609*13fbcb42Sjoerg return (v128_t)((__f32x4)__a >= (__f32x4)__b);
610*13fbcb42Sjoerg }
611*13fbcb42Sjoerg
wasm_f64x2_eq(v128_t __a,v128_t __b)612*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_eq(v128_t __a,
613*13fbcb42Sjoerg v128_t __b) {
614*13fbcb42Sjoerg return (v128_t)((__f64x2)__a == (__f64x2)__b);
615*13fbcb42Sjoerg }
616*13fbcb42Sjoerg
wasm_f64x2_ne(v128_t __a,v128_t __b)617*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_ne(v128_t __a,
618*13fbcb42Sjoerg v128_t __b) {
619*13fbcb42Sjoerg return (v128_t)((__f64x2)__a != (__f64x2)__b);
620*13fbcb42Sjoerg }
621*13fbcb42Sjoerg
wasm_f64x2_lt(v128_t __a,v128_t __b)622*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_lt(v128_t __a,
623*13fbcb42Sjoerg v128_t __b) {
624*13fbcb42Sjoerg return (v128_t)((__f64x2)__a < (__f64x2)__b);
625*13fbcb42Sjoerg }
626*13fbcb42Sjoerg
wasm_f64x2_gt(v128_t __a,v128_t __b)627*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_gt(v128_t __a,
628*13fbcb42Sjoerg v128_t __b) {
629*13fbcb42Sjoerg return (v128_t)((__f64x2)__a > (__f64x2)__b);
630*13fbcb42Sjoerg }
631*13fbcb42Sjoerg
wasm_f64x2_le(v128_t __a,v128_t __b)632*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_le(v128_t __a,
633*13fbcb42Sjoerg v128_t __b) {
634*13fbcb42Sjoerg return (v128_t)((__f64x2)__a <= (__f64x2)__b);
635*13fbcb42Sjoerg }
636*13fbcb42Sjoerg
wasm_f64x2_ge(v128_t __a,v128_t __b)637*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_ge(v128_t __a,
638*13fbcb42Sjoerg v128_t __b) {
639*13fbcb42Sjoerg return (v128_t)((__f64x2)__a >= (__f64x2)__b);
640*13fbcb42Sjoerg }
641*13fbcb42Sjoerg
wasm_v128_not(v128_t __a)642*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_not(v128_t __a) {
643*13fbcb42Sjoerg return ~__a;
644*13fbcb42Sjoerg }
645*13fbcb42Sjoerg
wasm_v128_and(v128_t __a,v128_t __b)646*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_and(v128_t __a,
647*13fbcb42Sjoerg v128_t __b) {
648*13fbcb42Sjoerg return __a & __b;
649*13fbcb42Sjoerg }
650*13fbcb42Sjoerg
wasm_v128_or(v128_t __a,v128_t __b)651*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_or(v128_t __a,
652*13fbcb42Sjoerg v128_t __b) {
653*13fbcb42Sjoerg return __a | __b;
654*13fbcb42Sjoerg }
655*13fbcb42Sjoerg
wasm_v128_xor(v128_t __a,v128_t __b)656*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_xor(v128_t __a,
657*13fbcb42Sjoerg v128_t __b) {
658*13fbcb42Sjoerg return __a ^ __b;
659*13fbcb42Sjoerg }
660*13fbcb42Sjoerg
wasm_v128_andnot(v128_t __a,v128_t __b)661*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_andnot(v128_t __a,
662*13fbcb42Sjoerg v128_t __b) {
663*13fbcb42Sjoerg return __a & ~__b;
664*13fbcb42Sjoerg }
665*13fbcb42Sjoerg
wasm_v128_any_true(v128_t __a)666*13fbcb42Sjoerg static __inline__ bool __DEFAULT_FN_ATTRS wasm_v128_any_true(v128_t __a) {
667*13fbcb42Sjoerg return __builtin_wasm_any_true_v128((__i8x16)__a);
668*13fbcb42Sjoerg }
669*13fbcb42Sjoerg
wasm_v128_bitselect(v128_t __a,v128_t __b,v128_t __mask)670*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_bitselect(v128_t __a,
671*13fbcb42Sjoerg v128_t __b,
672*13fbcb42Sjoerg v128_t __mask) {
673*13fbcb42Sjoerg return (v128_t)__builtin_wasm_bitselect((__i32x4)__a, (__i32x4)__b,
674*13fbcb42Sjoerg (__i32x4)__mask);
675*13fbcb42Sjoerg }
676*13fbcb42Sjoerg
wasm_i8x16_abs(v128_t __a)677*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_abs(v128_t __a) {
678*13fbcb42Sjoerg return (v128_t)__builtin_wasm_abs_i8x16((__i8x16)__a);
679*13fbcb42Sjoerg }
680*13fbcb42Sjoerg
wasm_i8x16_neg(v128_t __a)681*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_neg(v128_t __a) {
682*13fbcb42Sjoerg return (v128_t)(-(__u8x16)__a);
683*13fbcb42Sjoerg }
684*13fbcb42Sjoerg
wasm_i8x16_all_true(v128_t __a)685*13fbcb42Sjoerg static __inline__ bool __DEFAULT_FN_ATTRS wasm_i8x16_all_true(v128_t __a) {
686*13fbcb42Sjoerg return __builtin_wasm_all_true_i8x16((__i8x16)__a);
687*13fbcb42Sjoerg }
688*13fbcb42Sjoerg
wasm_i8x16_bitmask(v128_t __a)689*13fbcb42Sjoerg static __inline__ int32_t __DEFAULT_FN_ATTRS wasm_i8x16_bitmask(v128_t __a) {
690*13fbcb42Sjoerg return __builtin_wasm_bitmask_i8x16((__i8x16)__a);
691*13fbcb42Sjoerg }
692*13fbcb42Sjoerg
wasm_i8x16_popcnt(v128_t __a)693*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_popcnt(v128_t __a) {
694*13fbcb42Sjoerg return (v128_t)__builtin_wasm_popcnt_i8x16((__i8x16)__a);
695*13fbcb42Sjoerg }
696*13fbcb42Sjoerg
wasm_i8x16_shl(v128_t __a,int32_t __b)697*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_shl(v128_t __a,
698*13fbcb42Sjoerg int32_t __b) {
699*13fbcb42Sjoerg return (v128_t)((__i8x16)__a << __b);
700*13fbcb42Sjoerg }
701*13fbcb42Sjoerg
wasm_i8x16_shr(v128_t __a,int32_t __b)702*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_shr(v128_t __a,
703*13fbcb42Sjoerg int32_t __b) {
704*13fbcb42Sjoerg return (v128_t)((__i8x16)__a >> __b);
705*13fbcb42Sjoerg }
706*13fbcb42Sjoerg
wasm_u8x16_shr(v128_t __a,int32_t __b)707*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_shr(v128_t __a,
708*13fbcb42Sjoerg int32_t __b) {
709*13fbcb42Sjoerg return (v128_t)((__u8x16)__a >> __b);
710*13fbcb42Sjoerg }
711*13fbcb42Sjoerg
wasm_i8x16_add(v128_t __a,v128_t __b)712*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_add(v128_t __a,
713*13fbcb42Sjoerg v128_t __b) {
714*13fbcb42Sjoerg return (v128_t)((__u8x16)__a + (__u8x16)__b);
715*13fbcb42Sjoerg }
716*13fbcb42Sjoerg
wasm_i8x16_add_sat(v128_t __a,v128_t __b)717*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_add_sat(v128_t __a,
718*13fbcb42Sjoerg v128_t __b) {
719*13fbcb42Sjoerg return (v128_t)__builtin_wasm_add_sat_s_i8x16((__i8x16)__a, (__i8x16)__b);
720*13fbcb42Sjoerg }
721*13fbcb42Sjoerg
wasm_u8x16_add_sat(v128_t __a,v128_t __b)722*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_add_sat(v128_t __a,
723*13fbcb42Sjoerg v128_t __b) {
724*13fbcb42Sjoerg return (v128_t)__builtin_wasm_add_sat_u_i8x16((__u8x16)__a, (__u8x16)__b);
725*13fbcb42Sjoerg }
726*13fbcb42Sjoerg
wasm_i8x16_sub(v128_t __a,v128_t __b)727*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_sub(v128_t __a,
728*13fbcb42Sjoerg v128_t __b) {
729*13fbcb42Sjoerg return (v128_t)((__u8x16)__a - (__u8x16)__b);
730*13fbcb42Sjoerg }
731*13fbcb42Sjoerg
wasm_i8x16_sub_sat(v128_t __a,v128_t __b)732*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_sub_sat(v128_t __a,
733*13fbcb42Sjoerg v128_t __b) {
734*13fbcb42Sjoerg return (v128_t)__builtin_wasm_sub_sat_s_i8x16((__i8x16)__a, (__i8x16)__b);
735*13fbcb42Sjoerg }
736*13fbcb42Sjoerg
wasm_u8x16_sub_sat(v128_t __a,v128_t __b)737*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_sub_sat(v128_t __a,
738*13fbcb42Sjoerg v128_t __b) {
739*13fbcb42Sjoerg return (v128_t)__builtin_wasm_sub_sat_u_i8x16((__u8x16)__a, (__u8x16)__b);
740*13fbcb42Sjoerg }
741*13fbcb42Sjoerg
wasm_i8x16_min(v128_t __a,v128_t __b)742*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_min(v128_t __a,
743*13fbcb42Sjoerg v128_t __b) {
744*13fbcb42Sjoerg return (v128_t)__builtin_wasm_min_s_i8x16((__i8x16)__a, (__i8x16)__b);
745*13fbcb42Sjoerg }
746*13fbcb42Sjoerg
wasm_u8x16_min(v128_t __a,v128_t __b)747*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_min(v128_t __a,
748*13fbcb42Sjoerg v128_t __b) {
749*13fbcb42Sjoerg return (v128_t)__builtin_wasm_min_u_i8x16((__u8x16)__a, (__u8x16)__b);
750*13fbcb42Sjoerg }
751*13fbcb42Sjoerg
wasm_i8x16_max(v128_t __a,v128_t __b)752*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_max(v128_t __a,
753*13fbcb42Sjoerg v128_t __b) {
754*13fbcb42Sjoerg return (v128_t)__builtin_wasm_max_s_i8x16((__i8x16)__a, (__i8x16)__b);
755*13fbcb42Sjoerg }
756*13fbcb42Sjoerg
wasm_u8x16_max(v128_t __a,v128_t __b)757*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_max(v128_t __a,
758*13fbcb42Sjoerg v128_t __b) {
759*13fbcb42Sjoerg return (v128_t)__builtin_wasm_max_u_i8x16((__u8x16)__a, (__u8x16)__b);
760*13fbcb42Sjoerg }
761*13fbcb42Sjoerg
wasm_u8x16_avgr(v128_t __a,v128_t __b)762*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_avgr(v128_t __a,
763*13fbcb42Sjoerg v128_t __b) {
764*13fbcb42Sjoerg return (v128_t)__builtin_wasm_avgr_u_i8x16((__u8x16)__a, (__u8x16)__b);
765*13fbcb42Sjoerg }
766*13fbcb42Sjoerg
wasm_i16x8_abs(v128_t __a)767*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_abs(v128_t __a) {
768*13fbcb42Sjoerg return (v128_t)__builtin_wasm_abs_i16x8((__i16x8)__a);
769*13fbcb42Sjoerg }
770*13fbcb42Sjoerg
wasm_i16x8_neg(v128_t __a)771*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_neg(v128_t __a) {
772*13fbcb42Sjoerg return (v128_t)(-(__u16x8)__a);
773*13fbcb42Sjoerg }
774*13fbcb42Sjoerg
wasm_i16x8_all_true(v128_t __a)775*13fbcb42Sjoerg static __inline__ bool __DEFAULT_FN_ATTRS wasm_i16x8_all_true(v128_t __a) {
776*13fbcb42Sjoerg return __builtin_wasm_all_true_i16x8((__i16x8)__a);
777*13fbcb42Sjoerg }
778*13fbcb42Sjoerg
wasm_i16x8_bitmask(v128_t __a)779*13fbcb42Sjoerg static __inline__ int32_t __DEFAULT_FN_ATTRS wasm_i16x8_bitmask(v128_t __a) {
780*13fbcb42Sjoerg return __builtin_wasm_bitmask_i16x8((__i16x8)__a);
781*13fbcb42Sjoerg }
782*13fbcb42Sjoerg
wasm_i16x8_shl(v128_t __a,int32_t __b)783*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_shl(v128_t __a,
784*13fbcb42Sjoerg int32_t __b) {
785*13fbcb42Sjoerg return (v128_t)((__i16x8)__a << __b);
786*13fbcb42Sjoerg }
787*13fbcb42Sjoerg
wasm_i16x8_shr(v128_t __a,int32_t __b)788*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_shr(v128_t __a,
789*13fbcb42Sjoerg int32_t __b) {
790*13fbcb42Sjoerg return (v128_t)((__i16x8)__a >> __b);
791*13fbcb42Sjoerg }
792*13fbcb42Sjoerg
wasm_u16x8_shr(v128_t __a,int32_t __b)793*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_shr(v128_t __a,
794*13fbcb42Sjoerg int32_t __b) {
795*13fbcb42Sjoerg return (v128_t)((__u16x8)__a >> __b);
796*13fbcb42Sjoerg }
797*13fbcb42Sjoerg
wasm_i16x8_add(v128_t __a,v128_t __b)798*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_add(v128_t __a,
799*13fbcb42Sjoerg v128_t __b) {
800*13fbcb42Sjoerg return (v128_t)((__u16x8)__a + (__u16x8)__b);
801*13fbcb42Sjoerg }
802*13fbcb42Sjoerg
wasm_i16x8_add_sat(v128_t __a,v128_t __b)803*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_add_sat(v128_t __a,
804*13fbcb42Sjoerg v128_t __b) {
805*13fbcb42Sjoerg return (v128_t)__builtin_wasm_add_sat_s_i16x8((__i16x8)__a, (__i16x8)__b);
806*13fbcb42Sjoerg }
807*13fbcb42Sjoerg
wasm_u16x8_add_sat(v128_t __a,v128_t __b)808*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_add_sat(v128_t __a,
809*13fbcb42Sjoerg v128_t __b) {
810*13fbcb42Sjoerg return (v128_t)__builtin_wasm_add_sat_u_i16x8((__u16x8)__a, (__u16x8)__b);
811*13fbcb42Sjoerg }
812*13fbcb42Sjoerg
wasm_i16x8_sub(v128_t __a,v128_t __b)813*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_sub(v128_t __a,
814*13fbcb42Sjoerg v128_t __b) {
815*13fbcb42Sjoerg return (v128_t)((__i16x8)__a - (__i16x8)__b);
816*13fbcb42Sjoerg }
817*13fbcb42Sjoerg
wasm_i16x8_sub_sat(v128_t __a,v128_t __b)818*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_sub_sat(v128_t __a,
819*13fbcb42Sjoerg v128_t __b) {
820*13fbcb42Sjoerg return (v128_t)__builtin_wasm_sub_sat_s_i16x8((__i16x8)__a, (__i16x8)__b);
821*13fbcb42Sjoerg }
822*13fbcb42Sjoerg
wasm_u16x8_sub_sat(v128_t __a,v128_t __b)823*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_sub_sat(v128_t __a,
824*13fbcb42Sjoerg v128_t __b) {
825*13fbcb42Sjoerg return (v128_t)__builtin_wasm_sub_sat_u_i16x8((__u16x8)__a, (__u16x8)__b);
826*13fbcb42Sjoerg }
827*13fbcb42Sjoerg
wasm_i16x8_mul(v128_t __a,v128_t __b)828*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_mul(v128_t __a,
829*13fbcb42Sjoerg v128_t __b) {
830*13fbcb42Sjoerg return (v128_t)((__u16x8)__a * (__u16x8)__b);
831*13fbcb42Sjoerg }
832*13fbcb42Sjoerg
wasm_i16x8_min(v128_t __a,v128_t __b)833*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_min(v128_t __a,
834*13fbcb42Sjoerg v128_t __b) {
835*13fbcb42Sjoerg return (v128_t)__builtin_wasm_min_s_i16x8((__i16x8)__a, (__i16x8)__b);
836*13fbcb42Sjoerg }
837*13fbcb42Sjoerg
wasm_u16x8_min(v128_t __a,v128_t __b)838*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_min(v128_t __a,
839*13fbcb42Sjoerg v128_t __b) {
840*13fbcb42Sjoerg return (v128_t)__builtin_wasm_min_u_i16x8((__u16x8)__a, (__u16x8)__b);
841*13fbcb42Sjoerg }
842*13fbcb42Sjoerg
wasm_i16x8_max(v128_t __a,v128_t __b)843*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_max(v128_t __a,
844*13fbcb42Sjoerg v128_t __b) {
845*13fbcb42Sjoerg return (v128_t)__builtin_wasm_max_s_i16x8((__i16x8)__a, (__i16x8)__b);
846*13fbcb42Sjoerg }
847*13fbcb42Sjoerg
wasm_u16x8_max(v128_t __a,v128_t __b)848*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_max(v128_t __a,
849*13fbcb42Sjoerg v128_t __b) {
850*13fbcb42Sjoerg return (v128_t)__builtin_wasm_max_u_i16x8((__u16x8)__a, (__u16x8)__b);
851*13fbcb42Sjoerg }
852*13fbcb42Sjoerg
wasm_u16x8_avgr(v128_t __a,v128_t __b)853*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_avgr(v128_t __a,
854*13fbcb42Sjoerg v128_t __b) {
855*13fbcb42Sjoerg return (v128_t)__builtin_wasm_avgr_u_i16x8((__u16x8)__a, (__u16x8)__b);
856*13fbcb42Sjoerg }
857*13fbcb42Sjoerg
wasm_i32x4_abs(v128_t __a)858*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_abs(v128_t __a) {
859*13fbcb42Sjoerg return (v128_t)__builtin_wasm_abs_i32x4((__i32x4)__a);
860*13fbcb42Sjoerg }
861*13fbcb42Sjoerg
wasm_i32x4_neg(v128_t __a)862*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_neg(v128_t __a) {
863*13fbcb42Sjoerg return (v128_t)(-(__u32x4)__a);
864*13fbcb42Sjoerg }
865*13fbcb42Sjoerg
wasm_i32x4_all_true(v128_t __a)866*13fbcb42Sjoerg static __inline__ bool __DEFAULT_FN_ATTRS wasm_i32x4_all_true(v128_t __a) {
867*13fbcb42Sjoerg return __builtin_wasm_all_true_i32x4((__i32x4)__a);
868*13fbcb42Sjoerg }
869*13fbcb42Sjoerg
wasm_i32x4_bitmask(v128_t __a)870*13fbcb42Sjoerg static __inline__ int32_t __DEFAULT_FN_ATTRS wasm_i32x4_bitmask(v128_t __a) {
871*13fbcb42Sjoerg return __builtin_wasm_bitmask_i32x4((__i32x4)__a);
872*13fbcb42Sjoerg }
873*13fbcb42Sjoerg
wasm_i32x4_shl(v128_t __a,int32_t __b)874*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_shl(v128_t __a,
875*13fbcb42Sjoerg int32_t __b) {
876*13fbcb42Sjoerg return (v128_t)((__i32x4)__a << __b);
877*13fbcb42Sjoerg }
878*13fbcb42Sjoerg
wasm_i32x4_shr(v128_t __a,int32_t __b)879*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_shr(v128_t __a,
880*13fbcb42Sjoerg int32_t __b) {
881*13fbcb42Sjoerg return (v128_t)((__i32x4)__a >> __b);
882*13fbcb42Sjoerg }
883*13fbcb42Sjoerg
wasm_u32x4_shr(v128_t __a,int32_t __b)884*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_shr(v128_t __a,
885*13fbcb42Sjoerg int32_t __b) {
886*13fbcb42Sjoerg return (v128_t)((__u32x4)__a >> __b);
887*13fbcb42Sjoerg }
888*13fbcb42Sjoerg
wasm_i32x4_add(v128_t __a,v128_t __b)889*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_add(v128_t __a,
890*13fbcb42Sjoerg v128_t __b) {
891*13fbcb42Sjoerg return (v128_t)((__u32x4)__a + (__u32x4)__b);
892*13fbcb42Sjoerg }
893*13fbcb42Sjoerg
wasm_i32x4_sub(v128_t __a,v128_t __b)894*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_sub(v128_t __a,
895*13fbcb42Sjoerg v128_t __b) {
896*13fbcb42Sjoerg return (v128_t)((__u32x4)__a - (__u32x4)__b);
897*13fbcb42Sjoerg }
898*13fbcb42Sjoerg
wasm_i32x4_mul(v128_t __a,v128_t __b)899*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_mul(v128_t __a,
900*13fbcb42Sjoerg v128_t __b) {
901*13fbcb42Sjoerg return (v128_t)((__u32x4)__a * (__u32x4)__b);
902*13fbcb42Sjoerg }
903*13fbcb42Sjoerg
wasm_i32x4_min(v128_t __a,v128_t __b)904*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_min(v128_t __a,
905*13fbcb42Sjoerg v128_t __b) {
906*13fbcb42Sjoerg return (v128_t)__builtin_wasm_min_s_i32x4((__i32x4)__a, (__i32x4)__b);
907*13fbcb42Sjoerg }
908*13fbcb42Sjoerg
wasm_u32x4_min(v128_t __a,v128_t __b)909*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_min(v128_t __a,
910*13fbcb42Sjoerg v128_t __b) {
911*13fbcb42Sjoerg return (v128_t)__builtin_wasm_min_u_i32x4((__u32x4)__a, (__u32x4)__b);
912*13fbcb42Sjoerg }
913*13fbcb42Sjoerg
wasm_i32x4_max(v128_t __a,v128_t __b)914*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_max(v128_t __a,
915*13fbcb42Sjoerg v128_t __b) {
916*13fbcb42Sjoerg return (v128_t)__builtin_wasm_max_s_i32x4((__i32x4)__a, (__i32x4)__b);
917*13fbcb42Sjoerg }
918*13fbcb42Sjoerg
wasm_u32x4_max(v128_t __a,v128_t __b)919*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_max(v128_t __a,
920*13fbcb42Sjoerg v128_t __b) {
921*13fbcb42Sjoerg return (v128_t)__builtin_wasm_max_u_i32x4((__u32x4)__a, (__u32x4)__b);
922*13fbcb42Sjoerg }
923*13fbcb42Sjoerg
wasm_i32x4_dot_i16x8(v128_t __a,v128_t __b)924*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_dot_i16x8(v128_t __a,
925*13fbcb42Sjoerg v128_t __b) {
926*13fbcb42Sjoerg return (v128_t)__builtin_wasm_dot_s_i32x4_i16x8((__i16x8)__a, (__i16x8)__b);
927*13fbcb42Sjoerg }
928*13fbcb42Sjoerg
wasm_i64x2_abs(v128_t __a)929*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_abs(v128_t __a) {
930*13fbcb42Sjoerg return (v128_t)__builtin_wasm_abs_i64x2((__i64x2)__a);
931*13fbcb42Sjoerg }
932*13fbcb42Sjoerg
wasm_i64x2_neg(v128_t __a)933*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_neg(v128_t __a) {
934*13fbcb42Sjoerg return (v128_t)(-(__u64x2)__a);
935*13fbcb42Sjoerg }
936*13fbcb42Sjoerg
wasm_i64x2_all_true(v128_t __a)937*13fbcb42Sjoerg static __inline__ bool __DEFAULT_FN_ATTRS wasm_i64x2_all_true(v128_t __a) {
938*13fbcb42Sjoerg return __builtin_wasm_all_true_i64x2((__i64x2)__a);
939*13fbcb42Sjoerg }
940*13fbcb42Sjoerg
wasm_i64x2_bitmask(v128_t __a)941*13fbcb42Sjoerg static __inline__ int32_t __DEFAULT_FN_ATTRS wasm_i64x2_bitmask(v128_t __a) {
942*13fbcb42Sjoerg return __builtin_wasm_bitmask_i64x2((__i64x2)__a);
943*13fbcb42Sjoerg }
944*13fbcb42Sjoerg
wasm_i64x2_shl(v128_t __a,int32_t __b)945*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_shl(v128_t __a,
946*13fbcb42Sjoerg int32_t __b) {
947*13fbcb42Sjoerg return (v128_t)((__i64x2)__a << (int64_t)__b);
948*13fbcb42Sjoerg }
949*13fbcb42Sjoerg
wasm_i64x2_shr(v128_t __a,int32_t __b)950*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_shr(v128_t __a,
951*13fbcb42Sjoerg int32_t __b) {
952*13fbcb42Sjoerg return (v128_t)((__i64x2)__a >> (int64_t)__b);
953*13fbcb42Sjoerg }
954*13fbcb42Sjoerg
wasm_u64x2_shr(v128_t __a,int32_t __b)955*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u64x2_shr(v128_t __a,
956*13fbcb42Sjoerg int32_t __b) {
957*13fbcb42Sjoerg return (v128_t)((__u64x2)__a >> (int64_t)__b);
958*13fbcb42Sjoerg }
959*13fbcb42Sjoerg
wasm_i64x2_add(v128_t __a,v128_t __b)960*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_add(v128_t __a,
961*13fbcb42Sjoerg v128_t __b) {
962*13fbcb42Sjoerg return (v128_t)((__u64x2)__a + (__u64x2)__b);
963*13fbcb42Sjoerg }
964*13fbcb42Sjoerg
wasm_i64x2_sub(v128_t __a,v128_t __b)965*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_sub(v128_t __a,
966*13fbcb42Sjoerg v128_t __b) {
967*13fbcb42Sjoerg return (v128_t)((__u64x2)__a - (__u64x2)__b);
968*13fbcb42Sjoerg }
969*13fbcb42Sjoerg
wasm_i64x2_mul(v128_t __a,v128_t __b)970*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_mul(v128_t __a,
971*13fbcb42Sjoerg v128_t __b) {
972*13fbcb42Sjoerg return (v128_t)((__u64x2)__a * (__u64x2)__b);
973*13fbcb42Sjoerg }
974*13fbcb42Sjoerg
wasm_f32x4_abs(v128_t __a)975*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_abs(v128_t __a) {
976*13fbcb42Sjoerg return (v128_t)__builtin_wasm_abs_f32x4((__f32x4)__a);
977*13fbcb42Sjoerg }
978*13fbcb42Sjoerg
wasm_f32x4_neg(v128_t __a)979*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_neg(v128_t __a) {
980*13fbcb42Sjoerg return (v128_t)(-(__f32x4)__a);
981*13fbcb42Sjoerg }
982*13fbcb42Sjoerg
wasm_f32x4_sqrt(v128_t __a)983*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_sqrt(v128_t __a) {
984*13fbcb42Sjoerg return (v128_t)__builtin_wasm_sqrt_f32x4((__f32x4)__a);
985*13fbcb42Sjoerg }
986*13fbcb42Sjoerg
wasm_f32x4_ceil(v128_t __a)987*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_ceil(v128_t __a) {
988*13fbcb42Sjoerg return (v128_t)__builtin_wasm_ceil_f32x4((__f32x4)__a);
989*13fbcb42Sjoerg }
990*13fbcb42Sjoerg
wasm_f32x4_floor(v128_t __a)991*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_floor(v128_t __a) {
992*13fbcb42Sjoerg return (v128_t)__builtin_wasm_floor_f32x4((__f32x4)__a);
993*13fbcb42Sjoerg }
994*13fbcb42Sjoerg
wasm_f32x4_trunc(v128_t __a)995*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_trunc(v128_t __a) {
996*13fbcb42Sjoerg return (v128_t)__builtin_wasm_trunc_f32x4((__f32x4)__a);
997*13fbcb42Sjoerg }
998*13fbcb42Sjoerg
wasm_f32x4_nearest(v128_t __a)999*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_nearest(v128_t __a) {
1000*13fbcb42Sjoerg return (v128_t)__builtin_wasm_nearest_f32x4((__f32x4)__a);
1001*13fbcb42Sjoerg }
1002*13fbcb42Sjoerg
wasm_f32x4_add(v128_t __a,v128_t __b)1003*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_add(v128_t __a,
1004*13fbcb42Sjoerg v128_t __b) {
1005*13fbcb42Sjoerg return (v128_t)((__f32x4)__a + (__f32x4)__b);
1006*13fbcb42Sjoerg }
1007*13fbcb42Sjoerg
wasm_f32x4_sub(v128_t __a,v128_t __b)1008*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_sub(v128_t __a,
1009*13fbcb42Sjoerg v128_t __b) {
1010*13fbcb42Sjoerg return (v128_t)((__f32x4)__a - (__f32x4)__b);
1011*13fbcb42Sjoerg }
1012*13fbcb42Sjoerg
wasm_f32x4_mul(v128_t __a,v128_t __b)1013*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_mul(v128_t __a,
1014*13fbcb42Sjoerg v128_t __b) {
1015*13fbcb42Sjoerg return (v128_t)((__f32x4)__a * (__f32x4)__b);
1016*13fbcb42Sjoerg }
1017*13fbcb42Sjoerg
wasm_f32x4_div(v128_t __a,v128_t __b)1018*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_div(v128_t __a,
1019*13fbcb42Sjoerg v128_t __b) {
1020*13fbcb42Sjoerg return (v128_t)((__f32x4)__a / (__f32x4)__b);
1021*13fbcb42Sjoerg }
1022*13fbcb42Sjoerg
wasm_f32x4_min(v128_t __a,v128_t __b)1023*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_min(v128_t __a,
1024*13fbcb42Sjoerg v128_t __b) {
1025*13fbcb42Sjoerg return (v128_t)__builtin_wasm_min_f32x4((__f32x4)__a, (__f32x4)__b);
1026*13fbcb42Sjoerg }
1027*13fbcb42Sjoerg
wasm_f32x4_max(v128_t __a,v128_t __b)1028*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_max(v128_t __a,
1029*13fbcb42Sjoerg v128_t __b) {
1030*13fbcb42Sjoerg return (v128_t)__builtin_wasm_max_f32x4((__f32x4)__a, (__f32x4)__b);
1031*13fbcb42Sjoerg }
1032*13fbcb42Sjoerg
wasm_f32x4_pmin(v128_t __a,v128_t __b)1033*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_pmin(v128_t __a,
1034*13fbcb42Sjoerg v128_t __b) {
1035*13fbcb42Sjoerg return (v128_t)__builtin_wasm_pmin_f32x4((__f32x4)__a, (__f32x4)__b);
1036*13fbcb42Sjoerg }
1037*13fbcb42Sjoerg
wasm_f32x4_pmax(v128_t __a,v128_t __b)1038*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_pmax(v128_t __a,
1039*13fbcb42Sjoerg v128_t __b) {
1040*13fbcb42Sjoerg return (v128_t)__builtin_wasm_pmax_f32x4((__f32x4)__a, (__f32x4)__b);
1041*13fbcb42Sjoerg }
1042*13fbcb42Sjoerg
wasm_f64x2_abs(v128_t __a)1043*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_abs(v128_t __a) {
1044*13fbcb42Sjoerg return (v128_t)__builtin_wasm_abs_f64x2((__f64x2)__a);
1045*13fbcb42Sjoerg }
1046*13fbcb42Sjoerg
wasm_f64x2_neg(v128_t __a)1047*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_neg(v128_t __a) {
1048*13fbcb42Sjoerg return (v128_t)(-(__f64x2)__a);
1049*13fbcb42Sjoerg }
1050*13fbcb42Sjoerg
wasm_f64x2_sqrt(v128_t __a)1051*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_sqrt(v128_t __a) {
1052*13fbcb42Sjoerg return (v128_t)__builtin_wasm_sqrt_f64x2((__f64x2)__a);
1053*13fbcb42Sjoerg }
1054*13fbcb42Sjoerg
wasm_f64x2_ceil(v128_t __a)1055*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_ceil(v128_t __a) {
1056*13fbcb42Sjoerg return (v128_t)__builtin_wasm_ceil_f64x2((__f64x2)__a);
1057*13fbcb42Sjoerg }
1058*13fbcb42Sjoerg
wasm_f64x2_floor(v128_t __a)1059*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_floor(v128_t __a) {
1060*13fbcb42Sjoerg return (v128_t)__builtin_wasm_floor_f64x2((__f64x2)__a);
1061*13fbcb42Sjoerg }
1062*13fbcb42Sjoerg
wasm_f64x2_trunc(v128_t __a)1063*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_trunc(v128_t __a) {
1064*13fbcb42Sjoerg return (v128_t)__builtin_wasm_trunc_f64x2((__f64x2)__a);
1065*13fbcb42Sjoerg }
1066*13fbcb42Sjoerg
wasm_f64x2_nearest(v128_t __a)1067*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_nearest(v128_t __a) {
1068*13fbcb42Sjoerg return (v128_t)__builtin_wasm_nearest_f64x2((__f64x2)__a);
1069*13fbcb42Sjoerg }
1070*13fbcb42Sjoerg
wasm_f64x2_add(v128_t __a,v128_t __b)1071*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_add(v128_t __a,
1072*13fbcb42Sjoerg v128_t __b) {
1073*13fbcb42Sjoerg return (v128_t)((__f64x2)__a + (__f64x2)__b);
1074*13fbcb42Sjoerg }
1075*13fbcb42Sjoerg
wasm_f64x2_sub(v128_t __a,v128_t __b)1076*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_sub(v128_t __a,
1077*13fbcb42Sjoerg v128_t __b) {
1078*13fbcb42Sjoerg return (v128_t)((__f64x2)__a - (__f64x2)__b);
1079*13fbcb42Sjoerg }
1080*13fbcb42Sjoerg
wasm_f64x2_mul(v128_t __a,v128_t __b)1081*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_mul(v128_t __a,
1082*13fbcb42Sjoerg v128_t __b) {
1083*13fbcb42Sjoerg return (v128_t)((__f64x2)__a * (__f64x2)__b);
1084*13fbcb42Sjoerg }
1085*13fbcb42Sjoerg
wasm_f64x2_div(v128_t __a,v128_t __b)1086*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_div(v128_t __a,
1087*13fbcb42Sjoerg v128_t __b) {
1088*13fbcb42Sjoerg return (v128_t)((__f64x2)__a / (__f64x2)__b);
1089*13fbcb42Sjoerg }
1090*13fbcb42Sjoerg
wasm_f64x2_min(v128_t __a,v128_t __b)1091*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_min(v128_t __a,
1092*13fbcb42Sjoerg v128_t __b) {
1093*13fbcb42Sjoerg return (v128_t)__builtin_wasm_min_f64x2((__f64x2)__a, (__f64x2)__b);
1094*13fbcb42Sjoerg }
1095*13fbcb42Sjoerg
wasm_f64x2_max(v128_t __a,v128_t __b)1096*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_max(v128_t __a,
1097*13fbcb42Sjoerg v128_t __b) {
1098*13fbcb42Sjoerg return (v128_t)__builtin_wasm_max_f64x2((__f64x2)__a, (__f64x2)__b);
1099*13fbcb42Sjoerg }
1100*13fbcb42Sjoerg
wasm_f64x2_pmin(v128_t __a,v128_t __b)1101*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_pmin(v128_t __a,
1102*13fbcb42Sjoerg v128_t __b) {
1103*13fbcb42Sjoerg return (v128_t)__builtin_wasm_pmin_f64x2((__f64x2)__a, (__f64x2)__b);
1104*13fbcb42Sjoerg }
1105*13fbcb42Sjoerg
wasm_f64x2_pmax(v128_t __a,v128_t __b)1106*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_pmax(v128_t __a,
1107*13fbcb42Sjoerg v128_t __b) {
1108*13fbcb42Sjoerg return (v128_t)__builtin_wasm_pmax_f64x2((__f64x2)__a, (__f64x2)__b);
1109*13fbcb42Sjoerg }
1110*13fbcb42Sjoerg
1111*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i32x4_trunc_sat_f32x4(v128_t __a)1112*13fbcb42Sjoerg wasm_i32x4_trunc_sat_f32x4(v128_t __a) {
1113*13fbcb42Sjoerg return (v128_t)__builtin_wasm_trunc_saturate_s_i32x4_f32x4((__f32x4)__a);
1114*13fbcb42Sjoerg }
1115*13fbcb42Sjoerg
1116*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u32x4_trunc_sat_f32x4(v128_t __a)1117*13fbcb42Sjoerg wasm_u32x4_trunc_sat_f32x4(v128_t __a) {
1118*13fbcb42Sjoerg return (v128_t)__builtin_wasm_trunc_saturate_u_i32x4_f32x4((__f32x4)__a);
1119*13fbcb42Sjoerg }
1120*13fbcb42Sjoerg
1121*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_f32x4_convert_i32x4(v128_t __a)1122*13fbcb42Sjoerg wasm_f32x4_convert_i32x4(v128_t __a) {
1123*13fbcb42Sjoerg return (v128_t) __builtin_convertvector((__i32x4)__a, __f32x4);
1124*13fbcb42Sjoerg }
1125*13fbcb42Sjoerg
1126*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_f32x4_convert_u32x4(v128_t __a)1127*13fbcb42Sjoerg wasm_f32x4_convert_u32x4(v128_t __a) {
1128*13fbcb42Sjoerg return (v128_t) __builtin_convertvector((__u32x4)__a, __f32x4);
1129*13fbcb42Sjoerg }
1130*13fbcb42Sjoerg
1131*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_f64x2_convert_low_i32x4(v128_t __a)1132*13fbcb42Sjoerg wasm_f64x2_convert_low_i32x4(v128_t __a) {
1133*13fbcb42Sjoerg return (v128_t) __builtin_convertvector((__i32x2){__a[0], __a[1]}, __f64x2);
1134*13fbcb42Sjoerg }
1135*13fbcb42Sjoerg
1136*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_f64x2_convert_low_u32x4(v128_t __a)1137*13fbcb42Sjoerg wasm_f64x2_convert_low_u32x4(v128_t __a) {
1138*13fbcb42Sjoerg return (v128_t) __builtin_convertvector((__u32x2){__a[0], __a[1]}, __f64x2);
1139*13fbcb42Sjoerg }
1140*13fbcb42Sjoerg
1141*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i32x4_trunc_sat_f64x2_zero(v128_t __a)1142*13fbcb42Sjoerg wasm_i32x4_trunc_sat_f64x2_zero(v128_t __a) {
1143*13fbcb42Sjoerg return (v128_t)__builtin_wasm_trunc_sat_zero_s_f64x2_i32x4((__f64x2)__a);
1144*13fbcb42Sjoerg }
1145*13fbcb42Sjoerg
1146*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u32x4_trunc_sat_f64x2_zero(v128_t __a)1147*13fbcb42Sjoerg wasm_u32x4_trunc_sat_f64x2_zero(v128_t __a) {
1148*13fbcb42Sjoerg return (v128_t)__builtin_wasm_trunc_sat_zero_u_f64x2_i32x4((__f64x2)__a);
1149*13fbcb42Sjoerg }
1150*13fbcb42Sjoerg
1151*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_f32x4_demote_f64x2_zero(v128_t __a)1152*13fbcb42Sjoerg wasm_f32x4_demote_f64x2_zero(v128_t __a) {
1153*13fbcb42Sjoerg return (v128_t)__builtin_wasm_demote_zero_f64x2_f32x4((__f64x2)__a);
1154*13fbcb42Sjoerg }
1155*13fbcb42Sjoerg
1156*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_f64x2_promote_low_f32x4(v128_t __a)1157*13fbcb42Sjoerg wasm_f64x2_promote_low_f32x4(v128_t __a) {
1158*13fbcb42Sjoerg return (v128_t)__builtin_wasm_promote_low_f32x4_f64x2((__f32x4)__a);
1159*13fbcb42Sjoerg }
1160*13fbcb42Sjoerg
1161*13fbcb42Sjoerg #define wasm_i8x16_shuffle(__a, __b, __c0, __c1, __c2, __c3, __c4, __c5, __c6, \
1162*13fbcb42Sjoerg __c7, __c8, __c9, __c10, __c11, __c12, __c13, \
1163*13fbcb42Sjoerg __c14, __c15) \
1164*13fbcb42Sjoerg ((v128_t)__builtin_wasm_shuffle_i8x16( \
1165*13fbcb42Sjoerg (__i8x16)(__a), (__i8x16)(__b), __c0, __c1, __c2, __c3, __c4, __c5, \
1166*13fbcb42Sjoerg __c6, __c7, __c8, __c9, __c10, __c11, __c12, __c13, __c14, __c15))
1167*13fbcb42Sjoerg
1168*13fbcb42Sjoerg #define wasm_i16x8_shuffle(__a, __b, __c0, __c1, __c2, __c3, __c4, __c5, __c6, \
1169*13fbcb42Sjoerg __c7) \
1170*13fbcb42Sjoerg ((v128_t)__builtin_wasm_shuffle_i8x16( \
1171*13fbcb42Sjoerg (__i8x16)(__a), (__i8x16)(__b), (__c0)*2, (__c0)*2 + 1, (__c1)*2, \
1172*13fbcb42Sjoerg (__c1)*2 + 1, (__c2)*2, (__c2)*2 + 1, (__c3)*2, (__c3)*2 + 1, (__c4)*2, \
1173*13fbcb42Sjoerg (__c4)*2 + 1, (__c5)*2, (__c5)*2 + 1, (__c6)*2, (__c6)*2 + 1, (__c7)*2, \
1174*13fbcb42Sjoerg (__c7)*2 + 1))
1175*13fbcb42Sjoerg
1176*13fbcb42Sjoerg #define wasm_i32x4_shuffle(__a, __b, __c0, __c1, __c2, __c3) \
1177*13fbcb42Sjoerg ((v128_t)__builtin_wasm_shuffle_i8x16( \
1178*13fbcb42Sjoerg (__i8x16)(__a), (__i8x16)(__b), (__c0)*4, (__c0)*4 + 1, (__c0)*4 + 2, \
1179*13fbcb42Sjoerg (__c0)*4 + 3, (__c1)*4, (__c1)*4 + 1, (__c1)*4 + 2, (__c1)*4 + 3, \
1180*13fbcb42Sjoerg (__c2)*4, (__c2)*4 + 1, (__c2)*4 + 2, (__c2)*4 + 3, (__c3)*4, \
1181*13fbcb42Sjoerg (__c3)*4 + 1, (__c3)*4 + 2, (__c3)*4 + 3))
1182*13fbcb42Sjoerg
1183*13fbcb42Sjoerg #define wasm_i64x2_shuffle(__a, __b, __c0, __c1) \
1184*13fbcb42Sjoerg ((v128_t)__builtin_wasm_shuffle_i8x16( \
1185*13fbcb42Sjoerg (__i8x16)(__a), (__i8x16)(__b), (__c0)*8, (__c0)*8 + 1, (__c0)*8 + 2, \
1186*13fbcb42Sjoerg (__c0)*8 + 3, (__c0)*8 + 4, (__c0)*8 + 5, (__c0)*8 + 6, (__c0)*8 + 7, \
1187*13fbcb42Sjoerg (__c1)*8, (__c1)*8 + 1, (__c1)*8 + 2, (__c1)*8 + 3, (__c1)*8 + 4, \
1188*13fbcb42Sjoerg (__c1)*8 + 5, (__c1)*8 + 6, (__c1)*8 + 7))
1189*13fbcb42Sjoerg
wasm_i8x16_swizzle(v128_t __a,v128_t __b)1190*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_swizzle(v128_t __a,
1191*13fbcb42Sjoerg v128_t __b) {
1192*13fbcb42Sjoerg return (v128_t)__builtin_wasm_swizzle_i8x16((__i8x16)__a, (__i8x16)__b);
1193*13fbcb42Sjoerg }
1194*13fbcb42Sjoerg
1195*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i8x16_narrow_i16x8(v128_t __a,v128_t __b)1196*13fbcb42Sjoerg wasm_i8x16_narrow_i16x8(v128_t __a, v128_t __b) {
1197*13fbcb42Sjoerg return (v128_t)__builtin_wasm_narrow_s_i8x16_i16x8((__i16x8)__a,
1198*13fbcb42Sjoerg (__i16x8)__b);
1199*13fbcb42Sjoerg }
1200*13fbcb42Sjoerg
1201*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u8x16_narrow_i16x8(v128_t __a,v128_t __b)1202*13fbcb42Sjoerg wasm_u8x16_narrow_i16x8(v128_t __a, v128_t __b) {
1203*13fbcb42Sjoerg return (v128_t)__builtin_wasm_narrow_u_i8x16_i16x8((__i16x8)__a,
1204*13fbcb42Sjoerg (__i16x8)__b);
1205*13fbcb42Sjoerg }
1206*13fbcb42Sjoerg
1207*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i16x8_narrow_i32x4(v128_t __a,v128_t __b)1208*13fbcb42Sjoerg wasm_i16x8_narrow_i32x4(v128_t __a, v128_t __b) {
1209*13fbcb42Sjoerg return (v128_t)__builtin_wasm_narrow_s_i16x8_i32x4((__i32x4)__a,
1210*13fbcb42Sjoerg (__i32x4)__b);
1211*13fbcb42Sjoerg }
1212*13fbcb42Sjoerg
1213*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u16x8_narrow_i32x4(v128_t __a,v128_t __b)1214*13fbcb42Sjoerg wasm_u16x8_narrow_i32x4(v128_t __a, v128_t __b) {
1215*13fbcb42Sjoerg return (v128_t)__builtin_wasm_narrow_u_i16x8_i32x4((__i32x4)__a,
1216*13fbcb42Sjoerg (__i32x4)__b);
1217*13fbcb42Sjoerg }
1218*13fbcb42Sjoerg
1219*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i16x8_extend_low_i8x16(v128_t __a)1220*13fbcb42Sjoerg wasm_i16x8_extend_low_i8x16(v128_t __a) {
1221*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(
1222*13fbcb42Sjoerg (__i8x8){((__i8x16)__a)[0], ((__i8x16)__a)[1], ((__i8x16)__a)[2],
1223*13fbcb42Sjoerg ((__i8x16)__a)[3], ((__i8x16)__a)[4], ((__i8x16)__a)[5],
1224*13fbcb42Sjoerg ((__i8x16)__a)[6], ((__i8x16)__a)[7]},
1225*13fbcb42Sjoerg __i16x8);
1226*13fbcb42Sjoerg }
1227*13fbcb42Sjoerg
1228*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i16x8_extend_high_i8x16(v128_t __a)1229*13fbcb42Sjoerg wasm_i16x8_extend_high_i8x16(v128_t __a) {
1230*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(
1231*13fbcb42Sjoerg (__i8x8){((__i8x16)__a)[8], ((__i8x16)__a)[9], ((__i8x16)__a)[10],
1232*13fbcb42Sjoerg ((__i8x16)__a)[11], ((__i8x16)__a)[12], ((__i8x16)__a)[13],
1233*13fbcb42Sjoerg ((__i8x16)__a)[14], ((__i8x16)__a)[15]},
1234*13fbcb42Sjoerg __i16x8);
1235*13fbcb42Sjoerg }
1236*13fbcb42Sjoerg
1237*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u16x8_extend_low_u8x16(v128_t __a)1238*13fbcb42Sjoerg wasm_u16x8_extend_low_u8x16(v128_t __a) {
1239*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(
1240*13fbcb42Sjoerg (__u8x8){((__u8x16)__a)[0], ((__u8x16)__a)[1], ((__u8x16)__a)[2],
1241*13fbcb42Sjoerg ((__u8x16)__a)[3], ((__u8x16)__a)[4], ((__u8x16)__a)[5],
1242*13fbcb42Sjoerg ((__u8x16)__a)[6], ((__u8x16)__a)[7]},
1243*13fbcb42Sjoerg __u16x8);
1244*13fbcb42Sjoerg }
1245*13fbcb42Sjoerg
1246*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u16x8_extend_high_u8x16(v128_t __a)1247*13fbcb42Sjoerg wasm_u16x8_extend_high_u8x16(v128_t __a) {
1248*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(
1249*13fbcb42Sjoerg (__u8x8){((__u8x16)__a)[8], ((__u8x16)__a)[9], ((__u8x16)__a)[10],
1250*13fbcb42Sjoerg ((__u8x16)__a)[11], ((__u8x16)__a)[12], ((__u8x16)__a)[13],
1251*13fbcb42Sjoerg ((__u8x16)__a)[14], ((__u8x16)__a)[15]},
1252*13fbcb42Sjoerg __u16x8);
1253*13fbcb42Sjoerg }
1254*13fbcb42Sjoerg
1255*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i32x4_extend_low_i16x8(v128_t __a)1256*13fbcb42Sjoerg wasm_i32x4_extend_low_i16x8(v128_t __a) {
1257*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(
1258*13fbcb42Sjoerg (__i16x4){((__i16x8)__a)[0], ((__i16x8)__a)[1], ((__i16x8)__a)[2],
1259*13fbcb42Sjoerg ((__i16x8)__a)[3]},
1260*13fbcb42Sjoerg __i32x4);
1261*13fbcb42Sjoerg }
1262*13fbcb42Sjoerg
1263*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i32x4_extend_high_i16x8(v128_t __a)1264*13fbcb42Sjoerg wasm_i32x4_extend_high_i16x8(v128_t __a) {
1265*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(
1266*13fbcb42Sjoerg (__i16x4){((__i16x8)__a)[4], ((__i16x8)__a)[5], ((__i16x8)__a)[6],
1267*13fbcb42Sjoerg ((__i16x8)__a)[7]},
1268*13fbcb42Sjoerg __i32x4);
1269*13fbcb42Sjoerg }
1270*13fbcb42Sjoerg
1271*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u32x4_extend_low_u16x8(v128_t __a)1272*13fbcb42Sjoerg wasm_u32x4_extend_low_u16x8(v128_t __a) {
1273*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(
1274*13fbcb42Sjoerg (__u16x4){((__u16x8)__a)[0], ((__u16x8)__a)[1], ((__u16x8)__a)[2],
1275*13fbcb42Sjoerg ((__u16x8)__a)[3]},
1276*13fbcb42Sjoerg __u32x4);
1277*13fbcb42Sjoerg }
1278*13fbcb42Sjoerg
1279*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u32x4_extend_high_u16x8(v128_t __a)1280*13fbcb42Sjoerg wasm_u32x4_extend_high_u16x8(v128_t __a) {
1281*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(
1282*13fbcb42Sjoerg (__u16x4){((__u16x8)__a)[4], ((__u16x8)__a)[5], ((__u16x8)__a)[6],
1283*13fbcb42Sjoerg ((__u16x8)__a)[7]},
1284*13fbcb42Sjoerg __u32x4);
1285*13fbcb42Sjoerg }
1286*13fbcb42Sjoerg
1287*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i64x2_extend_low_i32x4(v128_t __a)1288*13fbcb42Sjoerg wasm_i64x2_extend_low_i32x4(v128_t __a) {
1289*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(
1290*13fbcb42Sjoerg (__i32x2){((__i32x4)__a)[0], ((__i32x4)__a)[1]}, __i64x2);
1291*13fbcb42Sjoerg }
1292*13fbcb42Sjoerg
1293*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i64x2_extend_high_i32x4(v128_t __a)1294*13fbcb42Sjoerg wasm_i64x2_extend_high_i32x4(v128_t __a) {
1295*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(
1296*13fbcb42Sjoerg (__i32x2){((__i32x4)__a)[2], ((__i32x4)__a)[3]}, __i64x2);
1297*13fbcb42Sjoerg }
1298*13fbcb42Sjoerg
1299*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u64x2_extend_low_u32x4(v128_t __a)1300*13fbcb42Sjoerg wasm_u64x2_extend_low_u32x4(v128_t __a) {
1301*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(
1302*13fbcb42Sjoerg (__u32x2){((__u32x4)__a)[0], ((__u32x4)__a)[1]}, __u64x2);
1303*13fbcb42Sjoerg }
1304*13fbcb42Sjoerg
1305*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u64x2_extend_high_u32x4(v128_t __a)1306*13fbcb42Sjoerg wasm_u64x2_extend_high_u32x4(v128_t __a) {
1307*13fbcb42Sjoerg return (v128_t) __builtin_convertvector(
1308*13fbcb42Sjoerg (__u32x2){((__u32x4)__a)[2], ((__u32x4)__a)[3]}, __u64x2);
1309*13fbcb42Sjoerg }
1310*13fbcb42Sjoerg
1311*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i16x8_extadd_pairwise_i8x16(v128_t __a)1312*13fbcb42Sjoerg wasm_i16x8_extadd_pairwise_i8x16(v128_t __a) {
1313*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extadd_pairwise_i8x16_s_i16x8((__i8x16)__a);
1314*13fbcb42Sjoerg }
1315*13fbcb42Sjoerg
1316*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u16x8_extadd_pairwise_u8x16(v128_t __a)1317*13fbcb42Sjoerg wasm_u16x8_extadd_pairwise_u8x16(v128_t __a) {
1318*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extadd_pairwise_i8x16_u_i16x8((__u8x16)__a);
1319*13fbcb42Sjoerg }
1320*13fbcb42Sjoerg
1321*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i32x4_extadd_pairwise_i16x8(v128_t __a)1322*13fbcb42Sjoerg wasm_i32x4_extadd_pairwise_i16x8(v128_t __a) {
1323*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extadd_pairwise_i16x8_s_i32x4((__i16x8)__a);
1324*13fbcb42Sjoerg }
1325*13fbcb42Sjoerg
1326*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u32x4_extadd_pairwise_u16x8(v128_t __a)1327*13fbcb42Sjoerg wasm_u32x4_extadd_pairwise_u16x8(v128_t __a) {
1328*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extadd_pairwise_i16x8_u_i32x4((__u16x8)__a);
1329*13fbcb42Sjoerg }
1330*13fbcb42Sjoerg
1331*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i16x8_extmul_low_i8x16(v128_t __a,v128_t __b)1332*13fbcb42Sjoerg wasm_i16x8_extmul_low_i8x16(v128_t __a, v128_t __b) {
1333*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extmul_low_i8x16_s_i16x8((__i8x16)__a,
1334*13fbcb42Sjoerg (__i8x16)__b);
1335*13fbcb42Sjoerg }
1336*13fbcb42Sjoerg
1337*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i16x8_extmul_high_i8x16(v128_t __a,v128_t __b)1338*13fbcb42Sjoerg wasm_i16x8_extmul_high_i8x16(v128_t __a, v128_t __b) {
1339*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extmul_high_i8x16_s_i16x8((__i8x16)__a,
1340*13fbcb42Sjoerg (__i8x16)__b);
1341*13fbcb42Sjoerg }
1342*13fbcb42Sjoerg
1343*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u16x8_extmul_low_u8x16(v128_t __a,v128_t __b)1344*13fbcb42Sjoerg wasm_u16x8_extmul_low_u8x16(v128_t __a, v128_t __b) {
1345*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extmul_low_i8x16_u_i16x8((__u8x16)__a,
1346*13fbcb42Sjoerg (__u8x16)__b);
1347*13fbcb42Sjoerg }
1348*13fbcb42Sjoerg
1349*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u16x8_extmul_high_u8x16(v128_t __a,v128_t __b)1350*13fbcb42Sjoerg wasm_u16x8_extmul_high_u8x16(v128_t __a, v128_t __b) {
1351*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extmul_high_i8x16_u_i16x8((__u8x16)__a,
1352*13fbcb42Sjoerg (__u8x16)__b);
1353*13fbcb42Sjoerg }
1354*13fbcb42Sjoerg
1355*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i32x4_extmul_low_i16x8(v128_t __a,v128_t __b)1356*13fbcb42Sjoerg wasm_i32x4_extmul_low_i16x8(v128_t __a, v128_t __b) {
1357*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extmul_low_i16x8_s_i32x4((__i16x8)__a,
1358*13fbcb42Sjoerg (__i16x8)__b);
1359*13fbcb42Sjoerg }
1360*13fbcb42Sjoerg
1361*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i32x4_extmul_high_i16x8(v128_t __a,v128_t __b)1362*13fbcb42Sjoerg wasm_i32x4_extmul_high_i16x8(v128_t __a, v128_t __b) {
1363*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extmul_high_i16x8_s_i32x4((__i16x8)__a,
1364*13fbcb42Sjoerg (__i16x8)__b);
1365*13fbcb42Sjoerg }
1366*13fbcb42Sjoerg
1367*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u32x4_extmul_low_u16x8(v128_t __a,v128_t __b)1368*13fbcb42Sjoerg wasm_u32x4_extmul_low_u16x8(v128_t __a, v128_t __b) {
1369*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extmul_low_i16x8_u_i32x4((__u16x8)__a,
1370*13fbcb42Sjoerg (__u16x8)__b);
1371*13fbcb42Sjoerg }
1372*13fbcb42Sjoerg
1373*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u32x4_extmul_high_u16x8(v128_t __a,v128_t __b)1374*13fbcb42Sjoerg wasm_u32x4_extmul_high_u16x8(v128_t __a, v128_t __b) {
1375*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extmul_high_i16x8_u_i32x4((__u16x8)__a,
1376*13fbcb42Sjoerg (__u16x8)__b);
1377*13fbcb42Sjoerg }
1378*13fbcb42Sjoerg
1379*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i64x2_extmul_low_i32x4(v128_t __a,v128_t __b)1380*13fbcb42Sjoerg wasm_i64x2_extmul_low_i32x4(v128_t __a, v128_t __b) {
1381*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extmul_low_i32x4_s_i64x2((__i32x4)__a,
1382*13fbcb42Sjoerg (__i32x4)__b);
1383*13fbcb42Sjoerg }
1384*13fbcb42Sjoerg
1385*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_i64x2_extmul_high_i32x4(v128_t __a,v128_t __b)1386*13fbcb42Sjoerg wasm_i64x2_extmul_high_i32x4(v128_t __a, v128_t __b) {
1387*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extmul_high_i32x4_s_i64x2((__i32x4)__a,
1388*13fbcb42Sjoerg (__i32x4)__b);
1389*13fbcb42Sjoerg }
1390*13fbcb42Sjoerg
1391*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u64x2_extmul_low_u32x4(v128_t __a,v128_t __b)1392*13fbcb42Sjoerg wasm_u64x2_extmul_low_u32x4(v128_t __a, v128_t __b) {
1393*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extmul_low_i32x4_u_i64x2((__u32x4)__a,
1394*13fbcb42Sjoerg (__u32x4)__b);
1395*13fbcb42Sjoerg }
1396*13fbcb42Sjoerg
1397*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS
wasm_u64x2_extmul_high_u32x4(v128_t __a,v128_t __b)1398*13fbcb42Sjoerg wasm_u64x2_extmul_high_u32x4(v128_t __a, v128_t __b) {
1399*13fbcb42Sjoerg return (v128_t)__builtin_wasm_extmul_high_i32x4_u_i64x2((__u32x4)__a,
1400*13fbcb42Sjoerg (__u32x4)__b);
1401*13fbcb42Sjoerg }
1402*13fbcb42Sjoerg
wasm_i16x8_q15mulr_sat(v128_t __a,v128_t __b)1403*13fbcb42Sjoerg static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_q15mulr_sat(v128_t __a,
1404*13fbcb42Sjoerg v128_t __b) {
1405*13fbcb42Sjoerg return (v128_t)__builtin_wasm_q15mulr_sat_s_i16x8((__i16x8)__a, (__i16x8)__b);
1406*13fbcb42Sjoerg }
1407*13fbcb42Sjoerg
1408*13fbcb42Sjoerg // Old intrinsic names supported to ease transitioning to the standard names. Do
1409*13fbcb42Sjoerg // not use these; they will be removed in the near future.
1410*13fbcb42Sjoerg
1411*13fbcb42Sjoerg #define __DEPRECATED_FN_ATTRS(__replacement) \
1412*13fbcb42Sjoerg __DEFAULT_FN_ATTRS __attribute__( \
1413*13fbcb42Sjoerg (deprecated("use " __replacement " instead", __replacement)))
1414*13fbcb42Sjoerg
1415*13fbcb42Sjoerg #define __WASM_STR(X) #X
1416*13fbcb42Sjoerg
1417*13fbcb42Sjoerg #ifdef __DEPRECATED
1418*13fbcb42Sjoerg #define __DEPRECATED_WASM_MACRO(__name, __replacement) \
1419*13fbcb42Sjoerg _Pragma(__WASM_STR(GCC warning( \
1420*13fbcb42Sjoerg "'" __name "' is deprecated: use '" __replacement "' instead")))
1421*13fbcb42Sjoerg #else
1422*13fbcb42Sjoerg #define __DEPRECATED_WASM_MACRO(__name, __replacement)
1423*13fbcb42Sjoerg #endif
1424*13fbcb42Sjoerg
1425*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_v128_load8_splat")
wasm_v8x16_load_splat(const void * __mem)1426*13fbcb42Sjoerg wasm_v8x16_load_splat(const void *__mem) {
1427*13fbcb42Sjoerg return wasm_v128_load8_splat(__mem);
1428*13fbcb42Sjoerg }
1429*13fbcb42Sjoerg
1430*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_v128_load16_splat")
wasm_v16x8_load_splat(const void * __mem)1431*13fbcb42Sjoerg wasm_v16x8_load_splat(const void *__mem) {
1432*13fbcb42Sjoerg return wasm_v128_load16_splat(__mem);
1433*13fbcb42Sjoerg }
1434*13fbcb42Sjoerg
1435*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_v128_load32_splat")
wasm_v32x4_load_splat(const void * __mem)1436*13fbcb42Sjoerg wasm_v32x4_load_splat(const void *__mem) {
1437*13fbcb42Sjoerg return wasm_v128_load32_splat(__mem);
1438*13fbcb42Sjoerg }
1439*13fbcb42Sjoerg
1440*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_v128_load64_splat")
wasm_v64x2_load_splat(const void * __mem)1441*13fbcb42Sjoerg wasm_v64x2_load_splat(const void *__mem) {
1442*13fbcb42Sjoerg return wasm_v128_load64_splat(__mem);
1443*13fbcb42Sjoerg }
1444*13fbcb42Sjoerg
1445*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_i16x8_load8x8")
wasm_i16x8_load_8x8(const void * __mem)1446*13fbcb42Sjoerg wasm_i16x8_load_8x8(const void *__mem) {
1447*13fbcb42Sjoerg return wasm_i16x8_load8x8(__mem);
1448*13fbcb42Sjoerg }
1449*13fbcb42Sjoerg
1450*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_u16x8_load8x8")
wasm_u16x8_load_8x8(const void * __mem)1451*13fbcb42Sjoerg wasm_u16x8_load_8x8(const void *__mem) {
1452*13fbcb42Sjoerg return wasm_u16x8_load8x8(__mem);
1453*13fbcb42Sjoerg }
1454*13fbcb42Sjoerg
1455*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_i32x4_load16x4")
wasm_i32x4_load_16x4(const void * __mem)1456*13fbcb42Sjoerg wasm_i32x4_load_16x4(const void *__mem) {
1457*13fbcb42Sjoerg return wasm_i32x4_load16x4(__mem);
1458*13fbcb42Sjoerg }
1459*13fbcb42Sjoerg
1460*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_u32x4_load16x4")
wasm_u32x4_load_16x4(const void * __mem)1461*13fbcb42Sjoerg wasm_u32x4_load_16x4(const void *__mem) {
1462*13fbcb42Sjoerg return wasm_u32x4_load16x4(__mem);
1463*13fbcb42Sjoerg }
1464*13fbcb42Sjoerg
1465*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_i64x2_load32x2")
wasm_i64x2_load_32x2(const void * __mem)1466*13fbcb42Sjoerg wasm_i64x2_load_32x2(const void *__mem) {
1467*13fbcb42Sjoerg return wasm_i64x2_load32x2(__mem);
1468*13fbcb42Sjoerg }
1469*13fbcb42Sjoerg
1470*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_u64x2_load32x2")
wasm_u64x2_load_32x2(const void * __mem)1471*13fbcb42Sjoerg wasm_u64x2_load_32x2(const void *__mem) {
1472*13fbcb42Sjoerg return wasm_u64x2_load32x2(__mem);
1473*13fbcb42Sjoerg }
1474*13fbcb42Sjoerg
1475*13fbcb42Sjoerg #define wasm_v8x16_shuffle(__a, __b, __c0, __c1, __c2, __c3, __c4, __c5, __c6, \
1476*13fbcb42Sjoerg __c7, __c8, __c9, __c10, __c11, __c12, __c13, \
1477*13fbcb42Sjoerg __c14, __c15) \
1478*13fbcb42Sjoerg __DEPRECATED_WASM_MACRO("wasm_v8x16_shuffle", "wasm_i8x16_shuffle") \
1479*13fbcb42Sjoerg wasm_i8x16_shuffle(__a, __b, __c0, __c1, __c2, __c3, __c4, __c5, __c6, __c7, \
1480*13fbcb42Sjoerg __c8, __c9, __c10, __c11, __c12, __c13, __c14, __c15)
1481*13fbcb42Sjoerg
1482*13fbcb42Sjoerg #define wasm_v16x8_shuffle(__a, __b, __c0, __c1, __c2, __c3, __c4, __c5, __c6, \
1483*13fbcb42Sjoerg __c7) \
1484*13fbcb42Sjoerg __DEPRECATED_WASM_MACRO("wasm_v16x8_shuffle", "wasm_i16x8_shuffle") \
1485*13fbcb42Sjoerg wasm_i16x8_shuffle(__a, __b, __c0, __c1, __c2, __c3, __c4, __c5, __c6, __c7)
1486*13fbcb42Sjoerg
1487*13fbcb42Sjoerg #define wasm_v32x4_shuffle(__a, __b, __c0, __c1, __c2, __c3) \
1488*13fbcb42Sjoerg __DEPRECATED_WASM_MACRO("wasm_v32x4_shuffle", "wasm_i32x4_shuffle") \
1489*13fbcb42Sjoerg wasm_i32x4_shuffle(__a, __b, __c0, __c1, __c2, __c3)
1490*13fbcb42Sjoerg
1491*13fbcb42Sjoerg #define wasm_v64x2_shuffle(__a, __b, __c0, __c1) \
1492*13fbcb42Sjoerg __DEPRECATED_WASM_MACRO("wasm_v64x2_shuffle", "wasm_i64x2_shuffle") \
1493*13fbcb42Sjoerg wasm_i64x2_shuffle(__a, __b, __c0, __c1)
1494*13fbcb42Sjoerg
1495*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_i8x16_swizzle")
wasm_v8x16_swizzle(v128_t __a,v128_t __b)1496*13fbcb42Sjoerg wasm_v8x16_swizzle(v128_t __a, v128_t __b) {
1497*13fbcb42Sjoerg return wasm_i8x16_swizzle(__a, __b);
1498*13fbcb42Sjoerg }
1499*13fbcb42Sjoerg
1500*13fbcb42Sjoerg static __inline__ bool __DEPRECATED_FN_ATTRS("wasm_v128_any_true")
wasm_i8x16_any_true(v128_t __a)1501*13fbcb42Sjoerg wasm_i8x16_any_true(v128_t __a) {
1502*13fbcb42Sjoerg return wasm_v128_any_true(__a);
1503*13fbcb42Sjoerg }
1504*13fbcb42Sjoerg
1505*13fbcb42Sjoerg static __inline__ bool __DEPRECATED_FN_ATTRS("wasm_v128_any_true")
wasm_i16x8_any_true(v128_t __a)1506*13fbcb42Sjoerg wasm_i16x8_any_true(v128_t __a) {
1507*13fbcb42Sjoerg return wasm_v128_any_true(__a);
1508*13fbcb42Sjoerg }
1509*13fbcb42Sjoerg
1510*13fbcb42Sjoerg static __inline__ bool __DEPRECATED_FN_ATTRS("wasm_v128_any_true")
wasm_i32x4_any_true(v128_t __a)1511*13fbcb42Sjoerg wasm_i32x4_any_true(v128_t __a) {
1512*13fbcb42Sjoerg return wasm_v128_any_true(__a);
1513*13fbcb42Sjoerg }
1514*13fbcb42Sjoerg
1515*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_i8x16_add_sat")
wasm_i8x16_add_saturate(v128_t __a,v128_t __b)1516*13fbcb42Sjoerg wasm_i8x16_add_saturate(v128_t __a, v128_t __b) {
1517*13fbcb42Sjoerg return wasm_i8x16_add_sat(__a, __b);
1518*13fbcb42Sjoerg }
1519*13fbcb42Sjoerg
1520*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_u8x16_add_sat")
wasm_u8x16_add_saturate(v128_t __a,v128_t __b)1521*13fbcb42Sjoerg wasm_u8x16_add_saturate(v128_t __a, v128_t __b) {
1522*13fbcb42Sjoerg return wasm_u8x16_add_sat(__a, __b);
1523*13fbcb42Sjoerg }
1524*13fbcb42Sjoerg
1525*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_i8x16_sub_sat")
wasm_i8x16_sub_saturate(v128_t __a,v128_t __b)1526*13fbcb42Sjoerg wasm_i8x16_sub_saturate(v128_t __a, v128_t __b) {
1527*13fbcb42Sjoerg return wasm_i8x16_sub_sat(__a, __b);
1528*13fbcb42Sjoerg }
1529*13fbcb42Sjoerg
1530*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_u8x16_sub_sat")
wasm_u8x16_sub_saturate(v128_t __a,v128_t __b)1531*13fbcb42Sjoerg wasm_u8x16_sub_saturate(v128_t __a, v128_t __b) {
1532*13fbcb42Sjoerg return wasm_u8x16_sub_sat(__a, __b);
1533*13fbcb42Sjoerg }
1534*13fbcb42Sjoerg
1535*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_i16x8_add_sat")
wasm_i16x8_add_saturate(v128_t __a,v128_t __b)1536*13fbcb42Sjoerg wasm_i16x8_add_saturate(v128_t __a, v128_t __b) {
1537*13fbcb42Sjoerg return wasm_i16x8_add_sat(__a, __b);
1538*13fbcb42Sjoerg }
1539*13fbcb42Sjoerg
1540*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_u16x8_add_sat")
wasm_u16x8_add_saturate(v128_t __a,v128_t __b)1541*13fbcb42Sjoerg wasm_u16x8_add_saturate(v128_t __a, v128_t __b) {
1542*13fbcb42Sjoerg return wasm_u16x8_add_sat(__a, __b);
1543*13fbcb42Sjoerg }
1544*13fbcb42Sjoerg
1545*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_i16x8_sub_sat")
wasm_i16x8_sub_saturate(v128_t __a,v128_t __b)1546*13fbcb42Sjoerg wasm_i16x8_sub_saturate(v128_t __a, v128_t __b) {
1547*13fbcb42Sjoerg return wasm_i16x8_sub_sat(__a, __b);
1548*13fbcb42Sjoerg }
1549*13fbcb42Sjoerg
1550*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_u16x8_sub_sat")
wasm_u16x8_sub_saturate(v128_t __a,v128_t __b)1551*13fbcb42Sjoerg wasm_u16x8_sub_saturate(v128_t __a, v128_t __b) {
1552*13fbcb42Sjoerg return wasm_u16x8_sub_sat(__a, __b);
1553*13fbcb42Sjoerg }
1554*13fbcb42Sjoerg
1555*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_i16x8_extend_low_i8x16")
wasm_i16x8_widen_low_i8x16(v128_t __a)1556*13fbcb42Sjoerg wasm_i16x8_widen_low_i8x16(v128_t __a) {
1557*13fbcb42Sjoerg return wasm_i16x8_extend_low_i8x16(__a);
1558*13fbcb42Sjoerg }
1559*13fbcb42Sjoerg
1560*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_i16x8_extend_high_i8x16")
wasm_i16x8_widen_high_i8x16(v128_t __a)1561*13fbcb42Sjoerg wasm_i16x8_widen_high_i8x16(v128_t __a) {
1562*13fbcb42Sjoerg return wasm_i16x8_extend_high_i8x16(__a);
1563*13fbcb42Sjoerg }
1564*13fbcb42Sjoerg
1565*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_u16x8_extend_low_u8x16")
wasm_i16x8_widen_low_u8x16(v128_t __a)1566*13fbcb42Sjoerg wasm_i16x8_widen_low_u8x16(v128_t __a) {
1567*13fbcb42Sjoerg return wasm_u16x8_extend_low_u8x16(__a);
1568*13fbcb42Sjoerg }
1569*13fbcb42Sjoerg
1570*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_u16x8_extend_high_u8x16")
wasm_i16x8_widen_high_u8x16(v128_t __a)1571*13fbcb42Sjoerg wasm_i16x8_widen_high_u8x16(v128_t __a) {
1572*13fbcb42Sjoerg return wasm_u16x8_extend_high_u8x16(__a);
1573*13fbcb42Sjoerg }
1574*13fbcb42Sjoerg
1575*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_i32x4_extend_low_i16x8")
wasm_i32x4_widen_low_i16x8(v128_t __a)1576*13fbcb42Sjoerg wasm_i32x4_widen_low_i16x8(v128_t __a) {
1577*13fbcb42Sjoerg return wasm_i32x4_extend_low_i16x8(__a);
1578*13fbcb42Sjoerg }
1579*13fbcb42Sjoerg
1580*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_i32x4_extend_high_i16x8")
wasm_i32x4_widen_high_i16x8(v128_t __a)1581*13fbcb42Sjoerg wasm_i32x4_widen_high_i16x8(v128_t __a) {
1582*13fbcb42Sjoerg return wasm_i32x4_extend_high_i16x8(__a);
1583*13fbcb42Sjoerg }
1584*13fbcb42Sjoerg
1585*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_u32x4_extend_low_u16x8")
wasm_i32x4_widen_low_u16x8(v128_t __a)1586*13fbcb42Sjoerg wasm_i32x4_widen_low_u16x8(v128_t __a) {
1587*13fbcb42Sjoerg return wasm_u32x4_extend_low_u16x8(__a);
1588*13fbcb42Sjoerg }
1589*13fbcb42Sjoerg
1590*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_u32x4_extend_high_u16x8")
wasm_i32x4_widen_high_u16x8(v128_t __a)1591*13fbcb42Sjoerg wasm_i32x4_widen_high_u16x8(v128_t __a) {
1592*13fbcb42Sjoerg return wasm_u32x4_extend_high_u16x8(__a);
1593*13fbcb42Sjoerg }
1594*13fbcb42Sjoerg
1595*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_i32x4_trunc_sat_f32x4")
wasm_i32x4_trunc_saturate_f32x4(v128_t __a)1596*13fbcb42Sjoerg wasm_i32x4_trunc_saturate_f32x4(v128_t __a) {
1597*13fbcb42Sjoerg return wasm_i32x4_trunc_sat_f32x4(__a);
1598*13fbcb42Sjoerg }
1599*13fbcb42Sjoerg
1600*13fbcb42Sjoerg static __inline__ v128_t __DEPRECATED_FN_ATTRS("wasm_u32x4_trunc_sat_f32x4")
wasm_u32x4_trunc_saturate_f32x4(v128_t __a)1601*13fbcb42Sjoerg wasm_u32x4_trunc_saturate_f32x4(v128_t __a) {
1602*13fbcb42Sjoerg return wasm_u32x4_trunc_sat_f32x4(__a);
1603*13fbcb42Sjoerg }
1604*13fbcb42Sjoerg
1605*13fbcb42Sjoerg // Undefine helper macros
1606*13fbcb42Sjoerg #undef __DEFAULT_FN_ATTRS
1607*13fbcb42Sjoerg #undef __DEPRECATED_FN_ATTRS
1608*13fbcb42Sjoerg
1609*13fbcb42Sjoerg #endif // __WASM_SIMD128_H
1610