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

Unified Diff: runtime/vm/assembler_x64_test.cc

Issue 10807070: Various cleanups, adding tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_x64_test.cc
===================================================================
--- runtime/vm/assembler_x64_test.cc (revision 9813)
+++ runtime/vm/assembler_x64_test.cc (working copy)
@@ -530,6 +530,17 @@
__ popq(RCX);
__ cmpq(RAX, Immediate(0));
__ j(NOT_EQUAL, &error);
+ __ movq(RCX, Immediate(0xFF));
+ __ movq(RAX, Immediate(0x5));
+ __ xorq(RCX, RAX);
+ __ cmpq(RCX, Immediate(0xFF ^ 0x5));
+ __ j(NOT_EQUAL, &error);
+ __ pushq(Immediate(0xFF));
+ __ movq(RCX, Immediate(0x5));
+ __ xorq(Address(RSP, 0), RCX);
+ __ popq(RCX);
+ __ cmpq(RCX, Immediate(0xFF ^ 0x5));
+ __ j(NOT_EQUAL, &error);
__ xorq(RCX, RCX);
__ orq(RCX, Immediate(256));
__ movq(RAX, Immediate(4));
@@ -1383,6 +1394,20 @@
__ LoadObject(RCX, obj);
__ CompareObject(RCX, obj);
__ j(NOT_EQUAL, &fail);
+ const Smi& smi = Smi::ZoneHandle(Smi::New(15));
+ __ LoadObject(RCX, smi);
+ __ CompareObject(RCX, smi);
+ __ j(NOT_EQUAL, &fail);
+ __ pushq(RAX);
+ __ StoreObject(Address(RSP, 0), obj);
+ __ popq(RCX);
+ __ CompareObject(RCX, obj);
+ __ j(NOT_EQUAL, &fail);
+ __ pushq(RAX);
+ __ StoreObject(Address(RSP, 0), smi);
+ __ popq(RCX);
+ __ CompareObject(RCX, smi);
+ __ j(NOT_EQUAL, &fail);
__ movl(RAX, Immediate(1)); // OK
__ ret();
__ Bind(&fail);
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698