| 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 #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 2488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2499 #if defined(__thumb__) | 2499 #if defined(__thumb__) |
| 2500 // Thumb mode builtin. | 2500 // Thumb mode builtin. |
| 2501 DCHECK((reinterpret_cast<intptr_t>(builtin.address()) & 1) == 1); | 2501 DCHECK((reinterpret_cast<intptr_t>(builtin.address()) & 1) == 1); |
| 2502 #endif | 2502 #endif |
| 2503 mov(r1, Operand(builtin)); | 2503 mov(r1, Operand(builtin)); |
| 2504 CEntryStub stub(isolate(), 1); | 2504 CEntryStub stub(isolate(), 1); |
| 2505 Jump(stub.GetCode(), RelocInfo::CODE_TARGET); | 2505 Jump(stub.GetCode(), RelocInfo::CODE_TARGET); |
| 2506 } | 2506 } |
| 2507 | 2507 |
| 2508 | 2508 |
| 2509 void MacroAssembler::InvokeBuiltin(int native_context_index, InvokeFlag flag, | |
| 2510 const CallWrapper& call_wrapper) { | |
| 2511 // You can't call a builtin without a valid frame. | |
| 2512 DCHECK(flag == JUMP_FUNCTION || has_frame()); | |
| 2513 | |
| 2514 // Fake a parameter count to avoid emitting code to do the check. | |
| 2515 ParameterCount expected(0); | |
| 2516 LoadNativeContextSlot(native_context_index, r1); | |
| 2517 InvokeFunctionCode(r1, no_reg, expected, expected, flag, call_wrapper); | |
| 2518 } | |
| 2519 | |
| 2520 | |
| 2521 void MacroAssembler::SetCounter(StatsCounter* counter, int value, | 2509 void MacroAssembler::SetCounter(StatsCounter* counter, int value, |
| 2522 Register scratch1, Register scratch2) { | 2510 Register scratch1, Register scratch2) { |
| 2523 if (FLAG_native_code_counters && counter->Enabled()) { | 2511 if (FLAG_native_code_counters && counter->Enabled()) { |
| 2524 mov(scratch1, Operand(value)); | 2512 mov(scratch1, Operand(value)); |
| 2525 mov(scratch2, Operand(ExternalReference(counter))); | 2513 mov(scratch2, Operand(ExternalReference(counter))); |
| 2526 str(scratch1, MemOperand(scratch2)); | 2514 str(scratch1, MemOperand(scratch2)); |
| 2527 } | 2515 } |
| 2528 } | 2516 } |
| 2529 | 2517 |
| 2530 | 2518 |
| (...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3617 } | 3605 } |
| 3618 } | 3606 } |
| 3619 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3607 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
| 3620 add(result, result, Operand(dividend, LSR, 31)); | 3608 add(result, result, Operand(dividend, LSR, 31)); |
| 3621 } | 3609 } |
| 3622 | 3610 |
| 3623 } // namespace internal | 3611 } // namespace internal |
| 3624 } // namespace v8 | 3612 } // namespace v8 |
| 3625 | 3613 |
| 3626 #endif // V8_TARGET_ARCH_ARM | 3614 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |