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

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

Issue 817583003: Process two 32-bit digits as one 64-bit digit in all bigint intrinsics on ARM64. (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
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 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1442 __ ret(); 1442 __ ret();
1443 } 1443 }
1444 1444
1445 1445
1446 ASSEMBLER_TEST_RUN(Smulh_neg, test) { 1446 ASSEMBLER_TEST_RUN(Smulh_neg, test) {
1447 typedef int64_t (*Int64Return)() DART_UNUSED; 1447 typedef int64_t (*Int64Return)() DART_UNUSED;
1448 EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry())); 1448 EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
1449 } 1449 }
1450 1450
1451 1451
1452 ASSEMBLER_TEST_GENERATE(Umulh, assembler) {
1453 __ movz(R1, Immediate(-1), 3); // 0xffff000000000000
1454 __ movz(R2, Immediate(7), 3); // 0x0007000000000000
1455 __ umulh(R0, R1, R2); // 0x0006fff900000000
1456 __ ret();
1457 }
1458
1459
1460 ASSEMBLER_TEST_RUN(Umulh, test) {
1461 typedef int64_t (*Int64Return)() DART_UNUSED;
1462 EXPECT_EQ(static_cast<int64_t>(0x6fff900000000),
1463 EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
1464 }
1465
1466
1452 ASSEMBLER_TEST_GENERATE(Umaddl, assembler) { 1467 ASSEMBLER_TEST_GENERATE(Umaddl, assembler) {
1453 __ movn(R1, Immediate(0), 0); // W1 = 0xffffffff. 1468 __ movn(R1, Immediate(0), 0); // W1 = 0xffffffff.
1454 __ movz(R2, Immediate(7), 0); // W2 = 7. 1469 __ movz(R2, Immediate(7), 0); // W2 = 7.
1455 __ movz(R3, Immediate(8), 0); // X3 = 8. 1470 __ movz(R3, Immediate(8), 0); // X3 = 8.
1456 __ umaddl(R0, R1, R2, R3); // X0 = W1*W2 + X3 = 0x700000001. 1471 __ umaddl(R0, R1, R2, R3); // X0 = W1*W2 + X3 = 0x700000001.
1457 __ ret(); 1472 __ ret();
1458 } 1473 }
1459 1474
1460 1475
1461 ASSEMBLER_TEST_RUN(Umaddl, test) { 1476 ASSEMBLER_TEST_RUN(Umaddl, test) {
(...skipping 2118 matching lines...) Expand 10 before | Expand all | Expand 10 after
3580 3595
3581 EXPECT_EQ(-1, RANGE_OF(Bool::True().raw())); 3596 EXPECT_EQ(-1, RANGE_OF(Bool::True().raw()));
3582 3597
3583 #undef RANGE_OF 3598 #undef RANGE_OF
3584 } 3599 }
3585 3600
3586 3601
3587 } // namespace dart 3602 } // namespace dart
3588 3603
3589 #endif // defined(TARGET_ARCH_ARM64) 3604 #endif // defined(TARGET_ARCH_ARM64)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698