| 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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 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 5517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5528 } | 5528 } |
| 5529 } | 5529 } |
| 5530 | 5530 |
| 5531 if (do_return) { | 5531 if (do_return) { |
| 5532 Ret(USE_DELAY_SLOT); | 5532 Ret(USE_DELAY_SLOT); |
| 5533 // If returning, the instruction in the delay slot will be the addiu below. | 5533 // If returning, the instruction in the delay slot will be the addiu below. |
| 5534 } | 5534 } |
| 5535 addiu(sp, sp, 8); | 5535 addiu(sp, sp, 8); |
| 5536 } | 5536 } |
| 5537 | 5537 |
| 5538 | |
| 5539 void MacroAssembler::InitializeNewString(Register string, | |
| 5540 Register length, | |
| 5541 Heap::RootListIndex map_index, | |
| 5542 Register scratch1, | |
| 5543 Register scratch2) { | |
| 5544 sll(scratch1, length, kSmiTagSize); | |
| 5545 LoadRoot(scratch2, map_index); | |
| 5546 sw(scratch1, FieldMemOperand(string, String::kLengthOffset)); | |
| 5547 li(scratch1, Operand(String::kEmptyHashField)); | |
| 5548 sw(scratch2, FieldMemOperand(string, HeapObject::kMapOffset)); | |
| 5549 sw(scratch1, FieldMemOperand(string, String::kHashFieldOffset)); | |
| 5550 } | |
| 5551 | |
| 5552 | |
| 5553 int MacroAssembler::ActivationFrameAlignment() { | 5538 int MacroAssembler::ActivationFrameAlignment() { |
| 5554 #if V8_HOST_ARCH_MIPS | 5539 #if V8_HOST_ARCH_MIPS |
| 5555 // Running on the real platform. Use the alignment as mandated by the local | 5540 // Running on the real platform. Use the alignment as mandated by the local |
| 5556 // environment. | 5541 // environment. |
| 5557 // Note: This will break if we ever start generating snapshots on one Mips | 5542 // Note: This will break if we ever start generating snapshots on one Mips |
| 5558 // platform for another Mips platform with a different alignment. | 5543 // platform for another Mips platform with a different alignment. |
| 5559 return base::OS::ActivationFrameAlignment(); | 5544 return base::OS::ActivationFrameAlignment(); |
| 5560 #else // V8_HOST_ARCH_MIPS | 5545 #else // V8_HOST_ARCH_MIPS |
| 5561 // If we are using the simulator then we should always align to the expected | 5546 // If we are using the simulator then we should always align to the expected |
| 5562 // alignment. As the simulator is used to generate snapshots we do not know | 5547 // alignment. As the simulator is used to generate snapshots we do not know |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6534 if (mag.shift > 0) sra(result, result, mag.shift); | 6519 if (mag.shift > 0) sra(result, result, mag.shift); |
| 6535 srl(at, dividend, 31); | 6520 srl(at, dividend, 31); |
| 6536 Addu(result, result, Operand(at)); | 6521 Addu(result, result, Operand(at)); |
| 6537 } | 6522 } |
| 6538 | 6523 |
| 6539 | 6524 |
| 6540 } // namespace internal | 6525 } // namespace internal |
| 6541 } // namespace v8 | 6526 } // namespace v8 |
| 6542 | 6527 |
| 6543 #endif // V8_TARGET_ARCH_MIPS | 6528 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |