OLD | NEW |
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 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_ARM | 9 #if V8_TARGET_ARCH_ARM |
10 | 10 |
(...skipping 2571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2582 | 2582 |
2583 | 2583 |
2584 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { | 2584 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { |
2585 DCHECK(!target.is(r1)); | 2585 DCHECK(!target.is(r1)); |
2586 GetBuiltinFunction(r1, id); | 2586 GetBuiltinFunction(r1, id); |
2587 // Load the code entry point from the builtins object. | 2587 // Load the code entry point from the builtins object. |
2588 ldr(target, FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); | 2588 ldr(target, FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); |
2589 } | 2589 } |
2590 | 2590 |
2591 | 2591 |
2592 void MacroAssembler::BranchIfNotBuiltin(Register function, Register temp, | |
2593 BuiltinFunctionId id, Label* miss) { | |
2594 ldr(temp, FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset)); | |
2595 ldr(temp, FieldMemOperand(temp, SharedFunctionInfo::kFunctionDataOffset)); | |
2596 cmp(temp, Operand(Smi::FromInt(id))); | |
2597 b(ne, miss); | |
2598 } | |
2599 | |
2600 | |
2601 void MacroAssembler::SetCounter(StatsCounter* counter, int value, | 2592 void MacroAssembler::SetCounter(StatsCounter* counter, int value, |
2602 Register scratch1, Register scratch2) { | 2593 Register scratch1, Register scratch2) { |
2603 if (FLAG_native_code_counters && counter->Enabled()) { | 2594 if (FLAG_native_code_counters && counter->Enabled()) { |
2604 mov(scratch1, Operand(value)); | 2595 mov(scratch1, Operand(value)); |
2605 mov(scratch2, Operand(ExternalReference(counter))); | 2596 mov(scratch2, Operand(ExternalReference(counter))); |
2606 str(scratch1, MemOperand(scratch2)); | 2597 str(scratch1, MemOperand(scratch2)); |
2607 } | 2598 } |
2608 } | 2599 } |
2609 | 2600 |
2610 | 2601 |
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3917 } | 3908 } |
3918 } | 3909 } |
3919 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3910 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
3920 add(result, result, Operand(dividend, LSR, 31)); | 3911 add(result, result, Operand(dividend, LSR, 31)); |
3921 } | 3912 } |
3922 | 3913 |
3923 } // namespace internal | 3914 } // namespace internal |
3924 } // namespace v8 | 3915 } // namespace v8 |
3925 | 3916 |
3926 #endif // V8_TARGET_ARCH_ARM | 3917 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |