Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: crosstest/test_arith.h

Issue 1273153002: Subzero. Native 64-bit int arithmetic on x86-64. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fixes tests & make format Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « crosstest/stack_hack.x8664.c ('k') | crosstest/test_arith.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "xdefs.h"
17 18
18 #include "vectors.h" 19 #include "vectors.h"
19 20
20 #define X(inst, op, isdiv, isshift) \ 21 #define X(inst, op, isdiv, isshift) \
21 bool test##inst(bool a, bool b); \ 22 bool test##inst(bool a, bool b); \
22 uint8_t test##inst(uint8_t a, uint8_t b); \ 23 uint8_t test##inst(uint8_t a, uint8_t b); \
23 uint16_t test##inst(uint16_t a, uint16_t b); \ 24 uint16_t test##inst(uint16_t a, uint16_t b); \
24 uint32_t test##inst(uint32_t a, uint32_t b); \ 25 uint32_t test##inst(uint32_t a, uint32_t b); \
25 uint64_t test##inst(uint64_t a, uint64_t b); \ 26 uint64 test##inst(uint64 a, uint64 b); \
26 v4ui32 test##inst(v4ui32 a, v4ui32 b); \ 27 v4ui32 test##inst(v4ui32 a, v4ui32 b); \
27 v8ui16 test##inst(v8ui16 a, v8ui16 b); \ 28 v8ui16 test##inst(v8ui16 a, v8ui16 b); \
28 v16ui8 test##inst(v16ui8 a, v16ui8 b); 29 v16ui8 test##inst(v16ui8 a, v16ui8 b);
29 UINTOP_TABLE 30 UINTOP_TABLE
30 #undef X 31 #undef X
31 32
32 #define X(inst, op, isdiv, isshift) \ 33 #define X(inst, op, isdiv, isshift) \
33 bool test##inst(bool a, bool b); \ 34 bool test##inst(bool a, bool b); \
34 myint8_t test##inst(myint8_t a, myint8_t b); \ 35 myint8_t test##inst(myint8_t a, myint8_t b); \
35 int16_t test##inst(int16_t a, int16_t b); \ 36 int16_t test##inst(int16_t a, int16_t b); \
36 int32_t test##inst(int32_t a, int32_t b); \ 37 int32_t test##inst(int32_t a, int32_t b); \
37 int64_t test##inst(int64_t a, int64_t b); \ 38 int64 test##inst(int64 a, int64 b); \
38 v4si32 test##inst(v4si32 a, v4si32 b); \ 39 v4si32 test##inst(v4si32 a, v4si32 b); \
39 v8si16 test##inst(v8si16 a, v8si16 b); \ 40 v8si16 test##inst(v8si16 a, v8si16 b); \
40 v16si8 test##inst(v16si8 a, v16si8 b); 41 v16si8 test##inst(v16si8 a, v16si8 b);
41 SINTOP_TABLE 42 SINTOP_TABLE
42 #undef X 43 #undef X
43 44
44 float myFrem(float a, float b); 45 float myFrem(float a, float b);
45 double myFrem(double a, double b); 46 double myFrem(double a, double b);
46 v4f32 myFrem(v4f32 a, v4f32 b); 47 v4f32 myFrem(v4f32 a, v4f32 b);
47 48
48 #define X(inst, op, func) \ 49 #define X(inst, op, func) \
49 float test##inst(float a, float b); \ 50 float test##inst(float a, float b); \
50 double test##inst(double a, double b); \ 51 double test##inst(double a, double b); \
51 v4f32 test##inst(v4f32 a, v4f32 b); 52 v4f32 test##inst(v4f32 a, v4f32 b);
52 FPOP_TABLE 53 FPOP_TABLE
53 #undef X 54 #undef X
54 55
55 float mySqrt(float a); 56 float mySqrt(float a);
56 double mySqrt(double a); 57 double mySqrt(double a);
57 // mySqrt for v4f32 is currently unsupported. 58 // mySqrt for v4f32 is currently unsupported.
58 59
59 float myFabs(float a); 60 float myFabs(float a);
60 double myFabs(double a); 61 double myFabs(double a);
61 v4f32 myFabs(v4f32 a); 62 v4f32 myFabs(v4f32 a);
OLDNEW
« no previous file with comments | « crosstest/stack_hack.x8664.c ('k') | crosstest/test_arith.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698