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

Side by Side Diff: src/crankshaft/mips/lithium-codegen-mips.cc

Issue 2542403002: MIPS: Use JIC/JIALC offset when possible (Closed)
Patch Set: Fix deserialization problem, rebase to master Created 3 years, 8 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 368
369 Comment(";;; call deopt"); 369 Comment(";;; call deopt");
370 __ bind(&call_deopt_entry); 370 __ bind(&call_deopt_entry);
371 371
372 if (info()->saves_caller_doubles()) { 372 if (info()->saves_caller_doubles()) {
373 DCHECK(info()->IsStub()); 373 DCHECK(info()->IsStub());
374 RestoreCallerDoubles(); 374 RestoreCallerDoubles();
375 } 375 }
376 376
377 // Add the base address to the offset previously loaded in entry_offset. 377 // Add the base address to the offset previously loaded in entry_offset.
378 __ Addu(entry_offset, entry_offset, 378 __ Jump(entry_offset, Operand(ExternalReference::ForDeoptEntry(base)));
379 Operand(ExternalReference::ForDeoptEntry(base)));
380 __ Jump(entry_offset);
381 } 379 }
382 __ RecordComment("]"); 380 __ RecordComment("]");
383 381
384 // The deoptimization jump table is the last part of the instruction 382 // The deoptimization jump table is the last part of the instruction
385 // sequence. Mark the generated code as done unless we bailed out. 383 // sequence. Mark the generated code as done unless we bailed out.
386 if (!is_aborted()) status_ = DONE; 384 if (!is_aborted()) status_ = DONE;
387 return !is_aborted(); 385 return !is_aborted();
388 } 386 }
389 387
390 388
(...skipping 3140 matching lines...) Expand 10 before | Expand all | Expand 10 after
3531 if (instr->hydrogen()->IsTailCall()) { 3529 if (instr->hydrogen()->IsTailCall()) {
3532 if (NeedsEagerFrame()) __ LeaveFrame(StackFrame::INTERNAL); 3530 if (NeedsEagerFrame()) __ LeaveFrame(StackFrame::INTERNAL);
3533 3531
3534 if (instr->target()->IsConstantOperand()) { 3532 if (instr->target()->IsConstantOperand()) {
3535 LConstantOperand* target = LConstantOperand::cast(instr->target()); 3533 LConstantOperand* target = LConstantOperand::cast(instr->target());
3536 Handle<Code> code = Handle<Code>::cast(ToHandle(target)); 3534 Handle<Code> code = Handle<Code>::cast(ToHandle(target));
3537 __ Jump(code, RelocInfo::CODE_TARGET); 3535 __ Jump(code, RelocInfo::CODE_TARGET);
3538 } else { 3536 } else {
3539 DCHECK(instr->target()->IsRegister()); 3537 DCHECK(instr->target()->IsRegister());
3540 Register target = ToRegister(instr->target()); 3538 Register target = ToRegister(instr->target());
3541 __ Addu(target, target, Operand(Code::kHeaderSize - kHeapObjectTag)); 3539 __ Jump(target, Code::kHeaderSize - kHeapObjectTag);
3542 __ Jump(target);
3543 } 3540 }
3544 } else { 3541 } else {
3545 LPointerMap* pointers = instr->pointer_map(); 3542 LPointerMap* pointers = instr->pointer_map();
3546 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); 3543 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt);
3547 3544
3548 if (instr->target()->IsConstantOperand()) { 3545 if (instr->target()->IsConstantOperand()) {
3549 LConstantOperand* target = LConstantOperand::cast(instr->target()); 3546 LConstantOperand* target = LConstantOperand::cast(instr->target());
3550 Handle<Code> code = Handle<Code>::cast(ToHandle(target)); 3547 Handle<Code> code = Handle<Code>::cast(ToHandle(target));
3551 generator.BeforeCall(__ CallSize(code, RelocInfo::CODE_TARGET)); 3548 generator.BeforeCall(__ CallSize(code, RelocInfo::CODE_TARGET));
3552 __ Call(code, RelocInfo::CODE_TARGET); 3549 __ Call(code, RelocInfo::CODE_TARGET);
3553 } else { 3550 } else {
3554 DCHECK(instr->target()->IsRegister()); 3551 DCHECK(instr->target()->IsRegister());
3555 Register target = ToRegister(instr->target()); 3552 Register target = ToRegister(instr->target());
3556 generator.BeforeCall(__ CallSize(target)); 3553 generator.BeforeCall(__ CallSize(target));
3557 __ Addu(target, target, Operand(Code::kHeaderSize - kHeapObjectTag)); 3554 __ Call(target, Code::kHeaderSize - kHeapObjectTag);
3558 __ Call(target);
3559 } 3555 }
3560 generator.AfterCall(); 3556 generator.AfterCall();
3561 } 3557 }
3562 } 3558 }
3563 3559
3564 3560
3565 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { 3561 void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
3566 DCHECK(ToRegister(instr->context()).is(cp)); 3562 DCHECK(ToRegister(instr->context()).is(cp));
3567 DCHECK(ToRegister(instr->constructor()).is(a1)); 3563 DCHECK(ToRegister(instr->constructor()).is(a1));
3568 DCHECK(ToRegister(instr->result()).is(v0)); 3564 DCHECK(ToRegister(instr->result()).is(v0));
(...skipping 1843 matching lines...) Expand 10 before | Expand all | Expand 10 after
5412 __ lw(result, FieldMemOperand(scratch, 5408 __ lw(result, FieldMemOperand(scratch,
5413 FixedArray::kHeaderSize - kPointerSize)); 5409 FixedArray::kHeaderSize - kPointerSize));
5414 __ bind(deferred->exit()); 5410 __ bind(deferred->exit());
5415 __ bind(&done); 5411 __ bind(&done);
5416 } 5412 }
5417 5413
5418 #undef __ 5414 #undef __
5419 5415
5420 } // namespace internal 5416 } // namespace internal
5421 } // namespace v8 5417 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698