| 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 #include "v8.h" | 7 #include "v8.h" |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
| 10 | 10 |
| (...skipping 4434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4445 Label ok, fail; | 4445 Label ok, fail; |
| 4446 CheckMap(map, scratch, Heap::kMetaMapRootIndex, &fail, DO_SMI_CHECK); | 4446 CheckMap(map, scratch, Heap::kMetaMapRootIndex, &fail, DO_SMI_CHECK); |
| 4447 Branch(&ok); | 4447 Branch(&ok); |
| 4448 bind(&fail); | 4448 bind(&fail); |
| 4449 Abort(kGlobalFunctionsMustHaveInitialMap); | 4449 Abort(kGlobalFunctionsMustHaveInitialMap); |
| 4450 bind(&ok); | 4450 bind(&ok); |
| 4451 } | 4451 } |
| 4452 } | 4452 } |
| 4453 | 4453 |
| 4454 | 4454 |
| 4455 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { | 4455 void MacroAssembler::Prologue(CompilationInfo* info) { |
| 4456 if (frame_mode == BUILD_STUB_FRAME) { | 4456 if (info->IsStub()) { |
| 4457 Push(ra, fp, cp); | 4457 Push(ra, fp, cp); |
| 4458 Push(Smi::FromInt(StackFrame::STUB)); | 4458 Push(Smi::FromInt(StackFrame::STUB)); |
| 4459 // Adjust FP to point to saved FP. | 4459 // Adjust FP to point to saved FP. |
| 4460 Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); | 4460 Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
| 4461 } else { | 4461 } else { |
| 4462 PredictableCodeSizeScope predictible_code_size_scope( | 4462 PredictableCodeSizeScope predictible_code_size_scope( |
| 4463 this, kNoCodeAgeSequenceLength); | 4463 this, kNoCodeAgeSequenceLength); |
| 4464 // The following three instructions must remain together and unmodified | 4464 // The following three instructions must remain together and unmodified |
| 4465 // for code aging to work properly. | 4465 // for code aging to work properly. |
| 4466 if (isolate()->IsCodePreAgingActive()) { | 4466 if (info->IsCodePreAgingActive()) { |
| 4467 // Pre-age the code. | 4467 // Pre-age the code. |
| 4468 Code* stub = Code::GetPreAgedCodeAgeStub(isolate()); | 4468 Code* stub = Code::GetPreAgedCodeAgeStub(isolate()); |
| 4469 nop(Assembler::CODE_AGE_MARKER_NOP); | 4469 nop(Assembler::CODE_AGE_MARKER_NOP); |
| 4470 // Load the stub address to t9 and call it, | 4470 // Load the stub address to t9 and call it, |
| 4471 // GetCodeAgeAndParity() extracts the stub address from this instruction. | 4471 // GetCodeAgeAndParity() extracts the stub address from this instruction. |
| 4472 li(t9, | 4472 li(t9, |
| 4473 Operand(reinterpret_cast<uint32_t>(stub->instruction_start())), | 4473 Operand(reinterpret_cast<uint32_t>(stub->instruction_start())), |
| 4474 CONSTANT_SIZE); | 4474 CONSTANT_SIZE); |
| 4475 nop(); // Prevent jalr to jal optimization. | 4475 nop(); // Prevent jalr to jal optimization. |
| 4476 jalr(t9, a0); | 4476 jalr(t9, a0); |
| (...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5741 } | 5741 } |
| 5742 if (ms.shift() > 0) sra(result, result, ms.shift()); | 5742 if (ms.shift() > 0) sra(result, result, ms.shift()); |
| 5743 srl(at, dividend, 31); | 5743 srl(at, dividend, 31); |
| 5744 Addu(result, result, Operand(at)); | 5744 Addu(result, result, Operand(at)); |
| 5745 } | 5745 } |
| 5746 | 5746 |
| 5747 | 5747 |
| 5748 } } // namespace v8::internal | 5748 } } // namespace v8::internal |
| 5749 | 5749 |
| 5750 #endif // V8_TARGET_ARCH_MIPS | 5750 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |