OLD | NEW |
1 //===- subzero/crosstest/test_arith.h - Test prototypes ---------*- C++ -*-===// | 1 //===- subzero/crosstest/test_arith.h - Test prototypes ---------*- C++ -*-===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file declares the function prototypes used for crosstesting arithmetic | 10 // This file declares the function prototypes used for crosstesting arithmetic |
11 // operations. | 11 // operations. |
12 // | 12 // |
13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
14 | 14 |
15 #include <stdint.h> | 15 #include <stdint.h> |
16 #include "test_arith.def" | 16 #include "test_arith.def" |
17 | 17 |
18 #include "vectors.h" | 18 #include "vectors.h" |
19 | 19 |
20 #define X(inst, op, isdiv) \ | 20 #define X(inst, op, isdiv, isshift) \ |
21 bool test##inst(bool a, bool b); \ | 21 bool test##inst(bool a, bool b); \ |
22 uint8_t test##inst(uint8_t a, uint8_t b); \ | 22 uint8_t test##inst(uint8_t a, uint8_t b); \ |
23 uint16_t test##inst(uint16_t a, uint16_t b); \ | 23 uint16_t test##inst(uint16_t a, uint16_t b); \ |
24 uint32_t test##inst(uint32_t a, uint32_t b); \ | 24 uint32_t test##inst(uint32_t a, uint32_t b); \ |
25 uint64_t test##inst(uint64_t a, uint64_t b); \ | 25 uint64_t test##inst(uint64_t a, uint64_t b); \ |
26 v4ui32 test##inst(v4ui32 a, v4ui32 b); \ | 26 v4ui32 test##inst(v4ui32 a, v4ui32 b); \ |
27 v8ui16 test##inst(v8ui16 a, v8ui16 b); \ | 27 v8ui16 test##inst(v8ui16 a, v8ui16 b); \ |
28 v16ui8 test##inst(v16ui8 a, v16ui8 b); | 28 v16ui8 test##inst(v16ui8 a, v16ui8 b); |
29 UINTOP_TABLE | 29 UINTOP_TABLE |
30 #undef X | 30 #undef X |
31 | 31 |
32 #define X(inst, op, isdiv) \ | 32 #define X(inst, op, isdiv, isshift) \ |
33 bool test##inst(bool a, bool b); \ | 33 bool test##inst(bool a, bool b); \ |
34 myint8_t test##inst(myint8_t a, myint8_t b); \ | 34 myint8_t test##inst(myint8_t a, myint8_t b); \ |
35 int16_t test##inst(int16_t a, int16_t b); \ | 35 int16_t test##inst(int16_t a, int16_t b); \ |
36 int32_t test##inst(int32_t a, int32_t b); \ | 36 int32_t test##inst(int32_t a, int32_t b); \ |
37 int64_t test##inst(int64_t a, int64_t b); \ | 37 int64_t test##inst(int64_t a, int64_t b); \ |
38 v4si32 test##inst(v4si32 a, v4si32 b); \ | 38 v4si32 test##inst(v4si32 a, v4si32 b); \ |
39 v8si16 test##inst(v8si16 a, v8si16 b); \ | 39 v8si16 test##inst(v8si16 a, v8si16 b); \ |
40 v16si8 test##inst(v16si8 a, v16si8 b); | 40 v16si8 test##inst(v16si8 a, v16si8 b); |
41 SINTOP_TABLE | 41 SINTOP_TABLE |
42 #undef X | 42 #undef X |
43 | 43 |
44 float myFrem(float a, float b); | 44 float myFrem(float a, float b); |
45 double myFrem(double a, double b); | 45 double myFrem(double a, double b); |
46 v4f32 myFrem(v4f32 a, v4f32 b); | 46 v4f32 myFrem(v4f32 a, v4f32 b); |
47 | 47 |
48 #define X(inst, op, func) \ | 48 #define X(inst, op, func) \ |
49 float test##inst(float a, float b); \ | 49 float test##inst(float a, float b); \ |
50 double test##inst(double a, double b); \ | 50 double test##inst(double a, double b); \ |
51 v4f32 test##inst(v4f32 a, v4f32 b); | 51 v4f32 test##inst(v4f32 a, v4f32 b); |
52 FPOP_TABLE | 52 FPOP_TABLE |
53 #undef X | 53 #undef X |
54 | 54 |
55 float mySqrt(float a); | 55 float mySqrt(float a); |
56 double mySqrt(double a); | 56 double mySqrt(double a); |
57 // mySqrt for v4f32 is currently unsupported. | 57 // mySqrt for v4f32 is currently unsupported. |
OLD | NEW |