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

Unified Diff: vm/assembler_ia32.cc

Issue 10592006: Rework leaf calls as just simple C calls with a signature and not the NativeArgumentDescriptor. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/assembler_ia32.h ('k') | vm/assembler_x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/assembler_ia32.cc
===================================================================
--- vm/assembler_ia32.cc (revision 8859)
+++ vm/assembler_ia32.cc (working copy)
@@ -1401,9 +1401,12 @@
j(NOT_ZERO, &done, Assembler::kNearJump);
// A store buffer update is required.
pushal();
- pushl(dest); // Push argument
+ movl(EBP, ESP);
+ ReserveAlignedFrameSpace(kWordSize);
+ movl(EAX, dest);
+ movl(Address(ESP, 0), EAX); // Push argument
CallRuntime(kStoreBufferRuntimeEntry);
- popl(value); // Pop argument
+ movl(ESP, EBP);
popal();
Bind(&done);
}
@@ -1503,6 +1506,16 @@
}
+void Assembler::ReserveAlignedFrameSpace(intptr_t frame_space) {
+ // Reserve space for arguments and align frame before entering
+ // the C++ world.
+ AddImmediate(ESP, Immediate(-frame_space));
+ if (OS::ActivationFrameAlignment() > 0) {
+ andl(ESP, Immediate(~(OS::ActivationFrameAlignment() - 1)));
+ }
+}
+
+
void Assembler::CallRuntime(const RuntimeEntry& entry) {
entry.Call(this);
}
« no previous file with comments | « vm/assembler_ia32.h ('k') | vm/assembler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698