Index: runtime/vm/assembler_ia32_test.cc |
=================================================================== |
--- runtime/vm/assembler_ia32_test.cc (revision 38317) |
+++ runtime/vm/assembler_ia32_test.cc (working copy) |
@@ -179,6 +179,25 @@ |
} |
+ASSEMBLER_TEST_GENERATE(Cmpb, assembler) { |
+ Label done; |
+ __ movl(EAX, Immediate(1)); |
+ __ pushl(Immediate(0xffffff11)); |
+ __ cmpb(Address(ESP, 0), Immediate(0x11)); |
+ __ j(EQUAL, &done, Assembler::kNearJump); |
+ __ movl(EAX, Immediate(0)); |
+ __ Bind(&done); |
+ __ popl(ECX); |
+ __ ret(); |
+} |
+ |
+ |
+ASSEMBLER_TEST_RUN(Cmpb, test) { |
+ typedef int (*CmpbCode)(); |
+ EXPECT_EQ(1, reinterpret_cast<CmpbCode>(test->entry())()); |
+} |
+ |
+ |
ASSEMBLER_TEST_GENERATE(Increment, assembler) { |
__ movl(EAX, Immediate(0)); |
__ pushl(EAX); |