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

Unified Diff: runtime/vm/assembler_arm64.cc

Issue 513213002: Generate some intrinsics using our IR. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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
Index: runtime/vm/assembler_arm64.cc
===================================================================
--- runtime/vm/assembler_arm64.cc (revision 39909)
+++ runtime/vm/assembler_arm64.cc (working copy)
@@ -31,7 +31,8 @@
patchable_pool_entries_(),
prologue_offset_(-1),
use_far_branches_(use_far_branches),
- comments_() {
+ comments_(),
+ allow_constant_pool_(true) {
if (Isolate::Current() != Dart::vm_isolate()) {
object_pool_ = GrowableObjectArray::New(Heap::kOld);
@@ -488,6 +489,8 @@
bool Assembler::CanLoadObjectFromPool(const Object& object) {
+ if (!allow_constant_pool()) return false;
zra 2014/09/05 20:26:49 Please use curly braces. Also, Null, True, and Fa
Florian Schneider 2014/09/08 11:12:39 Ok, I made those objects to be loaded from the con
+
// TODO(zra, kmillikin): Also load other large immediates from the object
// pool
if (object.IsSmi()) {
@@ -508,6 +511,7 @@
bool Assembler::CanLoadImmediateFromPool(int64_t imm, Register pp) {
+ if (!allow_constant_pool()) return false;
zra 2014/09/05 20:26:49 Please use curly braces.
Florian Schneider 2014/09/08 11:12:39 Done.
return !Utils::IsInt(32, imm) &&
(pp != kNoPP) &&
// We *could* put constants in the pool in a VM isolate, but it is
@@ -567,7 +571,9 @@
void Assembler::LoadDecodableImmediate(Register reg, int64_t imm, Register pp) {
- if ((pp != kNoPP) && (Isolate::Current() != Dart::vm_isolate())) {
+ if ((pp != kNoPP) &&
+ (Isolate::Current() != Dart::vm_isolate()) &&
+ allow_constant_pool()) {
int64_t val_smi_tag = imm & kSmiTagMask;
imm &= ~kSmiTagMask; // Mask off the tag bits.
const int32_t offset = Array::element_offset(FindImmediate(imm));

Powered by Google App Engine
This is Rietveld 408576698