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

Side by Side Diff: crosstest/test_arith.h

Issue 407543003: Factor out common vector crosstesting code. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Add missing include guard #endif comment Created 6 years, 5 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 | « no previous file | crosstest/test_arith_main.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++ -*-===//
2 //
3 // The Subzero Code Generator
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the function prototypes used for crosstesting arithmetic
11 // operations.
12 //
13 //===----------------------------------------------------------------------===//
14
1 #include <stdint.h> 15 #include <stdint.h>
2 #include "test_arith.def" 16 #include "test_arith.def"
3 17
4 // Vector types 18 #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 19
13 #define X(inst, op, isdiv) \ 20 #define X(inst, op, isdiv) \
14 bool test##inst(bool a, bool b); \ 21 bool test##inst(bool a, bool b); \
15 uint8_t test##inst(uint8_t a, uint8_t b); \ 22 uint8_t test##inst(uint8_t a, uint8_t b); \
16 uint16_t test##inst(uint16_t a, uint16_t b); \ 23 uint16_t test##inst(uint16_t a, uint16_t b); \
17 uint32_t test##inst(uint32_t a, uint32_t b); \ 24 uint32_t test##inst(uint32_t a, uint32_t b); \
18 uint64_t test##inst(uint64_t a, uint64_t b); \ 25 uint64_t test##inst(uint64_t a, uint64_t b); \
19 v4ui32 test##inst(v4ui32 a, v4ui32 b); \ 26 v4ui32 test##inst(v4ui32 a, v4ui32 b); \
20 v8ui16 test##inst(v8ui16 a, v8ui16 b); \ 27 v8ui16 test##inst(v8ui16 a, v8ui16 b); \
21 v16ui8 test##inst(v16ui8 a, v16ui8 b); 28 v16ui8 test##inst(v16ui8 a, v16ui8 b);
(...skipping 19 matching lines...) Expand all
41 #define X(inst, op, func) \ 48 #define X(inst, op, func) \
42 float test##inst(float a, float b); \ 49 float test##inst(float a, float b); \
43 double test##inst(double a, double b); \ 50 double test##inst(double a, double b); \
44 v4f32 test##inst(v4f32 a, v4f32 b); 51 v4f32 test##inst(v4f32 a, v4f32 b);
45 FPOP_TABLE 52 FPOP_TABLE
46 #undef X 53 #undef X
47 54
48 float mySqrt(float a); 55 float mySqrt(float a);
49 double mySqrt(double a); 56 double mySqrt(double a);
50 // mySqrt for v4f32 is currently unsupported. 57 // mySqrt for v4f32 is currently unsupported.
OLDNEW
« no previous file with comments | « no previous file | crosstest/test_arith_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698