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

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

Issue 10440099: Adding unary op optimizations. missing assembly operations/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 } 1227 }
1228 1228
1229 1229
1230 ASSEMBLER_TEST_RUN(TestAdds, entry) { 1230 ASSEMBLER_TEST_RUN(TestAdds, entry) {
1231 typedef int (*TestAdds)(); 1231 typedef int (*TestAdds)();
1232 int res = reinterpret_cast<TestAdds>(entry)(); 1232 int res = reinterpret_cast<TestAdds>(entry)();
1233 EXPECT_EQ(10, res); 1233 EXPECT_EQ(10, res);
1234 } 1234 }
1235 1235
1236 1236
1237 ASSEMBLER_TEST_GENERATE(TestNot, assembler) {
1238 __ movq(RAX, Immediate(0xFFFFFFFF00000000));
1239 __ notq(RAX);
1240 __ ret();
1241 }
1242
1243
1244 ASSEMBLER_TEST_RUN(TestNot, entry) {
1245 typedef int (*TestNot)();
1246 unsigned int res = reinterpret_cast<TestNot>(entry)();
1247 EXPECT_EQ(0xFFFFFFFF, res);
1248 }
1249
regis 2012/05/31 09:48:19 Shouldn't you add tests for notl and xorpd?
srdjan 2012/05/31 20:20:42 Removed notl (it was never implemented), added tes
1237 } // namespace dart 1250 } // namespace dart
1238 1251
1239 #endif // defined TARGET_ARCH_X64 1252 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698