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

Unified Diff: runtime/vm/assembler_x64.cc

Issue 829133006: VM: Small generated code size improvements on x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 5 years, 11 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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_x64.cc
===================================================================
--- runtime/vm/assembler_x64.cc (revision 42687)
+++ runtime/vm/assembler_x64.cc (working copy)
@@ -151,8 +151,9 @@
void Assembler::CallPatchable(const ExternalLabel* label) {
ASSERT(allow_constant_pool());
intptr_t call_start = buffer_.GetPosition();
- LoadExternalLabel(TMP, label, kPatchable, PP);
- call(TMP);
+ const int32_t offset =
+ Array::element_offset(FindExternalLabel(label, kPatchable));
+ call(Address::AddressBaseImm32(PP, offset - kHeapObjectTag));
ASSERT((buffer_.GetPosition() - call_start) == kCallExternalLabelSize);
}
@@ -161,8 +162,9 @@
if (Isolate::Current() == Dart::vm_isolate()) {
call(label);
} else {
- LoadExternalLabel(TMP, label, kNotPatchable, pp);
- call(TMP);
+ const int32_t offset =
+ Array::element_offset(FindExternalLabel(label, kNotPatchable));
+ call(Address::AddressBaseImm32(pp, offset - kHeapObjectTag));
}
}
@@ -2590,7 +2592,7 @@
intptr_t call_start = buffer_.GetPosition();
LoadExternalLabel(TMP, label, kPatchable, pp);
jmp(TMP);
- ASSERT((buffer_.GetPosition() - call_start) == kCallExternalLabelSize);
+ ASSERT((buffer_.GetPosition() - call_start) == kJmpExternalLabelSize);
}
@@ -2740,11 +2742,11 @@
}
-void Assembler::Drop(intptr_t stack_elements) {
+void Assembler::Drop(intptr_t stack_elements, Register tmp) {
ASSERT(stack_elements >= 0);
if (stack_elements <= 4) {
for (intptr_t i = 0; i < stack_elements; i++) {
- popq(TMP);
+ popq(tmp);
}
return;
}
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/code_patcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698