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

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

Issue 236173002: Adds more arithmetic ops to arm64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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_test.cc ('k') | runtime/vm/constants_arm64.h » ('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_ARM) 6 #if defined(TARGET_ARCH_ARM)
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 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 EXPECT(test != NULL); 1523 EXPECT(test != NULL);
1524 typedef int (*Tst)(); 1524 typedef int (*Tst)();
1525 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry())); 1525 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1526 } 1526 }
1527 1527
1528 1528
1529 ASSEMBLER_TEST_GENERATE(Sdiv_zero, assembler) { 1529 ASSEMBLER_TEST_GENERATE(Sdiv_zero, assembler) {
1530 if (TargetCPUFeatures::integer_division_supported()) { 1530 if (TargetCPUFeatures::integer_division_supported()) {
1531 __ mov(R0, ShifterOperand(27)); 1531 __ mov(R0, ShifterOperand(27));
1532 __ mov(R1, ShifterOperand(0)); 1532 __ mov(R1, ShifterOperand(0));
1533 __ udiv(R2, R0, R1); 1533 __ sdiv(R2, R0, R1);
1534 __ mov(R0, ShifterOperand(R2)); 1534 __ mov(R0, ShifterOperand(R2));
1535 } else { 1535 } else {
1536 __ LoadImmediate(R0, 0); 1536 __ LoadImmediate(R0, 0);
1537 } 1537 }
1538 __ bx(LR); 1538 __ bx(LR);
1539 } 1539 }
1540 1540
1541 1541
1542 ASSEMBLER_TEST_RUN(Sdiv_zero, test) { 1542 ASSEMBLER_TEST_RUN(Sdiv_zero, test) {
1543 EXPECT(test != NULL); 1543 EXPECT(test != NULL);
(...skipping 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after
3797 __ StoreIntoObject(R2, 3797 __ StoreIntoObject(R2,
3798 FieldAddress(R2, GrowableObjectArray::data_offset()), 3798 FieldAddress(R2, GrowableObjectArray::data_offset()),
3799 R1); 3799 R1);
3800 __ PopList((1 << CTX) | (1 << LR)); 3800 __ PopList((1 << CTX) | (1 << LR));
3801 __ Ret(); 3801 __ Ret();
3802 } 3802 }
3803 3803
3804 } // namespace dart 3804 } // namespace dart
3805 3805
3806 #endif // defined TARGET_ARCH_ARM 3806 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64_test.cc ('k') | runtime/vm/constants_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698