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

Side by Side Diff: runtime/vm/assembler_mips_test.cc

Issue 353403004: Fixes Android build by using C++ math header instead of C one. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/os.h" 10 #include "vm/os.h"
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 __ mtc1(T0, F3); // Load lower bits of NaN. 1632 __ mtc1(T0, F3); // Load lower bits of NaN.
1633 __ addd(D0, D0, D1); 1633 __ addd(D0, D0, D1);
1634 __ Ret(); 1634 __ Ret();
1635 } 1635 }
1636 1636
1637 1637
1638 ASSEMBLER_TEST_RUN(Addd_NaN, test) { 1638 ASSEMBLER_TEST_RUN(Addd_NaN, test) {
1639 typedef double (*SimpleCode)() DART_UNUSED; 1639 typedef double (*SimpleCode)() DART_UNUSED;
1640 EXPECT(test != NULL); 1640 EXPECT(test != NULL);
1641 double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()); 1641 double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry());
1642 EXPECT_EQ(isnan(res), true); 1642 EXPECT_EQ(std::isnan(res), true);
1643 } 1643 }
1644 1644
1645 1645
1646 ASSEMBLER_TEST_GENERATE(Addd_Inf, assembler) { 1646 ASSEMBLER_TEST_GENERATE(Addd_Inf, assembler) {
1647 __ LoadImmediate(D0, 1.0); 1647 __ LoadImmediate(D0, 1.0);
1648 __ LoadImmediate(T0, 0x7FF00000); // +inf 1648 __ LoadImmediate(T0, 0x7FF00000); // +inf
1649 __ mtc1(ZR, F2); 1649 __ mtc1(ZR, F2);
1650 __ mtc1(T0, F3); 1650 __ mtc1(T0, F3);
1651 __ addd(D0, D0, D1); 1651 __ addd(D0, D0, D1);
1652 __ Ret(); 1652 __ Ret();
1653 } 1653 }
1654 1654
1655 1655
1656 ASSEMBLER_TEST_RUN(Addd_Inf, test) { 1656 ASSEMBLER_TEST_RUN(Addd_Inf, test) {
1657 typedef double (*SimpleCode)() DART_UNUSED; 1657 typedef double (*SimpleCode)() DART_UNUSED;
1658 EXPECT(test != NULL); 1658 EXPECT(test != NULL);
1659 double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()); 1659 double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry());
1660 EXPECT_EQ(isfinite(res), false); 1660 EXPECT_EQ(std::isfinite(res), false);
1661 } 1661 }
1662 1662
1663 1663
1664 ASSEMBLER_TEST_GENERATE(Subd, assembler) { 1664 ASSEMBLER_TEST_GENERATE(Subd, assembler) {
1665 __ LoadImmediate(D0, 2.5); 1665 __ LoadImmediate(D0, 2.5);
1666 __ LoadImmediate(D1, 1.5); 1666 __ LoadImmediate(D1, 1.5);
1667 __ subd(D0, D0, D1); 1667 __ subd(D0, D0, D1);
1668 __ Ret(); 1668 __ Ret();
1669 } 1669 }
1670 1670
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
2062 A1); 2062 A1);
2063 __ lw(RA, Address(SP, 0 * kWordSize)); 2063 __ lw(RA, Address(SP, 0 * kWordSize));
2064 __ lw(CTX, Address(SP, 1 * kWordSize)); 2064 __ lw(CTX, Address(SP, 1 * kWordSize));
2065 __ addiu(SP, SP, Immediate(2 * kWordSize)); 2065 __ addiu(SP, SP, Immediate(2 * kWordSize));
2066 __ Ret(); 2066 __ Ret();
2067 } 2067 }
2068 2068
2069 } // namespace dart 2069 } // namespace dart
2070 2070
2071 #endif // defined TARGET_ARCH_MIPS 2071 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698