| 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 2464 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2475                                            int num_arguments) { | 2475                                            int num_arguments) { | 
| 2476   mov(r0, Operand(num_arguments)); | 2476   mov(r0, Operand(num_arguments)); | 
| 2477   mov(r1, Operand(ext)); | 2477   mov(r1, Operand(ext)); | 
| 2478 | 2478 | 
| 2479   CEntryStub stub(isolate(), 1); | 2479   CEntryStub stub(isolate(), 1); | 
| 2480   CallStub(&stub); | 2480   CallStub(&stub); | 
| 2481 } | 2481 } | 
| 2482 | 2482 | 
| 2483 | 2483 | 
| 2484 void MacroAssembler::TailCallExternalReference(const ExternalReference& ext, | 2484 void MacroAssembler::TailCallExternalReference(const ExternalReference& ext, | 
| 2485                                                int num_arguments, | 2485                                                int num_arguments) { | 
| 2486                                                int result_size) { |  | 
| 2487   // TODO(1236192): Most runtime routines don't need the number of | 2486   // TODO(1236192): Most runtime routines don't need the number of | 
| 2488   // arguments passed in because it is constant. At some point we | 2487   // arguments passed in because it is constant. At some point we | 
| 2489   // should remove this need and make the runtime routine entry code | 2488   // should remove this need and make the runtime routine entry code | 
| 2490   // smarter. | 2489   // smarter. | 
| 2491   mov(r0, Operand(num_arguments)); | 2490   mov(r0, Operand(num_arguments)); | 
| 2492   JumpToExternalReference(ext); | 2491   JumpToExternalReference(ext); | 
| 2493 } | 2492 } | 
| 2494 | 2493 | 
| 2495 | 2494 | 
| 2496 void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid, | 2495 void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid, | 
| 2497                                      int num_arguments, | 2496                                      int num_arguments) { | 
| 2498                                      int result_size) { | 2497   TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments); | 
| 2499   TailCallExternalReference(ExternalReference(fid, isolate()), |  | 
| 2500                             num_arguments, |  | 
| 2501                             result_size); |  | 
| 2502 } | 2498 } | 
| 2503 | 2499 | 
| 2504 | 2500 | 
| 2505 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) { | 2501 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) { | 
| 2506 #if defined(__thumb__) | 2502 #if defined(__thumb__) | 
| 2507   // Thumb mode builtin. | 2503   // Thumb mode builtin. | 
| 2508   DCHECK((reinterpret_cast<intptr_t>(builtin.address()) & 1) == 1); | 2504   DCHECK((reinterpret_cast<intptr_t>(builtin.address()) & 1) == 1); | 
| 2509 #endif | 2505 #endif | 
| 2510   mov(r1, Operand(builtin)); | 2506   mov(r1, Operand(builtin)); | 
| 2511   CEntryStub stub(isolate(), 1); | 2507   CEntryStub stub(isolate(), 1); | 
| (...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3602     } | 3598     } | 
| 3603   } | 3599   } | 
| 3604   if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3600   if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 
| 3605   add(result, result, Operand(dividend, LSR, 31)); | 3601   add(result, result, Operand(dividend, LSR, 31)); | 
| 3606 } | 3602 } | 
| 3607 | 3603 | 
| 3608 }  // namespace internal | 3604 }  // namespace internal | 
| 3609 }  // namespace v8 | 3605 }  // namespace v8 | 
| 3610 | 3606 | 
| 3611 #endif  // V8_TARGET_ARCH_ARM | 3607 #endif  // V8_TARGET_ARCH_ARM | 
| OLD | NEW | 
|---|