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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 2374063004: [arm] Remove --enable-movw-movt. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 AssertSmi(src); 404 AssertSmi(src);
405 } 405 }
406 str(src, dst); 406 str(src, dst);
407 } 407 }
408 } 408 }
409 409
410 410
411 void MacroAssembler::LoadRoot(Register destination, 411 void MacroAssembler::LoadRoot(Register destination,
412 Heap::RootListIndex index, 412 Heap::RootListIndex index,
413 Condition cond) { 413 Condition cond) {
414 if (CpuFeatures::IsSupported(MOVW_MOVT_IMMEDIATE_LOADS) &&
415 isolate()->heap()->RootCanBeTreatedAsConstant(index) &&
416 !predictable_code_size()) {
417 CpuFeatureScope scope(this, MOVW_MOVT_IMMEDIATE_LOADS);
418 // The CPU supports fast immediate values, and this root will never
419 // change. We will load it as a relocatable immediate value.
420 Handle<Object> root = isolate()->heap()->root_handle(index);
421 mov(destination, Operand(root), LeaveCC, cond);
422 return;
423 }
424 ldr(destination, MemOperand(kRootRegister, index << kPointerSizeLog2), cond); 414 ldr(destination, MemOperand(kRootRegister, index << kPointerSizeLog2), cond);
425 } 415 }
426 416
427 417
428 void MacroAssembler::StoreRoot(Register source, 418 void MacroAssembler::StoreRoot(Register source,
429 Heap::RootListIndex index, 419 Heap::RootListIndex index,
430 Condition cond) { 420 Condition cond) {
431 DCHECK(Heap::RootCanBeWrittenAfterInitialization(index)); 421 DCHECK(Heap::RootCanBeWrittenAfterInitialization(index));
432 str(source, MemOperand(kRootRegister, index << kPointerSizeLog2), cond); 422 str(source, MemOperand(kRootRegister, index << kPointerSizeLog2), cond);
433 } 423 }
(...skipping 3743 matching lines...) Expand 10 before | Expand all | Expand 10 after
4177 } 4167 }
4178 } 4168 }
4179 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 4169 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
4180 add(result, result, Operand(dividend, LSR, 31)); 4170 add(result, result, Operand(dividend, LSR, 31));
4181 } 4171 }
4182 4172
4183 } // namespace internal 4173 } // namespace internal
4184 } // namespace v8 4174 } // namespace v8
4185 4175
4186 #endif // V8_TARGET_ARCH_ARM 4176 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698