| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <assert.h> // For assert | 5 #include <assert.h> // For assert |
| 6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
| 7 | 7 |
| 8 #if V8_TARGET_ARCH_S390 | 8 #if V8_TARGET_ARCH_S390 |
| 9 | 9 |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 2508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2519 | 2519 |
| 2520 // If the expected number of arguments of the runtime function is | 2520 // If the expected number of arguments of the runtime function is |
| 2521 // constant, we check that the actual number of arguments match the | 2521 // constant, we check that the actual number of arguments match the |
| 2522 // expectation. | 2522 // expectation. |
| 2523 CHECK(f->nargs < 0 || f->nargs == num_arguments); | 2523 CHECK(f->nargs < 0 || f->nargs == num_arguments); |
| 2524 | 2524 |
| 2525 // TODO(1236192): Most runtime routines don't need the number of | 2525 // TODO(1236192): Most runtime routines don't need the number of |
| 2526 // arguments passed in because it is constant. At some point we | 2526 // arguments passed in because it is constant. At some point we |
| 2527 // should remove this need and make the runtime routine entry code | 2527 // should remove this need and make the runtime routine entry code |
| 2528 // smarter. | 2528 // smarter. |
| 2529 mov(r2, Operand(num_arguments)); | 2529 if (num_arguments >= 0) { |
| 2530 mov(r2, Operand(num_arguments)); |
| 2531 } |
| 2530 mov(r3, Operand(ExternalReference(f, isolate()))); | 2532 mov(r3, Operand(ExternalReference(f, isolate()))); |
| 2531 CEntryStub stub(isolate(), | 2533 CEntryStub stub(isolate(), |
| 2532 #if V8_TARGET_ARCH_S390X | 2534 #if V8_TARGET_ARCH_S390X |
| 2533 f->result_size, | 2535 f->result_size, |
| 2534 #else | 2536 #else |
| 2535 1, | 2537 1, |
| 2536 #endif | 2538 #endif |
| 2537 save_doubles); | 2539 save_doubles); |
| 2538 CallStub(&stub); | 2540 CallStub(&stub); |
| 2539 } | 2541 } |
| (...skipping 2966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5506 } | 5508 } |
| 5507 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); | 5509 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); |
| 5508 ExtractBit(r0, dividend, 31); | 5510 ExtractBit(r0, dividend, 31); |
| 5509 AddP(result, r0); | 5511 AddP(result, r0); |
| 5510 } | 5512 } |
| 5511 | 5513 |
| 5512 } // namespace internal | 5514 } // namespace internal |
| 5513 } // namespace v8 | 5515 } // namespace v8 |
| 5514 | 5516 |
| 5515 #endif // V8_TARGET_ARCH_S390 | 5517 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |