Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: src/mips64/code-stubs-mips64.cc

Issue 1220443002: MIPS: Fix unpredictable random failures after direct api function call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added asserts. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips64/assembler-mips64.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4074 matching lines...) Expand 10 before | Expand all | Expand 10 after
4085 } 4085 }
4086 __ Jump(t9); 4086 __ Jump(t9);
4087 } 4087 }
4088 4088
4089 4089
4090 void DirectCEntryStub::GenerateCall(MacroAssembler* masm, 4090 void DirectCEntryStub::GenerateCall(MacroAssembler* masm,
4091 Register target) { 4091 Register target) {
4092 intptr_t loc = 4092 intptr_t loc =
4093 reinterpret_cast<intptr_t>(GetCode().location()); 4093 reinterpret_cast<intptr_t>(GetCode().location());
4094 __ Move(t9, target); 4094 __ Move(t9, target);
4095 __ li(ra, Operand(loc, RelocInfo::CODE_TARGET), CONSTANT_SIZE); 4095 __ li(at, Operand(loc, RelocInfo::CODE_TARGET), CONSTANT_SIZE);
4096 __ Call(ra); 4096 __ Call(at);
4097 } 4097 }
4098 4098
4099 4099
4100 void NameDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm, 4100 void NameDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm,
4101 Label* miss, 4101 Label* miss,
4102 Label* done, 4102 Label* done,
4103 Register receiver, 4103 Register receiver,
4104 Register properties, 4104 Register properties,
4105 Handle<Name> name, 4105 Handle<Name> name,
4106 Register scratch0) { 4106 Register scratch0) {
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
5349 __ jmp(&end_profiler_check); 5349 __ jmp(&end_profiler_check);
5350 5350
5351 __ bind(&profiler_disabled); 5351 __ bind(&profiler_disabled);
5352 __ mov(t9, function_address); 5352 __ mov(t9, function_address);
5353 __ bind(&end_profiler_check); 5353 __ bind(&end_profiler_check);
5354 5354
5355 // Allocate HandleScope in callee-save registers. 5355 // Allocate HandleScope in callee-save registers.
5356 __ li(s3, Operand(next_address)); 5356 __ li(s3, Operand(next_address));
5357 __ ld(s0, MemOperand(s3, kNextOffset)); 5357 __ ld(s0, MemOperand(s3, kNextOffset));
5358 __ ld(s1, MemOperand(s3, kLimitOffset)); 5358 __ ld(s1, MemOperand(s3, kLimitOffset));
5359 __ ld(s2, MemOperand(s3, kLevelOffset)); 5359 __ lw(s2, MemOperand(s3, kLevelOffset));
5360 __ Daddu(s2, s2, Operand(1)); 5360 __ Addu(s2, s2, Operand(1));
5361 __ sd(s2, MemOperand(s3, kLevelOffset)); 5361 __ sw(s2, MemOperand(s3, kLevelOffset));
5362 5362
5363 if (FLAG_log_timer_events) { 5363 if (FLAG_log_timer_events) {
5364 FrameScope frame(masm, StackFrame::MANUAL); 5364 FrameScope frame(masm, StackFrame::MANUAL);
5365 __ PushSafepointRegisters(); 5365 __ PushSafepointRegisters();
5366 __ PrepareCallCFunction(1, a0); 5366 __ PrepareCallCFunction(1, a0);
5367 __ li(a0, Operand(ExternalReference::isolate_address(isolate))); 5367 __ li(a0, Operand(ExternalReference::isolate_address(isolate)));
5368 __ CallCFunction(ExternalReference::log_enter_external_function(isolate), 5368 __ CallCFunction(ExternalReference::log_enter_external_function(isolate),
5369 1); 5369 1);
5370 __ PopSafepointRegisters(); 5370 __ PopSafepointRegisters();
5371 } 5371 }
(...skipping 20 matching lines...) Expand all
5392 Label return_value_loaded; 5392 Label return_value_loaded;
5393 5393
5394 // Load value from ReturnValue. 5394 // Load value from ReturnValue.
5395 __ ld(v0, return_value_operand); 5395 __ ld(v0, return_value_operand);
5396 __ bind(&return_value_loaded); 5396 __ bind(&return_value_loaded);
5397 5397
5398 // No more valid handles (the result handle was the last one). Restore 5398 // No more valid handles (the result handle was the last one). Restore
5399 // previous handle scope. 5399 // previous handle scope.
5400 __ sd(s0, MemOperand(s3, kNextOffset)); 5400 __ sd(s0, MemOperand(s3, kNextOffset));
5401 if (__ emit_debug_code()) { 5401 if (__ emit_debug_code()) {
5402 __ ld(a1, MemOperand(s3, kLevelOffset)); 5402 __ lw(a1, MemOperand(s3, kLevelOffset));
5403 __ Check(eq, kUnexpectedLevelAfterReturnFromApiCall, a1, Operand(s2)); 5403 __ Check(eq, kUnexpectedLevelAfterReturnFromApiCall, a1, Operand(s2));
5404 } 5404 }
5405 __ Dsubu(s2, s2, Operand(1)); 5405 __ Subu(s2, s2, Operand(1));
5406 __ sd(s2, MemOperand(s3, kLevelOffset)); 5406 __ sw(s2, MemOperand(s3, kLevelOffset));
5407 __ ld(at, MemOperand(s3, kLimitOffset)); 5407 __ ld(at, MemOperand(s3, kLimitOffset));
5408 __ Branch(&delete_allocated_handles, ne, s1, Operand(at)); 5408 __ Branch(&delete_allocated_handles, ne, s1, Operand(at));
5409 5409
5410 // Leave the API exit frame. 5410 // Leave the API exit frame.
5411 __ bind(&leave_exit_frame); 5411 __ bind(&leave_exit_frame);
5412 5412
5413 bool restore_context = context_restore_operand != NULL; 5413 bool restore_context = context_restore_operand != NULL;
5414 if (restore_context) { 5414 if (restore_context) {
5415 __ ld(cp, *context_restore_operand); 5415 __ ld(cp, *context_restore_operand);
5416 } 5416 }
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
5615 MemOperand(fp, 6 * kPointerSize), NULL); 5615 MemOperand(fp, 6 * kPointerSize), NULL);
5616 } 5616 }
5617 5617
5618 5618
5619 #undef __ 5619 #undef __
5620 5620
5621 } // namespace internal 5621 } // namespace internal
5622 } // namespace v8 5622 } // namespace v8
5623 5623
5624 #endif // V8_TARGET_ARCH_MIPS64 5624 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/assembler-mips64.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698