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

Unified Diff: runtime/vm/intrinsifier_x64.cc

Issue 1252703002: VM: Use object pool for loading Symbols::PredefinedAddress in intrinsic code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add missing code on arm64 Created 5 years, 5 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/intrinsifier_mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_x64.cc
diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
index ee104c683a39a692034788732cfa79f0ad157372..a034e69d36a4a0faabb46c476d9124478a9e2be0 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -1609,8 +1609,14 @@ void Intrinsifier::StringBaseCharAt(Assembler* assembler) {
__ movzxb(RCX, FieldAddress(RAX, RCX, TIMES_1, OneByteString::data_offset()));
__ cmpq(RCX, Immediate(Symbols::kNumberOfOneCharCodeSymbols));
__ j(GREATER_EQUAL, &fall_through);
- __ movq(RAX,
- Immediate(reinterpret_cast<uword>(Symbols::PredefinedAddress())));
+ const ExternalLabel symbols_label(
+ reinterpret_cast<uword>(Symbols::PredefinedAddress()));
+ __ pushq(PP);
+ __ LoadPoolPointer(PP);
+ assembler->set_constant_pool_allowed(true);
+ __ LoadExternalLabel(RAX, &symbols_label, kNotPatchable, PP);
+ assembler->set_constant_pool_allowed(false);
+ __ popq(PP);
__ movq(RAX, Address(RAX,
RCX,
TIMES_8,
@@ -1624,8 +1630,12 @@ void Intrinsifier::StringBaseCharAt(Assembler* assembler) {
__ movzxw(RCX, FieldAddress(RAX, RCX, TIMES_1, OneByteString::data_offset()));
__ cmpq(RCX, Immediate(Symbols::kNumberOfOneCharCodeSymbols));
__ j(GREATER_EQUAL, &fall_through);
- __ movq(RAX,
- Immediate(reinterpret_cast<uword>(Symbols::PredefinedAddress())));
+ __ pushq(PP);
+ __ LoadPoolPointer(PP);
+ assembler->set_constant_pool_allowed(true);
+ __ LoadExternalLabel(RAX, &symbols_label, kNotPatchable, PP);
+ assembler->set_constant_pool_allowed(false);
+ __ popq(PP);
__ movq(RAX, Address(RAX,
RCX,
TIMES_8,
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698