| 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 3156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3167 | 3167 |
| 3168 void MacroAssembler::InitializeFieldsWithFiller(Register start_offset, | 3168 void MacroAssembler::InitializeFieldsWithFiller(Register start_offset, |
| 3169 Register end_offset, | 3169 Register end_offset, |
| 3170 Register filler) { | 3170 Register filler) { |
| 3171 Label loop, entry; | 3171 Label loop, entry; |
| 3172 b(&entry); | 3172 b(&entry); |
| 3173 bind(&loop); | 3173 bind(&loop); |
| 3174 str(filler, MemOperand(start_offset, kPointerSize, PostIndex)); | 3174 str(filler, MemOperand(start_offset, kPointerSize, PostIndex)); |
| 3175 bind(&entry); | 3175 bind(&entry); |
| 3176 cmp(start_offset, end_offset); | 3176 cmp(start_offset, end_offset); |
| 3177 b(lt, &loop); | 3177 b(lo, &loop); |
| 3178 } | 3178 } |
| 3179 | 3179 |
| 3180 | 3180 |
| 3181 void MacroAssembler::CheckFor32DRegs(Register scratch) { | 3181 void MacroAssembler::CheckFor32DRegs(Register scratch) { |
| 3182 mov(scratch, Operand(ExternalReference::cpu_features())); | 3182 mov(scratch, Operand(ExternalReference::cpu_features())); |
| 3183 ldr(scratch, MemOperand(scratch)); | 3183 ldr(scratch, MemOperand(scratch)); |
| 3184 tst(scratch, Operand(1u << VFP32DREGS)); | 3184 tst(scratch, Operand(1u << VFP32DREGS)); |
| 3185 } | 3185 } |
| 3186 | 3186 |
| 3187 | 3187 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3395 | 3395 |
| 3396 // Just call directly. The function called cannot cause a GC, or | 3396 // Just call directly. The function called cannot cause a GC, or |
| 3397 // allow preemption, so the return address in the link register | 3397 // allow preemption, so the return address in the link register |
| 3398 // stays correct. | 3398 // stays correct. |
| 3399 Call(function); | 3399 Call(function); |
| 3400 int stack_passed_arguments = CalculateStackPassedWords( | 3400 int stack_passed_arguments = CalculateStackPassedWords( |
| 3401 num_reg_arguments, num_double_arguments); | 3401 num_reg_arguments, num_double_arguments); |
| 3402 if (ActivationFrameAlignment() > kPointerSize) { | 3402 if (ActivationFrameAlignment() > kPointerSize) { |
| 3403 ldr(sp, MemOperand(sp, stack_passed_arguments * kPointerSize)); | 3403 ldr(sp, MemOperand(sp, stack_passed_arguments * kPointerSize)); |
| 3404 } else { | 3404 } else { |
| 3405 add(sp, sp, Operand(stack_passed_arguments * sizeof(kPointerSize))); | 3405 add(sp, sp, Operand(stack_passed_arguments * kPointerSize)); |
| 3406 } | 3406 } |
| 3407 } | 3407 } |
| 3408 | 3408 |
| 3409 | 3409 |
| 3410 void MacroAssembler::GetRelocatedValueLocation(Register ldr_location, | 3410 void MacroAssembler::GetRelocatedValueLocation(Register ldr_location, |
| 3411 Register result, | 3411 Register result, |
| 3412 Register scratch) { | 3412 Register scratch) { |
| 3413 Label small_constant_pool_load, load_result; | 3413 Label small_constant_pool_load, load_result; |
| 3414 ldr(result, MemOperand(ldr_location)); | 3414 ldr(result, MemOperand(ldr_location)); |
| 3415 | 3415 |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3920 } | 3920 } |
| 3921 } | 3921 } |
| 3922 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3922 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
| 3923 add(result, result, Operand(dividend, LSR, 31)); | 3923 add(result, result, Operand(dividend, LSR, 31)); |
| 3924 } | 3924 } |
| 3925 | 3925 |
| 3926 } // namespace internal | 3926 } // namespace internal |
| 3927 } // namespace v8 | 3927 } // namespace v8 |
| 3928 | 3928 |
| 3929 #endif // V8_TARGET_ARCH_ARM | 3929 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |