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

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

Issue 394913002: MIPS: Minor fixes to r22396 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/mips64/codegen-mips64.cc » ('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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/macro-assembler.h" 10 #include "src/macro-assembler.h"
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 // scratch3: begin of FixedDoubleArray element fields, not tagged 779 // scratch3: begin of FixedDoubleArray element fields, not tagged
780 __ Branch(USE_DELAY_SLOT, &entry); 780 __ Branch(USE_DELAY_SLOT, &entry);
781 __ li(hole_upper, Operand(kHoleNanUpper32)); // In delay slot. 781 __ li(hole_upper, Operand(kHoleNanUpper32)); // In delay slot.
782 782
783 __ bind(&only_change_map); 783 __ bind(&only_change_map);
784 __ sw(target_map, FieldMemOperand(receiver, HeapObject::kMapOffset)); 784 __ sw(target_map, FieldMemOperand(receiver, HeapObject::kMapOffset));
785 __ RecordWriteField(receiver, 785 __ RecordWriteField(receiver,
786 HeapObject::kMapOffset, 786 HeapObject::kMapOffset,
787 target_map, 787 target_map,
788 scratch2, 788 scratch2,
789 kRAHasNotBeenSaved, 789 kRAHasBeenSaved,
790 kDontSaveFPRegs, 790 kDontSaveFPRegs,
791 OMIT_REMEMBERED_SET, 791 OMIT_REMEMBERED_SET,
792 OMIT_SMI_CHECK); 792 OMIT_SMI_CHECK);
793 __ Branch(&done); 793 __ Branch(&done);
794 794
795 // Call into runtime if GC is required. 795 // Call into runtime if GC is required.
796 __ bind(&gc_required); 796 __ bind(&gc_required);
797 __ lw(ra, MemOperand(sp, 0));
797 __ Branch(USE_DELAY_SLOT, fail); 798 __ Branch(USE_DELAY_SLOT, fail);
798 __ pop(ra); 799 __ addiu(sp, sp, kPointerSize); // In delay slot.
799 800
800 // Convert and copy elements. 801 // Convert and copy elements.
801 __ bind(&loop); 802 __ bind(&loop);
802 __ lw(scratch2, MemOperand(scratch1)); 803 __ lw(scratch2, MemOperand(scratch1));
803 __ Addu(scratch1, scratch1, kIntSize); 804 __ Addu(scratch1, scratch1, kIntSize);
804 // scratch2: current element 805 // scratch2: current element
805 __ UntagAndJumpIfNotSmi(scratch2, scratch2, &convert_hole); 806 __ UntagAndJumpIfNotSmi(scratch2, scratch2, &convert_hole);
806 807
807 // Normal smi, convert to double and store. 808 // Normal smi, convert to double and store.
808 __ mtc1(scratch2, f0); 809 __ mtc1(scratch2, f0);
809 __ cvt_d_w(f0, f0); 810 __ cvt_d_w(f0, f0);
810 __ sdc1(f0, MemOperand(scratch3)); 811 __ sdc1(f0, MemOperand(scratch3));
811 __ Branch(USE_DELAY_SLOT, &entry); 812 __ Branch(USE_DELAY_SLOT, &entry);
812 __ addiu(scratch3, scratch3, kDoubleSize); // In delay slot. 813 __ addiu(scratch3, scratch3, kDoubleSize); // In delay slot.
813 814
814 // Hole found, store the-hole NaN. 815 // Hole found, store the-hole NaN.
815 __ bind(&convert_hole); 816 __ bind(&convert_hole);
816 if (FLAG_debug_code) { 817 if (FLAG_debug_code) {
817 // Restore a "smi-untagged" heap object. 818 // Restore a "smi-untagged" heap object.
818 __ SmiTag(scratch2); 819 __ SmiTag(scratch2);
819 __ Or(scratch2, scratch2, Operand(1)); 820 __ Or(scratch2, scratch2, Operand(1));
820 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 821 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
821 __ Assert(eq, kObjectFoundInSmiOnlyArray, at, Operand(scratch2)); 822 __ Assert(eq, kObjectFoundInSmiOnlyArray, at, Operand(scratch2));
822 } 823 }
823 // mantissa 824 // mantissa
824 __ sw(hole_lower, MemOperand(scratch3, Register::kMantissaOffset)); 825 __ sw(hole_lower, MemOperand(scratch3, Register::kMantissaOffset));
825 // exponent 826 // exponent
826 __ sw(hole_upper, MemOperand(scratch3, Register::kExponentOffset)); 827 __ sw(hole_upper, MemOperand(scratch3, Register::kExponentOffset));
827 __ bind(&entry); 828 __ bind(&entry);
828 __ addiu(scratch3, scratch3, kDoubleSize); // In delay slot. 829 __ addiu(scratch3, scratch3, kDoubleSize);
829 830
830 __ Branch(&loop, lt, scratch3, Operand(array_end)); 831 __ Branch(&loop, lt, scratch3, Operand(array_end));
831 832
833 __ bind(&done);
832 __ pop(ra); 834 __ pop(ra);
833 __ bind(&done);
834 } 835 }
835 836
836 837
837 void ElementsTransitionGenerator::GenerateDoubleToObject( 838 void ElementsTransitionGenerator::GenerateDoubleToObject(
838 MacroAssembler* masm, 839 MacroAssembler* masm,
839 Register receiver, 840 Register receiver,
840 Register key, 841 Register key,
841 Register value, 842 Register value,
842 Register target_map, 843 Register target_map,
843 AllocationSiteMode mode, 844 AllocationSiteMode mode,
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 patcher.masm()->nop(); // Pad the empty space. 1241 patcher.masm()->nop(); // Pad the empty space.
1241 } 1242 }
1242 } 1243 }
1243 1244
1244 1245
1245 #undef __ 1246 #undef __
1246 1247
1247 } } // namespace v8::internal 1248 } } // namespace v8::internal
1248 1249
1249 #endif // V8_TARGET_ARCH_MIPS 1250 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips64/codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698