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

Side by Side Diff: crosstest/test_arith.def

Issue 443203003: Subzero: Use scalar arithmetic when no vector instruction exists. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: TODO(stichnot) Created 6 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/test_arith.cpp ('k') | 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.def - macros for tests ----*- C++ -*---===// 1 //===- subzero/crosstest/test_arith.def - macros for tests ----*- 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 defines macros for crosstesting arithmetic operations. 10 // This file defines macros for crosstesting arithmetic operations.
11 // 11 //
12 //===----------------------------------------------------------------------===// 12 //===----------------------------------------------------------------------===//
13 13
14 #ifndef TEST_ARITH_DEF 14 #ifndef TEST_ARITH_DEF
15 #define TEST_ARITH_DEF 15 #define TEST_ARITH_DEF
16 16
17 #define XSTR(s) STR(s) 17 #define XSTR(s) STR(s)
18 #define STR(s) #s 18 #define STR(s) #s
19 19
20 #define UINTOP_TABLE \ 20 #define UINTOP_TABLE \
21 /* inst, operator, div */ \ 21 /* inst, operator, div, shift */ \
22 X(Add, +, 0 ) \ 22 X(Add, +, 0, 0) \
23 X(Sub, -, 0 ) \ 23 X(Sub, -, 0, 0) \
24 X(Mul, *, 0 ) \ 24 X(Mul, *, 0, 0) \
25 X(Udiv, /, 1 ) \ 25 X(Udiv, /, 1, 0) \
26 X(Urem, %, 1 ) \ 26 X(Urem, %, 1, 0) \
27 X(Shl, <<, 0) \ 27 X(Shl, <<, 0, 1) \
28 X(Lshr, >>, 0) \ 28 X(Lshr, >>, 0, 1) \
29 X(And, &, 0 ) \ 29 X(And, &, 0, 0) \
30 X(Or, |, 0 ) \ 30 X(Or, |, 0, 0) \
31 X(Xor, ^, 0 ) \ 31 X(Xor, ^, 0, 0) \
32 //#define X(inst, op, isdiv) 32 //#define X(inst, op, isdiv, isshift)
33 33
34 #define SINTOP_TABLE \ 34 #define SINTOP_TABLE \
35 /* inst, operator, div */ \ 35 /* inst, operator, div, shift */ \
36 X(Sdiv, /, 1) \ 36 X(Sdiv, /, 1, 0) \
37 X(Srem, %, 1) \ 37 X(Srem, %, 1, 0) \
38 X(Ashr, >>, 0) \ 38 X(Ashr, >>, 0, 1) \
39 //#define X(inst, op, isdiv) 39 //#define X(inst, op, isdiv, isshift)
40 40
41 #define COMMA , 41 #define COMMA ,
42 #define FPOP_TABLE \ 42 #define FPOP_TABLE \
43 /* inst, infix_op, func */ \ 43 /* inst, infix_op, func */ \
44 X(Fadd, +, ) \ 44 X(Fadd, +, ) \
45 X(Fsub, -, ) \ 45 X(Fsub, -, ) \
46 X(Fmul, *, ) \ 46 X(Fmul, *, ) \
47 X(Fdiv, /, ) \ 47 X(Fdiv, /, ) \
48 X(Frem, COMMA, myFrem) \ 48 X(Frem, COMMA, myFrem) \
49 //#define X(inst, op, func) 49 //#define X(inst, op, func)
50 50
51 // Note: The above definition of COMMA, plus the "func" argument to 51 // Note: The above definition of COMMA, plus the "func" argument to
52 // the X macro, are because C++ does not allow the % operator on 52 // the X macro, are because C++ does not allow the % operator on
(...skipping 19 matching lines...) Expand all
72 0x7fffffff, 0x80000000, 0x80000001, \ 72 0x7fffffff, 0x80000000, 0x80000001, \
73 0xfffffffe, 0xffffffff, 0x100000000ll, \ 73 0xfffffffe, 0xffffffff, 0x100000000ll, \
74 0x100000001ll, 0x7ffffffffffffffell, 0x7fffffffffffffffll, \ 74 0x100000001ll, 0x7ffffffffffffffell, 0x7fffffffffffffffll, \
75 0x8000000000000000ll, 0x8000000000000001ll, 0xfffffffffffffffell, \ 75 0x8000000000000000ll, 0x8000000000000001ll, 0xfffffffffffffffell, \
76 0xffffffffffffffffll, NegInf, PosInf, \ 76 0xffffffffffffffffll, NegInf, PosInf, \
77 Nan, NegNan, -0.0, \ 77 Nan, NegNan, -0.0, \
78 FLT_MIN, FLT_MAX, DBL_MIN, \ 78 FLT_MIN, FLT_MAX, DBL_MIN, \
79 DBL_MAX } 79 DBL_MAX }
80 80
81 #endif // TEST_ARITH_DEF 81 #endif // TEST_ARITH_DEF
OLDNEW
« no previous file with comments | « crosstest/test_arith.cpp ('k') | crosstest/test_arith_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698