| OLD | NEW |
| 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. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 53 // floating-point primitive types. To work around this, the expansion | 53 // floating-point primitive types. To work around this, the expansion |
| 54 // is "func(a infix_op b)", which becomes "myFrem(a , b)" for the Frem | 54 // is "func(a infix_op b)", which becomes "myFrem(a , b)" for the Frem |
| 55 // instruction and "(a + b)" for the Fadd instruction. The two | 55 // instruction and "(a + b)" for the Fadd instruction. The two |
| 56 // versions of myFrem() are defined in a separate bitcode file. | 56 // versions of myFrem() are defined in a separate bitcode file. |
| 57 | 57 |
| 58 #define INT_VALUE_ARRAY \ | 58 #define INT_VALUE_ARRAY \ |
| 59 { 0x0, 0x1, 0x7ffffffe, 0x7fffffff, \ | 59 { 0x0, 0x1, 0x7ffffffe, 0x7fffffff, \ |
| 60 0x80000000, 0x80000001, 0xfffffffe, 0xffffffff, \ | 60 0x80000000, 0x80000001, 0xfffffffe, 0xffffffff, \ |
| 61 0x1e, 0x1f, 0x20, 0x21, 0x3e, 0x3f, 0x40, 0x41, \ |
| 61 0x7e, 0x7f, 0x80, 0x81, \ | 62 0x7e, 0x7f, 0x80, 0x81, \ |
| 62 0xfe, 0xff, 0x100, 0x101, \ | 63 0xfe, 0xff, 0x100, 0x101, \ |
| 63 0x7ffe, 0x7fff, 0x8000, 0x8001, \ | 64 0x7ffe, 0x7fff, 0x8000, 0x8001, \ |
| 64 0xfffe, 0xffff, 0x10000, 0x10001 } | 65 0xfffe, 0xffff, 0x10000, 0x10001 } |
| 65 | 66 |
| 66 #define FP_VALUE_ARRAY(NegInf, PosInf, NegNan, NaN) \ | 67 #define FP_VALUE_ARRAY(NegInf, PosInf, NegNan, NaN) \ |
| 67 { 0, 1, 1.4, \ | 68 { 0, 1, 1.4, \ |
| 68 1.5, 1.6, -1.4, \ | 69 1.5, 1.6, -1.4, \ |
| 69 -1.5, -1.6, 0x7e, \ | 70 -1.5, -1.6, 0x7e, \ |
| 70 0x7f, 0x80, 0x81, \ | 71 0x7f, 0x80, 0x81, \ |
| 71 0xfe, 0xff, 0x7ffe, \ | 72 0xfe, 0xff, 0x7ffe, \ |
| 72 0x7fff, 0x8000, 0x8001, \ | 73 0x7fff, 0x8000, 0x8001, \ |
| 73 0xfffe, 0xffff, 0x7ffffffe, \ | 74 0xfffe, 0xffff, 0x7ffffffe, \ |
| 74 0x7fffffff, 0x80000000, 0x80000001, \ | 75 0x7fffffff, 0x80000000, 0x80000001, \ |
| 75 0xfffffffe, 0xffffffff, 0x100000000ll, \ | 76 0xfffffffe, 0xffffffff, 0x100000000ll, \ |
| 76 0x100000001ll, 0x7ffffffffffffffell, 0x7fffffffffffffffll, \ | 77 0x100000001ll, 0x7ffffffffffffffell, 0x7fffffffffffffffll, \ |
| 77 0x8000000000000000ll, 0x8000000000000001ll, 0xfffffffffffffffell, \ | 78 0x8000000000000000ll, 0x8000000000000001ll, 0xfffffffffffffffell, \ |
| 78 0xffffffffffffffffll, NegInf, PosInf, \ | 79 0xffffffffffffffffll, NegInf, PosInf, \ |
| 79 Nan, NegNan, -0.0, \ | 80 Nan, NegNan, -0.0, \ |
| 80 10.0, FLT_MIN, FLT_MAX, \ | 81 10.0, FLT_MIN, FLT_MAX, \ |
| 81 DBL_MIN, DBL_MAX } | 82 DBL_MIN, DBL_MAX } |
| 82 | 83 |
| 83 #endif // TEST_ARITH_DEF | 84 #endif // TEST_ARITH_DEF |
| OLD | NEW |