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

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

Issue 263243002: Enables many language tests for arm64. (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.cc ('k') | runtime/vm/code_patcher_arm64.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 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 __ ret(); 1058 __ ret();
1059 } 1059 }
1060 1060
1061 1061
1062 ASSEMBLER_TEST_RUN(Mult_neg, test) { 1062 ASSEMBLER_TEST_RUN(Mult_neg, test) {
1063 typedef int (*SimpleCode)(); 1063 typedef int (*SimpleCode)();
1064 EXPECT_EQ(-42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry())); 1064 EXPECT_EQ(-42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
1065 } 1065 }
1066 1066
1067 1067
1068 ASSEMBLER_TEST_GENERATE(Smulh_pos, assembler) {
1069 __ movz(R1, 6, 0);
1070 __ movz(R2, 7, 0);
1071 __ smulh(R0, R1, R2);
1072 __ ret();
1073 }
1074
1075
1076 ASSEMBLER_TEST_RUN(Smulh_pos, test) {
1077 typedef int (*SimpleCode)();
1078 EXPECT_EQ(0, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
1079 }
1080
1081
1082 ASSEMBLER_TEST_GENERATE(Smulh_neg, assembler) {
1083 __ movz(R1, 6, 0);
1084 __ movz(R2, 7, 0);
1085 __ neg(R2, R2);
1086 __ smulh(R0, R1, R2);
1087 __ ret();
1088 }
1089
1090
1091 ASSEMBLER_TEST_RUN(Smulh_neg, test) {
1092 typedef int (*SimpleCode)();
1093 EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
1094 }
1095
1096
1068 // Loading immediate values without the object pool. 1097 // Loading immediate values without the object pool.
1069 ASSEMBLER_TEST_GENERATE(LoadImmediateSmall, assembler) { 1098 ASSEMBLER_TEST_GENERATE(LoadImmediateSmall, assembler) {
1070 __ LoadImmediate(R0, 42, kNoRegister); 1099 __ LoadImmediate(R0, 42, kNoRegister);
1071 __ ret(); 1100 __ ret();
1072 } 1101 }
1073 1102
1074 1103
1075 ASSEMBLER_TEST_RUN(LoadImmediateSmall, test) { 1104 ASSEMBLER_TEST_RUN(LoadImmediateSmall, test) {
1076 typedef int (*SimpleCode)(); 1105 typedef int (*SimpleCode)();
1077 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry())); 1106 EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1494 R1); 1523 R1);
1495 __ Pop(LR); 1524 __ Pop(LR);
1496 __ Pop(CTX); 1525 __ Pop(CTX);
1497 __ PopAndUntagPP(); 1526 __ PopAndUntagPP();
1498 __ ret(); 1527 __ ret();
1499 } 1528 }
1500 1529
1501 } // namespace dart 1530 } // namespace dart
1502 1531
1503 #endif // defined(TARGET_ARCH_ARM64) 1532 #endif // defined(TARGET_ARCH_ARM64)
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64.cc ('k') | runtime/vm/code_patcher_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698