| 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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
| 8 | 8 |
| 9 #include "src/base/division-by-constant.h" | 9 #include "src/base/division-by-constant.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 4341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4352 } else { | 4352 } else { |
| 4353 Move(v1, v0, src); | 4353 Move(v1, v0, src); |
| 4354 } | 4354 } |
| 4355 } | 4355 } |
| 4356 } | 4356 } |
| 4357 | 4357 |
| 4358 | 4358 |
| 4359 void MacroAssembler::MovToFloatParameters(DoubleRegister src1, | 4359 void MacroAssembler::MovToFloatParameters(DoubleRegister src1, |
| 4360 DoubleRegister src2) { | 4360 DoubleRegister src2) { |
| 4361 if (!IsMipsSoftFloatABI) { | 4361 if (!IsMipsSoftFloatABI) { |
| 4362 const DoubleRegister fparg2 = (kMipsAbi == kN64) ? f13 : f14; | 4362 const DoubleRegister fparg2 = f13; |
| 4363 if (src2.is(f12)) { | 4363 if (src2.is(f12)) { |
| 4364 DCHECK(!src1.is(fparg2)); | 4364 DCHECK(!src1.is(fparg2)); |
| 4365 Move(fparg2, src2); | 4365 Move(fparg2, src2); |
| 4366 Move(f12, src1); | 4366 Move(f12, src1); |
| 4367 } else { | 4367 } else { |
| 4368 Move(f12, src1); | 4368 Move(f12, src1); |
| 4369 Move(fparg2, src2); | 4369 Move(fparg2, src2); |
| 4370 } | 4370 } |
| 4371 } else { | 4371 } else { |
| 4372 if (kArchEndian == kLittle) { | 4372 if (kArchEndian == kLittle) { |
| (...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5943 Register scratch, | 5943 Register scratch, |
| 5944 Label* failure) { | 5944 Label* failure) { |
| 5945 const int kFlatOneByteStringMask = | 5945 const int kFlatOneByteStringMask = |
| 5946 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; | 5946 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask; |
| 5947 const int kFlatOneByteStringTag = | 5947 const int kFlatOneByteStringTag = |
| 5948 kStringTag | kOneByteStringTag | kSeqStringTag; | 5948 kStringTag | kOneByteStringTag | kSeqStringTag; |
| 5949 And(scratch, type, Operand(kFlatOneByteStringMask)); | 5949 And(scratch, type, Operand(kFlatOneByteStringMask)); |
| 5950 Branch(failure, ne, scratch, Operand(kFlatOneByteStringTag)); | 5950 Branch(failure, ne, scratch, Operand(kFlatOneByteStringTag)); |
| 5951 } | 5951 } |
| 5952 | 5952 |
| 5953 | 5953 static const int kRegisterPassedArguments = 8; |
| 5954 static const int kRegisterPassedArguments = (kMipsAbi == kN64) ? 8 : 4; | |
| 5955 | 5954 |
| 5956 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments, | 5955 int MacroAssembler::CalculateStackPassedWords(int num_reg_arguments, |
| 5957 int num_double_arguments) { | 5956 int num_double_arguments) { |
| 5958 int stack_passed_words = 0; | 5957 int stack_passed_words = 0; |
| 5959 num_reg_arguments += 2 * num_double_arguments; | 5958 num_reg_arguments += 2 * num_double_arguments; |
| 5960 | 5959 |
| 5961 // O32: Up to four simple arguments are passed in registers a0..a3. | 5960 // O32: Up to four simple arguments are passed in registers a0..a3. |
| 5962 // N64: Up to eight simple arguments are passed in registers a0..a7. | 5961 // N64: Up to eight simple arguments are passed in registers a0..a7. |
| 5963 if (num_reg_arguments > kRegisterPassedArguments) { | 5962 if (num_reg_arguments > kRegisterPassedArguments) { |
| 5964 stack_passed_words += num_reg_arguments - kRegisterPassedArguments; | 5963 stack_passed_words += num_reg_arguments - kRegisterPassedArguments; |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6487 if (mag.shift > 0) sra(result, result, mag.shift); | 6486 if (mag.shift > 0) sra(result, result, mag.shift); |
| 6488 srl(at, dividend, 31); | 6487 srl(at, dividend, 31); |
| 6489 Addu(result, result, Operand(at)); | 6488 Addu(result, result, Operand(at)); |
| 6490 } | 6489 } |
| 6491 | 6490 |
| 6492 | 6491 |
| 6493 } // namespace internal | 6492 } // namespace internal |
| 6494 } // namespace v8 | 6493 } // namespace v8 |
| 6495 | 6494 |
| 6496 #endif // V8_TARGET_ARCH_MIPS64 | 6495 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |