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

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

Issue 267283004: Adds unary double operations to ARM64, enables many tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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/vm/assembler_arm64.h ('k') | runtime/vm/code_generator.cc » ('j') | 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_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
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 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 __ ret(); 1570 __ ret();
1571 } 1571 }
1572 1572
1573 1573
1574 ASSEMBLER_TEST_RUN(Scvtfd, test) { 1574 ASSEMBLER_TEST_RUN(Scvtfd, test) {
1575 typedef int (*SimpleCode)(); 1575 typedef int (*SimpleCode)();
1576 EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry())); 1576 EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
1577 } 1577 }
1578 1578
1579 1579
1580 ASSEMBLER_TEST_GENERATE(FabsdPos, assembler) {
1581 __ LoadDImmediate(V1, 42.0, kNoPP);
1582 __ fabsd(V0, V1);
1583 __ ret();
1584 }
1585
1586
1587 ASSEMBLER_TEST_RUN(FabsdPos, test) {
1588 typedef int (*SimpleCode)();
1589 EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
1590 }
1591
1592
1593 ASSEMBLER_TEST_GENERATE(FabsdNeg, assembler) {
1594 __ LoadDImmediate(V1, -42.0, kNoPP);
1595 __ fabsd(V0, V1);
1596 __ ret();
1597 }
1598
1599
1600 ASSEMBLER_TEST_RUN(FabsdNeg, test) {
1601 typedef int (*SimpleCode)();
1602 EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
1603 }
1604
1605
1606 ASSEMBLER_TEST_GENERATE(FnegdPos, assembler) {
1607 __ LoadDImmediate(V1, 42.0, kNoPP);
1608 __ fnegd(V0, V1);
1609 __ ret();
1610 }
1611
1612
1613 ASSEMBLER_TEST_RUN(FnegdPos, test) {
1614 typedef int (*SimpleCode)();
1615 EXPECT_EQ(-42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
1616 }
1617
1618
1619 ASSEMBLER_TEST_GENERATE(FnegdNeg, assembler) {
1620 __ LoadDImmediate(V1, -42.0, kNoPP);
1621 __ fnegd(V0, V1);
1622 __ ret();
1623 }
1624
1625
1626 ASSEMBLER_TEST_RUN(FnegdNeg, test) {
1627 typedef int (*SimpleCode)();
1628 EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
1629 }
1630
1631
1632 ASSEMBLER_TEST_GENERATE(Fsqrtd, assembler) {
1633 __ LoadDImmediate(V1, 64.0, kNoPP);
1634 __ fsqrtd(V0, V1);
1635 __ ret();
1636 }
1637
1638
1639 ASSEMBLER_TEST_RUN(Fsqrtd, test) {
1640 typedef int (*SimpleCode)();
1641 EXPECT_EQ(8.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
1642 }
1643
1644
1580 ASSEMBLER_TEST_GENERATE(Fmuld, assembler) { 1645 ASSEMBLER_TEST_GENERATE(Fmuld, assembler) {
1581 __ LoadDImmediate(V1, 84.0, kNoPP); 1646 __ LoadDImmediate(V1, 84.0, kNoPP);
1582 __ LoadDImmediate(V2, 0.5, kNoPP); 1647 __ LoadDImmediate(V2, 0.5, kNoPP);
1583 __ fmuld(V0, V1, V2); 1648 __ fmuld(V0, V1, V2);
1584 __ ret(); 1649 __ ret();
1585 } 1650 }
1586 1651
1587 1652
1588 ASSEMBLER_TEST_RUN(Fmuld, test) { 1653 ASSEMBLER_TEST_RUN(Fmuld, test) {
1589 typedef int (*SimpleCode)(); 1654 typedef int (*SimpleCode)();
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 R1); 1808 R1);
1744 __ Pop(LR); 1809 __ Pop(LR);
1745 __ Pop(CTX); 1810 __ Pop(CTX);
1746 __ PopAndUntagPP(); 1811 __ PopAndUntagPP();
1747 __ ret(); 1812 __ ret();
1748 } 1813 }
1749 1814
1750 } // namespace dart 1815 } // namespace dart
1751 1816
1752 #endif // defined(TARGET_ARCH_ARM64) 1817 #endif // defined(TARGET_ARCH_ARM64)
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698