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

Unified Diff: runtime/vm/assembler_ia32_test.cc

Issue 16126003: Use stack locations instead of register for binary Smi operations when possible. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/assembler_ia32_test.cc
===================================================================
--- runtime/vm/assembler_ia32_test.cc (revision 23244)
+++ runtime/vm/assembler_ia32_test.cc (working copy)
@@ -340,14 +340,23 @@
ASSEMBLER_TEST_GENERATE(Bitwise, assembler) {
__ movl(ECX, Immediate(42));
__ xorl(ECX, ECX);
- __ orl(ECX, Immediate(256));
- __ movl(EAX, Immediate(4));
- __ orl(ECX, EAX);
+ __ orl(ECX, Immediate(0x100));
+ __ movl(EAX, Immediate(0x648));
+ __ orl(ECX, EAX); // 0x748.
__ movl(EAX, Immediate(0xfff0));
- __ andl(ECX, EAX);
+ __ andl(ECX, EAX); // 0x740.
+ __ pushl(Immediate(0xF6FF));
+ __ andl(ECX, Address(ESP, 0)); // 0x640.
+ __ popl(EAX); // Discard.
__ movl(EAX, Immediate(1));
- __ orl(ECX, EAX);
- __ xorl(ECX, Immediate(0));
+ __ orl(ECX, EAX); // 0x641.
+ __ pushl(Immediate(0x7));
+ __ orl(ECX, Address(ESP, 0)); // 0x647.
+ __ popl(EAX); // Discard.
+ __ xorl(ECX, Immediate(0)); // 0x647.
+ __ pushl(Immediate(0x1C));
+ __ xorl(ECX, Address(ESP, 0)); // 0x65B.
+ __ popl(EAX); // Discard.
__ movl(EAX, ECX);
__ ret();
}
@@ -355,7 +364,7 @@
ASSEMBLER_TEST_RUN(Bitwise, test) {
typedef int (*Bitwise)();
- EXPECT_EQ(256 + 1, reinterpret_cast<Bitwise>(test->entry())());
+ EXPECT_EQ(0x65B, reinterpret_cast<Bitwise>(test->entry())());
}

Powered by Google App Engine
This is Rietveld 408576698