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

Unified Diff: runtime/vm/assembler_x64.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_x64.h ('k') | runtime/vm/code_patcher_arm64_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_x64.cc
diff --git a/runtime/vm/assembler_x64.cc b/runtime/vm/assembler_x64.cc
index 3c3dc2eb4c3f1d6cdd96ab02004421bd3eebc66d..fd27c9a30d40992c54290ae2aa96d3b8a426e89c 100644
--- a/runtime/vm/assembler_x64.cc
+++ b/runtime/vm/assembler_x64.cc
@@ -99,6 +99,18 @@ void Assembler::Call(const ExternalLabel* label) {
}
+void Assembler::CallPatchable(const StubEntry& stub_entry) {
+ const ExternalLabel label(stub_entry.EntryPoint());
+ CallPatchable(&label);
+}
+
+
+void Assembler::Call(const StubEntry& stub_entry) {
+ const ExternalLabel label(stub_entry.EntryPoint());
+ Call(&label);
+}
+
+
void Assembler::pushq(Register reg) {
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
EmitRegisterREX(reg, REX_NONE);
@@ -2551,6 +2563,13 @@ void Assembler::J(Condition condition, const ExternalLabel* label,
}
+void Assembler::J(Condition condition, const StubEntry& stub_entry,
+ Register pp) {
+ const ExternalLabel label(stub_entry.EntryPoint());
+ J(condition, &label, pp);
+}
+
+
void Assembler::jmp(Register reg) {
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
Operand operand(reg);
@@ -2606,6 +2625,12 @@ void Assembler::jmp(const ExternalLabel* label) {
}
+void Assembler::jmp(const StubEntry& stub_entry) {
+ const ExternalLabel label(stub_entry.EntryPoint());
+ jmp(&label);
+}
+
+
void Assembler::JmpPatchable(const ExternalLabel* label, Register pp) {
ASSERT((pp != PP) || constant_pool_allowed());
intptr_t call_start = buffer_.GetPosition();
@@ -2617,6 +2642,12 @@ void Assembler::JmpPatchable(const ExternalLabel* label, Register pp) {
}
+void Assembler::JmpPatchable(const StubEntry& stub_entry, Register pp) {
+ const ExternalLabel label(stub_entry.EntryPoint());
+ JmpPatchable(&label, pp);
+}
+
+
void Assembler::Jmp(const ExternalLabel* label, Register pp) {
ASSERT((pp != PP) || constant_pool_allowed());
const int32_t offset = ObjectPool::element_offset(
@@ -2625,6 +2656,12 @@ void Assembler::Jmp(const ExternalLabel* label, Register pp) {
}
+void Assembler::Jmp(const StubEntry& stub_entry, Register pp) {
+ const ExternalLabel label(stub_entry.EntryPoint());
+ Jmp(&label, pp);
+}
+
+
void Assembler::lock() {
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
EmitUint8(0xF0);
@@ -3188,7 +3225,7 @@ void Assembler::Stop(const char* message, bool fixed_length_encoding) {
} else {
LoadImmediate(RDI, Immediate(message_address));
}
- call(&StubCode::PrintStopMessageLabel());
+ call(&StubCode::PrintStopMessage_entry()->label());
popq(RDI); // Restore RDI register.
popq(TMP); // Restore TMP register.
} else {
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/code_patcher_arm64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698