Revision f230a1cf deps/v8/src/mips/codegen-mips.cc
deps/v8/src/mips/codegen-mips.cc | ||
---|---|---|
156 | 156 |
// ----------------------------------- |
157 | 157 |
if (mode == TRACK_ALLOCATION_SITE) { |
158 | 158 |
ASSERT(allocation_memento_found != NULL); |
159 |
masm->TestJSArrayForAllocationMemento(a2, t0, eq, |
|
160 |
allocation_memento_found); |
|
159 |
__ JumpIfJSArrayHasAllocationMemento(a2, t0, allocation_memento_found); |
|
161 | 160 |
} |
162 | 161 |
|
163 | 162 |
// Set transitioned map. |
... | ... | |
188 | 187 |
Register scratch = t6; |
189 | 188 |
|
190 | 189 |
if (mode == TRACK_ALLOCATION_SITE) { |
191 |
masm->TestJSArrayForAllocationMemento(a2, t0, eq, fail);
|
|
190 |
__ JumpIfJSArrayHasAllocationMemento(a2, t0, fail);
|
|
192 | 191 |
} |
193 | 192 |
|
194 | 193 |
// Check for empty arrays, which only require a map transition and no changes |
... | ... | |
316 | 315 |
Label entry, loop, convert_hole, gc_required, only_change_map; |
317 | 316 |
|
318 | 317 |
if (mode == TRACK_ALLOCATION_SITE) { |
319 |
masm->TestJSArrayForAllocationMemento(a2, t0, eq, fail);
|
|
318 |
__ JumpIfJSArrayHasAllocationMemento(a2, t0, fail);
|
|
320 | 319 |
} |
321 | 320 |
|
322 | 321 |
// Check for empty arrays, which only require a map transition and no changes |
... | ... | |
540 | 539 |
ASSERT(!temp2.is(temp3)); |
541 | 540 |
ASSERT(ExternalReference::math_exp_constants(0).address() != NULL); |
542 | 541 |
|
543 |
Label done; |
|
542 |
Label zero, infinity, done;
|
|
544 | 543 |
|
545 | 544 |
__ li(temp3, Operand(ExternalReference::math_exp_constants(0))); |
546 | 545 |
|
547 | 546 |
__ ldc1(double_scratch1, ExpConstant(0, temp3)); |
548 |
__ Move(result, kDoubleRegZero);
|
|
549 |
__ BranchF(&done, NULL, ge, double_scratch1, input); |
|
547 |
__ BranchF(&zero, NULL, ge, double_scratch1, input);
|
|
548 |
|
|
550 | 549 |
__ ldc1(double_scratch2, ExpConstant(1, temp3)); |
551 |
__ ldc1(result, ExpConstant(2, temp3));
|
|
552 |
__ BranchF(&done, NULL, ge, input, double_scratch2); |
|
550 |
__ BranchF(&infinity, NULL, ge, input, double_scratch2);
|
|
551 |
|
|
553 | 552 |
__ ldc1(double_scratch1, ExpConstant(3, temp3)); |
554 | 553 |
__ ldc1(result, ExpConstant(4, temp3)); |
555 | 554 |
__ mul_d(double_scratch1, double_scratch1, input); |
556 | 555 |
__ add_d(double_scratch1, double_scratch1, result); |
557 |
__ Move(temp2, temp1, double_scratch1);
|
|
556 |
__ FmoveLow(temp2, double_scratch1);
|
|
558 | 557 |
__ sub_d(double_scratch1, double_scratch1, result); |
559 | 558 |
__ ldc1(result, ExpConstant(6, temp3)); |
560 | 559 |
__ ldc1(double_scratch2, ExpConstant(5, temp3)); |
561 | 560 |
__ mul_d(double_scratch1, double_scratch1, double_scratch2); |
562 | 561 |
__ sub_d(double_scratch1, double_scratch1, input); |
563 | 562 |
__ sub_d(result, result, double_scratch1); |
564 |
__ mul_d(input, double_scratch1, double_scratch1); |
|
565 |
__ mul_d(result, result, input); |
|
566 |
__ srl(temp1, temp2, 11); |
|
563 |
__ mul_d(double_scratch2, double_scratch1, double_scratch1); |
|
564 |
__ mul_d(result, result, double_scratch2); |
|
567 | 565 |
__ ldc1(double_scratch2, ExpConstant(7, temp3)); |
568 | 566 |
__ mul_d(result, result, double_scratch2); |
569 | 567 |
__ sub_d(result, result, double_scratch1); |
570 |
__ ldc1(double_scratch2, ExpConstant(8, temp3)); |
|
568 |
// Mov 1 in double_scratch2 as math_exp_constants_array[8] == 1. |
|
569 |
ASSERT(*reinterpret_cast<double*> |
|
570 |
(ExternalReference::math_exp_constants(8).address()) == 1); |
|
571 |
__ Move(double_scratch2, 1); |
|
571 | 572 |
__ add_d(result, result, double_scratch2); |
572 |
__ li(at, 0x7ff);
|
|
573 |
__ And(temp2, temp2, at);
|
|
573 |
__ srl(temp1, temp2, 11);
|
|
574 |
__ Ext(temp2, temp2, 0, 11);
|
|
574 | 575 |
__ Addu(temp1, temp1, Operand(0x3ff)); |
575 |
__ sll(temp1, temp1, 20); |
|
576 | 576 |
|
577 | 577 |
// Must not call ExpConstant() after overwriting temp3! |
578 | 578 |
__ li(temp3, Operand(ExternalReference::math_exp_log_table())); |
579 | 579 |
__ sll(at, temp2, 3); |
580 |
__ addu(at, at, temp3); |
|
581 |
__ lw(at, MemOperand(at)); |
|
582 |
__ Addu(temp3, temp3, Operand(kPointerSize)); |
|
583 |
__ sll(temp2, temp2, 3); |
|
584 |
__ addu(temp2, temp2, temp3); |
|
585 |
__ lw(temp2, MemOperand(temp2)); |
|
586 |
__ Or(temp1, temp1, temp2); |
|
587 |
__ Move(input, at, temp1); |
|
588 |
__ mul_d(result, result, input); |
|
580 |
__ Addu(temp3, temp3, Operand(at)); |
|
581 |
__ lw(temp2, MemOperand(temp3, 0)); |
|
582 |
__ lw(temp3, MemOperand(temp3, kPointerSize)); |
|
583 |
// The first word is loaded is the lower number register. |
|
584 |
if (temp2.code() < temp3.code()) { |
|
585 |
__ sll(at, temp1, 20); |
|
586 |
__ Or(temp1, temp3, at); |
|
587 |
__ Move(double_scratch1, temp2, temp1); |
|
588 |
} else { |
|
589 |
__ sll(at, temp1, 20); |
|
590 |
__ Or(temp1, temp2, at); |
|
591 |
__ Move(double_scratch1, temp3, temp1); |
|
592 |
} |
|
593 |
__ mul_d(result, result, double_scratch1); |
|
594 |
__ Branch(&done); |
|
595 |
|
|
596 |
__ bind(&zero); |
|
597 |
__ Move(result, kDoubleRegZero); |
|
598 |
__ Branch(&done); |
|
599 |
|
|
600 |
__ bind(&infinity); |
|
601 |
__ ldc1(result, ExpConstant(2, temp3)); |
|
602 |
|
|
589 | 603 |
__ bind(&done); |
590 | 604 |
} |
591 | 605 |
|
... | ... | |
624 | 638 |
void Code::GetCodeAgeAndParity(byte* sequence, Age* age, |
625 | 639 |
MarkingParity* parity) { |
626 | 640 |
if (IsYoungSequence(sequence)) { |
627 |
*age = kNoAge; |
|
641 |
*age = kNoAgeCodeAge;
|
|
628 | 642 |
*parity = NO_MARKING_PARITY; |
629 | 643 |
} else { |
630 | 644 |
Address target_address = Memory::Address_at( |
... | ... | |
635 | 649 |
} |
636 | 650 |
|
637 | 651 |
|
638 |
void Code::PatchPlatformCodeAge(byte* sequence, |
|
652 |
void Code::PatchPlatformCodeAge(Isolate* isolate, |
|
653 |
byte* sequence, |
|
639 | 654 |
Code::Age age, |
640 | 655 |
MarkingParity parity) { |
641 | 656 |
uint32_t young_length; |
642 | 657 |
byte* young_sequence = GetNoCodeAgeSequence(&young_length); |
643 |
if (age == kNoAge) { |
|
658 |
if (age == kNoAgeCodeAge) {
|
|
644 | 659 |
CopyBytes(sequence, young_sequence, young_length); |
645 | 660 |
CPU::FlushICache(sequence, young_length); |
646 | 661 |
} else { |
647 |
Code* stub = GetCodeAgeStub(age, parity); |
|
662 |
Code* stub = GetCodeAgeStub(isolate, age, parity);
|
|
648 | 663 |
CodePatcher patcher(sequence, young_length / Assembler::kInstrSize); |
649 | 664 |
// Mark this code sequence for FindPlatformCodeAgeSequence() |
650 | 665 |
patcher.masm()->nop(Assembler::CODE_AGE_MARKER_NOP); |
Also available in: Unified diff