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

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

Issue 1848473002: [Interpreter] Changes GenerateDoubleToObject to push and pop rsi value. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: adds comments to test. Created 4 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
« no previous file with comments | « no previous file | src/x64/codegen-x64.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/ia32/codegen-ia32.h" 5 #include "src/ia32/codegen-ia32.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/heap/heap.h" 10 #include "src/heap/heap.h"
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 if (mode == TRACK_ALLOCATION_SITE) { 697 if (mode == TRACK_ALLOCATION_SITE) {
698 __ JumpIfJSArrayHasAllocationMemento(edx, edi, fail); 698 __ JumpIfJSArrayHasAllocationMemento(edx, edi, fail);
699 } 699 }
700 700
701 // Check for empty arrays, which only require a map transition and no changes 701 // Check for empty arrays, which only require a map transition and no changes
702 // to the backing store. 702 // to the backing store.
703 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); 703 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset));
704 __ cmp(edi, Immediate(masm->isolate()->factory()->empty_fixed_array())); 704 __ cmp(edi, Immediate(masm->isolate()->factory()->empty_fixed_array()));
705 __ j(equal, &only_change_map); 705 __ j(equal, &only_change_map);
706 706
707 __ push(esi);
707 __ push(eax); 708 __ push(eax);
708 __ push(edx); 709 __ push(edx);
709 __ push(ebx); 710 __ push(ebx);
710 711
711 __ mov(ebx, FieldOperand(edi, FixedDoubleArray::kLengthOffset)); 712 __ mov(ebx, FieldOperand(edi, FixedDoubleArray::kLengthOffset));
712 713
713 // Allocate new FixedArray. 714 // Allocate new FixedArray.
714 // ebx: length of source FixedDoubleArray (smi-tagged) 715 // ebx: length of source FixedDoubleArray (smi-tagged)
715 __ lea(edi, Operand(ebx, times_2, FixedArray::kHeaderSize)); 716 __ lea(edi, Operand(ebx, times_2, FixedArray::kHeaderSize));
716 __ Allocate(edi, eax, esi, no_reg, &gc_required, TAG_OBJECT); 717 __ Allocate(edi, eax, esi, no_reg, &gc_required, TAG_OBJECT);
(...skipping 29 matching lines...) Expand all
746 HeapObject::kMapOffset, 747 HeapObject::kMapOffset,
747 ebx, 748 ebx,
748 edi, 749 edi,
749 kDontSaveFPRegs, 750 kDontSaveFPRegs,
750 OMIT_REMEMBERED_SET, 751 OMIT_REMEMBERED_SET,
751 OMIT_SMI_CHECK); 752 OMIT_SMI_CHECK);
752 __ jmp(&success); 753 __ jmp(&success);
753 754
754 // Call into runtime if GC is required. 755 // Call into runtime if GC is required.
755 __ bind(&gc_required); 756 __ bind(&gc_required);
756 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
757 __ pop(ebx); 757 __ pop(ebx);
758 __ pop(edx); 758 __ pop(edx);
759 __ pop(eax); 759 __ pop(eax);
760 __ pop(esi);
760 __ jmp(fail); 761 __ jmp(fail);
761 762
762 // Box doubles into heap numbers. 763 // Box doubles into heap numbers.
763 // edi: source FixedDoubleArray 764 // edi: source FixedDoubleArray
764 // eax: destination FixedArray 765 // eax: destination FixedArray
765 __ bind(&loop); 766 __ bind(&loop);
766 // ebx: index of current element (smi-tagged) 767 // ebx: index of current element (smi-tagged)
767 uint32_t offset = FixedDoubleArray::kHeaderSize + sizeof(kHoleNanLower32); 768 uint32_t offset = FixedDoubleArray::kHeaderSize + sizeof(kHoleNanLower32);
768 __ cmp(FieldOperand(edi, ebx, times_4, offset), Immediate(kHoleNanUpper32)); 769 __ cmp(FieldOperand(edi, ebx, times_4, offset), Immediate(kHoleNanUpper32));
769 __ j(equal, &convert_hole); 770 __ j(equal, &convert_hole);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 __ RecordWriteField(edx, 812 __ RecordWriteField(edx,
812 JSObject::kElementsOffset, 813 JSObject::kElementsOffset,
813 eax, 814 eax,
814 edi, 815 edi,
815 kDontSaveFPRegs, 816 kDontSaveFPRegs,
816 EMIT_REMEMBERED_SET, 817 EMIT_REMEMBERED_SET,
817 OMIT_SMI_CHECK); 818 OMIT_SMI_CHECK);
818 819
819 // Restore registers. 820 // Restore registers.
820 __ pop(eax); 821 __ pop(eax);
821 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 822 __ pop(esi);
822 823
823 __ bind(&success); 824 __ bind(&success);
824 } 825 }
825 826
826 827
827 void StringCharLoadGenerator::Generate(MacroAssembler* masm, 828 void StringCharLoadGenerator::Generate(MacroAssembler* masm,
828 Factory* factory, 829 Factory* factory,
829 Register string, 830 Register string,
830 Register index, 831 Register index,
831 Register result, 832 Register result,
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 CodePatcher patcher(isolate, sequence, young_length); 1043 CodePatcher patcher(isolate, sequence, young_length);
1043 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); 1044 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32);
1044 } 1045 }
1045 } 1046 }
1046 1047
1047 1048
1048 } // namespace internal 1049 } // namespace internal
1049 } // namespace v8 1050 } // namespace v8
1050 1051
1051 #endif // V8_TARGET_ARCH_IA32 1052 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698