| OLD | NEW |
| 1 #include <stdint.h> | 1 #include <stdint.h> |
| 2 #include "test_arith.def" | 2 #include "test_arith.def" |
| 3 | 3 |
| 4 // Vector types | 4 #include "vectors.h" |
| 5 typedef int32_t v4si32 __attribute__((vector_size(16))); | |
| 6 typedef uint32_t v4ui32 __attribute__((vector_size(16))); | |
| 7 typedef int16_t v8si16 __attribute__((vector_size(16))); | |
| 8 typedef uint16_t v8ui16 __attribute__((vector_size(16))); | |
| 9 typedef int8_t v16si8 __attribute__((vector_size(16))); | |
| 10 typedef uint8_t v16ui8 __attribute__((vector_size(16))); | |
| 11 typedef float v4f32 __attribute__((vector_size(16))); | |
| 12 | 5 |
| 13 #define X(inst, op, isdiv) \ | 6 #define X(inst, op, isdiv) \ |
| 14 bool test##inst(bool a, bool b); \ | 7 bool test##inst(bool a, bool b); \ |
| 15 uint8_t test##inst(uint8_t a, uint8_t b); \ | 8 uint8_t test##inst(uint8_t a, uint8_t b); \ |
| 16 uint16_t test##inst(uint16_t a, uint16_t b); \ | 9 uint16_t test##inst(uint16_t a, uint16_t b); \ |
| 17 uint32_t test##inst(uint32_t a, uint32_t b); \ | 10 uint32_t test##inst(uint32_t a, uint32_t b); \ |
| 18 uint64_t test##inst(uint64_t a, uint64_t b); \ | 11 uint64_t test##inst(uint64_t a, uint64_t b); \ |
| 19 v4ui32 test##inst(v4ui32 a, v4ui32 b); \ | 12 v4ui32 test##inst(v4ui32 a, v4ui32 b); \ |
| 20 v8ui16 test##inst(v8ui16 a, v8ui16 b); \ | 13 v8ui16 test##inst(v8ui16 a, v8ui16 b); \ |
| 21 v16ui8 test##inst(v16ui8 a, v16ui8 b); | 14 v16ui8 test##inst(v16ui8 a, v16ui8 b); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 41 #define X(inst, op, func) \ | 34 #define X(inst, op, func) \ |
| 42 float test##inst(float a, float b); \ | 35 float test##inst(float a, float b); \ |
| 43 double test##inst(double a, double b); \ | 36 double test##inst(double a, double b); \ |
| 44 v4f32 test##inst(v4f32 a, v4f32 b); | 37 v4f32 test##inst(v4f32 a, v4f32 b); |
| 45 FPOP_TABLE | 38 FPOP_TABLE |
| 46 #undef X | 39 #undef X |
| 47 | 40 |
| 48 float mySqrt(float a); | 41 float mySqrt(float a); |
| 49 double mySqrt(double a); | 42 double mySqrt(double a); |
| 50 // mySqrt for v4f32 is currently unsupported. | 43 // mySqrt for v4f32 is currently unsupported. |
| OLD | NEW |