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

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

Issue 791953003: Fix MIPS assembler test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after
1633 1633
1634 ASSEMBLER_TEST_RUN(Movd, test) { 1634 ASSEMBLER_TEST_RUN(Movd, test) {
1635 typedef double (*SimpleCode)() DART_UNUSED; 1635 typedef double (*SimpleCode)() DART_UNUSED;
1636 EXPECT(test != NULL); 1636 EXPECT(test != NULL);
1637 double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()); 1637 double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry());
1638 EXPECT_FLOAT_EQ(1.0, res, 0.001); 1638 EXPECT_FLOAT_EQ(1.0, res, 0.001);
1639 } 1639 }
1640 1640
1641 1641
1642 ASSEMBLER_TEST_GENERATE(Sdc1Ldc1, assembler) { 1642 ASSEMBLER_TEST_GENERATE(Sdc1Ldc1, assembler) {
1643 __ AddImmediate(SP, -8 * kWordSize); 1643 __ AddImmediate(SP, -8 * kWordSize);
regis 2015/01/09 17:16:02 Why 8*kWordSize? A double is 2*kWordSize, alignmen
1644 __ LoadImmediate(T1, ~(8 - 1)); 1644 __ LoadImmediate(T1, ~(8 - 1));
1645 __ and_(T0, SP, T1); // Need 8 byte alignment. 1645 __ and_(T0, SP, T1); // Need 8 byte alignment.
1646 __ AddImmediate(T0, T0, 2 * kWordSize);
regis 2015/01/09 17:16:02 This may work with 8*kWordSize above, but this is
1646 __ LoadImmediate(D1, 1.0); 1647 __ LoadImmediate(D1, 1.0);
1647 __ sdc1(D1, Address(T0)); 1648 __ sdc1(D1, Address(T0));
1648 __ ldc1(D0, Address(T0)); 1649 __ ldc1(D0, Address(T0));
1650 __ AddImmediate(SP, 8 * kWordSize);
regis 2015/01/09 17:16:02 3*kWordSize? It is only a test and efficiency is
zra 2015/01/09 17:49:28 Changed to something like this.
1649 __ Ret(); 1651 __ Ret();
1650 } 1652 }
1651 1653
1652 1654
1653 ASSEMBLER_TEST_RUN(Sdc1Ldc1, test) { 1655 ASSEMBLER_TEST_RUN(Sdc1Ldc1, test) {
1654 typedef double (*SimpleCode)() DART_UNUSED; 1656 typedef double (*SimpleCode)() DART_UNUSED;
1655 EXPECT(test != NULL); 1657 EXPECT(test != NULL);
1656 double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()); 1658 double res = EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry());
1657 EXPECT_FLOAT_EQ(1.0, res, 0.001); 1659 EXPECT_FLOAT_EQ(1.0, res, 0.001);
1658 } 1660 }
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
2148 2150
2149 EXPECT_EQ(-1, RANGE_OF(Bool::True().raw())); 2151 EXPECT_EQ(-1, RANGE_OF(Bool::True().raw()));
2150 2152
2151 #undef RANGE_OF 2153 #undef RANGE_OF
2152 } 2154 }
2153 2155
2154 2156
2155 } // namespace dart 2157 } // namespace dart
2156 2158
2157 #endif // defined TARGET_ARCH_MIPS 2159 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698