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

Unified Diff: runtime/vm/assembler_ia32.cc

Issue 1270803003: VM: More abstract interface for generating stub calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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_ia32.h ('k') | runtime/vm/assembler_mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_ia32.cc
diff --git a/runtime/vm/assembler_ia32.cc b/runtime/vm/assembler_ia32.cc
index c83b62f104516f8db7c27633fe5d12987f8232b2..c6c8da8a468aff6b8b5f5b12f092a1f10267af03 100644
--- a/runtime/vm/assembler_ia32.cc
+++ b/runtime/vm/assembler_ia32.cc
@@ -2366,7 +2366,7 @@ void Assembler::StoreIntoObject(Register object,
if (object != EDX) {
movl(EDX, object);
}
- call(&StubCode::UpdateStoreBufferLabel());
+ Call(*StubCode::UpdateStoreBuffer_entry());
if (value != EDX) {
popl(EDX); // Restore EDX.
}
@@ -2621,6 +2621,24 @@ void Assembler::CallRuntime(const RuntimeEntry& entry,
}
+void Assembler::Call(const StubEntry& stub_entry) {
+ const ExternalLabel label(stub_entry.EntryPoint());
+ call(&label);
+}
+
+
+void Assembler::Jmp(const StubEntry& stub_entry) {
+ const ExternalLabel label(stub_entry.EntryPoint());
+ jmp(&label);
+}
+
+
+void Assembler::J(Condition condition, const StubEntry& stub_entry) {
+ const ExternalLabel label(stub_entry.EntryPoint());
+ j(condition, &label);
+}
+
+
void Assembler::Align(intptr_t alignment, intptr_t offset) {
ASSERT(Utils::IsPowerOfTwo(alignment));
intptr_t pos = offset + buffer_.GetPosition();
@@ -2907,7 +2925,7 @@ void Assembler::Stop(const char* message) {
if (FLAG_print_stop_message) {
pushl(EAX); // Preserve EAX.
movl(EAX, Immediate(reinterpret_cast<int32_t>(message)));
- call(&StubCode::PrintStopMessageLabel()); // Passing message in EAX.
+ Call(*StubCode::PrintStopMessage_entry()); // Passing message in EAX.
popl(EAX); // Restore EAX.
} else {
// Emit the message address as immediate operand in the test instruction.
« no previous file with comments | « runtime/vm/assembler_ia32.h ('k') | runtime/vm/assembler_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698