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

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
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));
regis 2012/05/24 23:31:29 You are not testing the newly added (Address, Regi
srdjan 2012/05/24 23:54:13 Added test.
1221 // TOS: 7
1222 __ popq(RAX);
1223 __ ret();
1224 }
1225
1226
1227 ASSEMBLER_TEST_RUN(TestAdds, entry) {
1228 typedef int (*TestAdds)();
1229 int res = reinterpret_cast<TestAdds>(entry)();
1230 EXPECT_EQ(7, res);
1231 }
1232
1233
1214 } // namespace dart 1234 } // namespace dart
1215 1235
1216 #endif // defined TARGET_ARCH_X64 1236 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698