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

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

Issue 10451026: More intrinsification x64: array index load and store. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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_x64.cc ('k') | runtime/vm/intrinsifier_x64.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/os.h" 9 #include "vm/os.h"
10 #include "vm/unit_test.h" 10 #include "vm/unit_test.h"
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 __ ret(); 1204 __ ret();
1205 } 1205 }
1206 1206
1207 1207
1208 ASSEMBLER_TEST_RUN(TestAlignLarge, entry) { 1208 ASSEMBLER_TEST_RUN(TestAlignLarge, entry) {
1209 typedef int (*TestAlignLarge)(); 1209 typedef int (*TestAlignLarge)();
1210 int res = reinterpret_cast<TestAlignLarge>(entry)(); 1210 int res = reinterpret_cast<TestAlignLarge>(entry)();
1211 EXPECT_EQ(16, res); // 16 bytes emitted. 1211 EXPECT_EQ(16, res); // 16 bytes emitted.
1212 } 1212 }
1213 1213
1214
1215 ASSEMBLER_TEST_GENERATE(TestAdds, assembler) {
1216 __ movq(RAX, Immediate(4));
1217 __ pushq(RAX);
1218 __ addq(Address(RSP, 0), Immediate(5));
1219 // TOS: 9
1220 __ addq(Address(RSP, 0), Immediate(-2));
1221 // TOS: 7
1222 __ movq(RCX, Immediate(3));
1223 __ addq(Address(RSP, 0), RCX);
1224 // TOS: 10
1225 __ popq(RAX);
1226 __ ret();
1227 }
1228
1229
1230 ASSEMBLER_TEST_RUN(TestAdds, entry) {
1231 typedef int (*TestAdds)();
1232 int res = reinterpret_cast<TestAdds>(entry)();
1233 EXPECT_EQ(10, res);
1234 }
1235
1236
1214 } // namespace dart 1237 } // namespace dart
1215 1238
1216 #endif // defined TARGET_ARCH_X64 1239 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698