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

Unified Diff: runtime/vm/code_generator_ia32.cc

Issue 9963032: Minor cleanup in assembly code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 | « no previous file | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator_ia32.cc
===================================================================
--- runtime/vm/code_generator_ia32.cc (revision 6065)
+++ runtime/vm/code_generator_ia32.cc (working copy)
@@ -1613,11 +1613,10 @@
__ LoadObject(EDX, dst_type_class);
__ cmpl(EDX, ECX);
__ j(EQUAL, &done, Assembler::kNearJump);
- __ pushl(EAX);
+ // EAX, EDX are preserved in stub, result is in EBX.
__ call(&StubCode::IsRawSubTypeLabel());
- __ movl(EDI, EAX);
- __ popl(EAX);
- __ cmpl(EDI, Immediate(1));
+ // Result in EBX: 1 is raw subtype.
+ __ cmpl(EBX, Immediate(1));
__ j(EQUAL, &done, Assembler::kNearJump);
// Otherwise fallthrough
} else {
@@ -1664,13 +1663,11 @@
__ j(NOT_EQUAL, &done, Assembler::kNearJump);
} else {
__ LoadObject(EDX, dst_type_class);
- // EAX: Instance (preserve).
- // EDX: test class
- __ pushl(EAX);
+ // EAX: Instance (preserved).
+ // EDX: test class (preserved).
__ call(&StubCode::IsRawSubTypeLabel());
- __ movl(EDI, EAX);
- __ popl(EAX);
- __ cmpl(EDI, Immediate(1));
+ // Result in EBX: 1 is raw subtype.
+ __ cmpl(EBX, Immediate(1));
__ j(EQUAL, &done, Assembler::kNearJump);
// Otherwise fallthrough
}
@@ -1714,12 +1711,10 @@
__ cmpl(ECX, raw_null);
__ j(NOT_EQUAL, &fall_through, Assembler::kNearJump);
// We have a non-parameterized class in EDX, compare with class of
- // value in EAX.
- __ pushl(EAX);
+ // value in EAX. EAX, EDX are preserved in stub.
__ call(&StubCode::IsRawSubTypeLabel());
- __ movl(EDI, EAX);
- __ popl(EAX);
- __ cmpl(EDI, Immediate(1));
+ // Result in EBX: 1 is raw subtype.
+ __ cmpl(EBX, Immediate(1));
__ j(EQUAL, &done, Assembler::kNearJump);
__ Bind(&fall_through);
}
« no previous file with comments | « no previous file | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698