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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 4037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4048 } | 4048 } |
4049 __ Jump(t9); | 4049 __ Jump(t9); |
4050 } | 4050 } |
4051 | 4051 |
4052 | 4052 |
4053 void DirectCEntryStub::GenerateCall(MacroAssembler* masm, | 4053 void DirectCEntryStub::GenerateCall(MacroAssembler* masm, |
4054 Register target) { | 4054 Register target) { |
4055 intptr_t loc = | 4055 intptr_t loc = |
4056 reinterpret_cast<intptr_t>(GetCode().location()); | 4056 reinterpret_cast<intptr_t>(GetCode().location()); |
4057 __ Move(t9, target); | 4057 __ Move(t9, target); |
4058 __ li(ra, Operand(loc, RelocInfo::CODE_TARGET), CONSTANT_SIZE); | 4058 __ li(at, Operand(loc, RelocInfo::CODE_TARGET), CONSTANT_SIZE); |
4059 __ Call(ra); | 4059 __ Call(at); |
4060 } | 4060 } |
4061 | 4061 |
4062 | 4062 |
4063 void NameDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm, | 4063 void NameDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm, |
4064 Label* miss, | 4064 Label* miss, |
4065 Label* done, | 4065 Label* done, |
4066 Register receiver, | 4066 Register receiver, |
4067 Register properties, | 4067 Register properties, |
4068 Handle<Name> name, | 4068 Handle<Name> name, |
4069 Register scratch0) { | 4069 Register scratch0) { |
(...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5281 __ jmp(&end_profiler_check); | 5281 __ jmp(&end_profiler_check); |
5282 | 5282 |
5283 __ bind(&profiler_disabled); | 5283 __ bind(&profiler_disabled); |
5284 __ mov(t9, function_address); | 5284 __ mov(t9, function_address); |
5285 __ bind(&end_profiler_check); | 5285 __ bind(&end_profiler_check); |
5286 | 5286 |
5287 // Allocate HandleScope in callee-save registers. | 5287 // Allocate HandleScope in callee-save registers. |
5288 __ li(s3, Operand(next_address)); | 5288 __ li(s3, Operand(next_address)); |
5289 __ ld(s0, MemOperand(s3, kNextOffset)); | 5289 __ ld(s0, MemOperand(s3, kNextOffset)); |
5290 __ ld(s1, MemOperand(s3, kLimitOffset)); | 5290 __ ld(s1, MemOperand(s3, kLimitOffset)); |
5291 __ ld(s2, MemOperand(s3, kLevelOffset)); | 5291 __ lw(s2, MemOperand(s3, kLevelOffset)); |
5292 __ Daddu(s2, s2, Operand(1)); | 5292 __ Addu(s2, s2, Operand(1)); |
5293 __ sd(s2, MemOperand(s3, kLevelOffset)); | 5293 __ sw(s2, MemOperand(s3, kLevelOffset)); |
5294 | 5294 |
5295 if (FLAG_log_timer_events) { | 5295 if (FLAG_log_timer_events) { |
5296 FrameScope frame(masm, StackFrame::MANUAL); | 5296 FrameScope frame(masm, StackFrame::MANUAL); |
5297 __ PushSafepointRegisters(); | 5297 __ PushSafepointRegisters(); |
5298 __ PrepareCallCFunction(1, a0); | 5298 __ PrepareCallCFunction(1, a0); |
5299 __ li(a0, Operand(ExternalReference::isolate_address(isolate))); | 5299 __ li(a0, Operand(ExternalReference::isolate_address(isolate))); |
5300 __ CallCFunction(ExternalReference::log_enter_external_function(isolate), | 5300 __ CallCFunction(ExternalReference::log_enter_external_function(isolate), |
5301 1); | 5301 1); |
5302 __ PopSafepointRegisters(); | 5302 __ PopSafepointRegisters(); |
5303 } | 5303 } |
(...skipping 20 matching lines...) Expand all Loading... |
5324 Label return_value_loaded; | 5324 Label return_value_loaded; |
5325 | 5325 |
5326 // Load value from ReturnValue. | 5326 // Load value from ReturnValue. |
5327 __ ld(v0, return_value_operand); | 5327 __ ld(v0, return_value_operand); |
5328 __ bind(&return_value_loaded); | 5328 __ bind(&return_value_loaded); |
5329 | 5329 |
5330 // No more valid handles (the result handle was the last one). Restore | 5330 // No more valid handles (the result handle was the last one). Restore |
5331 // previous handle scope. | 5331 // previous handle scope. |
5332 __ sd(s0, MemOperand(s3, kNextOffset)); | 5332 __ sd(s0, MemOperand(s3, kNextOffset)); |
5333 if (__ emit_debug_code()) { | 5333 if (__ emit_debug_code()) { |
5334 __ ld(a1, MemOperand(s3, kLevelOffset)); | 5334 __ lw(a1, MemOperand(s3, kLevelOffset)); |
5335 __ Check(eq, kUnexpectedLevelAfterReturnFromApiCall, a1, Operand(s2)); | 5335 __ Check(eq, kUnexpectedLevelAfterReturnFromApiCall, a1, Operand(s2)); |
5336 } | 5336 } |
5337 __ Dsubu(s2, s2, Operand(1)); | 5337 __ Subu(s2, s2, Operand(1)); |
5338 __ sd(s2, MemOperand(s3, kLevelOffset)); | 5338 __ sw(s2, MemOperand(s3, kLevelOffset)); |
5339 __ ld(at, MemOperand(s3, kLimitOffset)); | 5339 __ ld(at, MemOperand(s3, kLimitOffset)); |
5340 __ Branch(&delete_allocated_handles, ne, s1, Operand(at)); | 5340 __ Branch(&delete_allocated_handles, ne, s1, Operand(at)); |
5341 | 5341 |
5342 // Leave the API exit frame. | 5342 // Leave the API exit frame. |
5343 __ bind(&leave_exit_frame); | 5343 __ bind(&leave_exit_frame); |
5344 | 5344 |
5345 bool restore_context = context_restore_operand != NULL; | 5345 bool restore_context = context_restore_operand != NULL; |
5346 if (restore_context) { | 5346 if (restore_context) { |
5347 __ ld(cp, *context_restore_operand); | 5347 __ ld(cp, *context_restore_operand); |
5348 } | 5348 } |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5546 kStackUnwindSpace, kInvalidStackOffset, | 5546 kStackUnwindSpace, kInvalidStackOffset, |
5547 MemOperand(fp, 6 * kPointerSize), NULL); | 5547 MemOperand(fp, 6 * kPointerSize), NULL); |
5548 } | 5548 } |
5549 | 5549 |
5550 | 5550 |
5551 #undef __ | 5551 #undef __ |
5552 | 5552 |
5553 } } // namespace v8::internal | 5553 } } // namespace v8::internal |
5554 | 5554 |
5555 #endif // V8_TARGET_ARCH_MIPS64 | 5555 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |