OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1646 test.f = inputsf[i]; | 1646 test.f = inputsf[i]; |
1647 | 1647 |
1648 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); | 1648 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); |
1649 | 1649 |
1650 if (i < kTableLength - 1) { | 1650 if (i < kTableLength - 1) { |
1651 CHECK_EQ(test.c, outputsdmin[i]); | 1651 CHECK_EQ(test.c, outputsdmin[i]); |
1652 CHECK_EQ(test.d, outputsdmax[i]); | 1652 CHECK_EQ(test.d, outputsdmax[i]); |
1653 CHECK_EQ(test.g, outputsfmin[i]); | 1653 CHECK_EQ(test.g, outputsfmin[i]); |
1654 CHECK_EQ(test.h, outputsfmax[i]); | 1654 CHECK_EQ(test.h, outputsfmax[i]); |
1655 } else { | 1655 } else { |
1656 DCHECK(std::isnan(test.c)); | 1656 CHECK(std::isnan(test.c)); |
1657 DCHECK(std::isnan(test.d)); | 1657 CHECK(std::isnan(test.d)); |
1658 DCHECK(std::isnan(test.g)); | 1658 CHECK(std::isnan(test.g)); |
1659 DCHECK(std::isnan(test.h)); | 1659 CHECK(std::isnan(test.h)); |
1660 } | 1660 } |
1661 } | 1661 } |
1662 } | 1662 } |
1663 } | 1663 } |
1664 | 1664 |
1665 | 1665 |
1666 TEST(rint_d) { | 1666 TEST(rint_d) { |
1667 if (kArchVariant == kMips64r6) { | 1667 if (kArchVariant == kMips64r6) { |
1668 const int kTableLength = 30; | 1668 const int kTableLength = 30; |
1669 CcTest::InitializeVM(); | 1669 CcTest::InitializeVM(); |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2031 test.c = inputsc[i]; | 2031 test.c = inputsc[i]; |
2032 test.d = inputsd[i]; | 2032 test.d = inputsd[i]; |
2033 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); | 2033 (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0)); |
2034 | 2034 |
2035 if (i < kTableLength - 1) { | 2035 if (i < kTableLength - 1) { |
2036 CHECK_EQ(test.resd, resd[i]); | 2036 CHECK_EQ(test.resd, resd[i]); |
2037 CHECK_EQ(test.resf, resf[i]); | 2037 CHECK_EQ(test.resf, resf[i]); |
2038 CHECK_EQ(test.resd1, resd1[i]); | 2038 CHECK_EQ(test.resd1, resd1[i]); |
2039 CHECK_EQ(test.resf1, resf1[i]); | 2039 CHECK_EQ(test.resf1, resf1[i]); |
2040 } else { | 2040 } else { |
2041 DCHECK(std::isnan(test.resd)); | 2041 CHECK(std::isnan(test.resd)); |
2042 DCHECK(std::isnan(test.resf)); | 2042 CHECK(std::isnan(test.resf)); |
2043 DCHECK(std::isnan(test.resd1)); | 2043 CHECK(std::isnan(test.resd1)); |
2044 DCHECK(std::isnan(test.resf1)); | 2044 CHECK(std::isnan(test.resf1)); |
2045 } | 2045 } |
2046 } | 2046 } |
2047 } | 2047 } |
2048 } | 2048 } |
2049 | 2049 |
2050 | 2050 |
2051 | 2051 |
2052 // ----------------------mips64r2 specific tests---------------------- | 2052 // ----------------------mips64r2 specific tests---------------------- |
2053 TEST(trunc_l) { | 2053 TEST(trunc_l) { |
2054 if (kArchVariant == kMips64r2) { | 2054 if (kArchVariant == kMips64r2) { |
(...skipping 3773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5828 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 5828 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
5829 F2 f = FUNCTION_CAST<F2>(code->entry()); | 5829 F2 f = FUNCTION_CAST<F2>(code->entry()); |
5830 | 5830 |
5831 int64_t res = reinterpret_cast<int64_t>( | 5831 int64_t res = reinterpret_cast<int64_t>( |
5832 CALL_GENERATED_CODE(isolate, f, 42, 42, 0, 0, 0)); | 5832 CALL_GENERATED_CODE(isolate, f, 42, 42, 0, 0, 0)); |
5833 CHECK_EQ(res, 0); | 5833 CHECK_EQ(res, 0); |
5834 } | 5834 } |
5835 | 5835 |
5836 | 5836 |
5837 #undef __ | 5837 #undef __ |
OLD | NEW |