OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
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 2766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2777 } | 2777 } |
2778 | 2778 |
2779 | 2779 |
2780 void LCodeGen::DoLoadKeyedFastElement(LLoadKeyedFastElement* instr) { | 2780 void LCodeGen::DoLoadKeyedFastElement(LLoadKeyedFastElement* instr) { |
2781 Register elements = ToRegister(instr->elements()); | 2781 Register elements = ToRegister(instr->elements()); |
2782 Register key = EmitLoadRegister(instr->key(), scratch0()); | 2782 Register key = EmitLoadRegister(instr->key(), scratch0()); |
2783 Register result = ToRegister(instr->result()); | 2783 Register result = ToRegister(instr->result()); |
2784 Register scratch = scratch0(); | 2784 Register scratch = scratch0(); |
2785 | 2785 |
2786 // Load the result. | 2786 // Load the result. |
2787 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2)); | 2787 if (instr->hydrogen()->key()->representation().IsTagged()) { |
| 2788 __ add(scratch, elements, |
| 2789 Operand(key, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 2790 } else { |
| 2791 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2)); |
| 2792 } |
2788 uint32_t offset = FixedArray::kHeaderSize + | 2793 uint32_t offset = FixedArray::kHeaderSize + |
2789 (instr->additional_index() << kPointerSizeLog2); | 2794 (instr->additional_index() << kPointerSizeLog2); |
2790 __ ldr(result, FieldMemOperand(scratch, offset)); | 2795 __ ldr(result, FieldMemOperand(scratch, offset)); |
2791 | 2796 |
2792 // Check for the hole value. | 2797 // Check for the hole value. |
2793 if (instr->hydrogen()->RequiresHoleCheck()) { | 2798 if (instr->hydrogen()->RequiresHoleCheck()) { |
2794 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { | 2799 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { |
2795 __ tst(result, Operand(kSmiTagMask)); | 2800 __ tst(result, Operand(kSmiTagMask)); |
2796 DeoptimizeIf(ne, instr->environment()); | 2801 DeoptimizeIf(ne, instr->environment()); |
2797 } else { | 2802 } else { |
2798 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 2803 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
2799 __ cmp(result, scratch); | 2804 __ cmp(result, scratch); |
2800 DeoptimizeIf(eq, instr->environment()); | 2805 DeoptimizeIf(eq, instr->environment()); |
2801 } | 2806 } |
2802 } | 2807 } |
2803 } | 2808 } |
2804 | 2809 |
2805 | 2810 |
2806 void LCodeGen::DoLoadKeyedFastDoubleElement( | 2811 void LCodeGen::DoLoadKeyedFastDoubleElement( |
2807 LLoadKeyedFastDoubleElement* instr) { | 2812 LLoadKeyedFastDoubleElement* instr) { |
2808 Register elements = ToRegister(instr->elements()); | 2813 Register elements = ToRegister(instr->elements()); |
2809 bool key_is_constant = instr->key()->IsConstantOperand(); | 2814 bool key_is_constant = instr->key()->IsConstantOperand(); |
2810 Register key = no_reg; | 2815 Register key = no_reg; |
2811 DwVfpRegister result = ToDoubleRegister(instr->result()); | 2816 DwVfpRegister result = ToDoubleRegister(instr->result()); |
2812 Register scratch = scratch0(); | 2817 Register scratch = scratch0(); |
2813 | 2818 |
2814 int shift_size = | 2819 int element_size_shift = ElementsKindToShiftSize(FAST_DOUBLE_ELEMENTS); |
2815 ElementsKindToShiftSize(FAST_DOUBLE_ELEMENTS); | 2820 int shift_size = (instr->hydrogen()->key()->representation().IsTagged()) |
| 2821 ? (element_size_shift - kSmiTagSize) : element_size_shift; |
2816 int constant_key = 0; | 2822 int constant_key = 0; |
2817 if (key_is_constant) { | 2823 if (key_is_constant) { |
2818 constant_key = ToInteger32(LConstantOperand::cast(instr->key())); | 2824 constant_key = ToInteger32(LConstantOperand::cast(instr->key())); |
2819 if (constant_key & 0xF0000000) { | 2825 if (constant_key & 0xF0000000) { |
2820 Abort("array index constant value too big."); | 2826 Abort("array index constant value too big."); |
2821 } | 2827 } |
2822 } else { | 2828 } else { |
2823 key = ToRegister(instr->key()); | 2829 key = ToRegister(instr->key()); |
2824 } | 2830 } |
2825 | 2831 |
2826 Operand operand = key_is_constant | 2832 Operand operand = key_is_constant |
2827 ? Operand(((constant_key + instr->additional_index()) << shift_size) + | 2833 ? Operand(((constant_key + instr->additional_index()) << |
| 2834 element_size_shift) + |
2828 FixedDoubleArray::kHeaderSize - kHeapObjectTag) | 2835 FixedDoubleArray::kHeaderSize - kHeapObjectTag) |
2829 : Operand(key, LSL, shift_size); | 2836 : Operand(key, LSL, shift_size); |
2830 __ add(elements, elements, operand); | 2837 __ add(elements, elements, operand); |
2831 if (!key_is_constant) { | 2838 if (!key_is_constant) { |
2832 __ add(elements, elements, | 2839 __ add(elements, elements, |
2833 Operand((FixedDoubleArray::kHeaderSize - kHeapObjectTag) + | 2840 Operand((FixedDoubleArray::kHeaderSize - kHeapObjectTag) + |
2834 (instr->additional_index() << shift_size))); | 2841 (instr->additional_index() << element_size_shift))); |
2835 } | 2842 } |
2836 | 2843 |
2837 if (instr->hydrogen()->RequiresHoleCheck()) { | 2844 if (instr->hydrogen()->RequiresHoleCheck()) { |
2838 __ ldr(scratch, MemOperand(elements, sizeof(kHoleNanLower32))); | 2845 __ ldr(scratch, MemOperand(elements, sizeof(kHoleNanLower32))); |
2839 __ cmp(scratch, Operand(kHoleNanUpper32)); | 2846 __ cmp(scratch, Operand(kHoleNanUpper32)); |
2840 DeoptimizeIf(eq, instr->environment()); | 2847 DeoptimizeIf(eq, instr->environment()); |
2841 } | 2848 } |
2842 | 2849 |
2843 __ vldr(result, elements, 0); | 2850 __ vldr(result, elements, 0); |
2844 } | 2851 } |
2845 | 2852 |
2846 | 2853 |
| 2854 MemOperand LCodeGen::PrepareKeyedOperand(Register key, |
| 2855 Register base, |
| 2856 bool key_is_constant, |
| 2857 int constant_key, |
| 2858 int element_size, |
| 2859 int shift_size, |
| 2860 int additional_index, |
| 2861 int additional_offset) { |
| 2862 if (additional_index != 0 && !key_is_constant) { |
| 2863 additional_index *= 1 << (element_size - shift_size); |
| 2864 __ add(scratch0(), key, Operand(additional_index)); |
| 2865 } |
| 2866 |
| 2867 if (key_is_constant) { |
| 2868 return MemOperand(base, |
| 2869 (constant_key << element_size) + additional_offset); |
| 2870 } |
| 2871 |
| 2872 if (additional_index == 0) { |
| 2873 if (shift_size >= 0) { |
| 2874 return MemOperand(base, key, LSL, shift_size); |
| 2875 } else { |
| 2876 ASSERT_EQ(-1, shift_size); |
| 2877 return MemOperand(base, key, LSR, 1); |
| 2878 } |
| 2879 } |
| 2880 |
| 2881 if (shift_size >= 0) { |
| 2882 return MemOperand(base, scratch0(), LSL, shift_size); |
| 2883 } else { |
| 2884 ASSERT_EQ(-1, shift_size); |
| 2885 return MemOperand(base, scratch0(), LSR, 1); |
| 2886 } |
| 2887 } |
| 2888 |
| 2889 |
2847 void LCodeGen::DoLoadKeyedSpecializedArrayElement( | 2890 void LCodeGen::DoLoadKeyedSpecializedArrayElement( |
2848 LLoadKeyedSpecializedArrayElement* instr) { | 2891 LLoadKeyedSpecializedArrayElement* instr) { |
2849 Register external_pointer = ToRegister(instr->external_pointer()); | 2892 Register external_pointer = ToRegister(instr->external_pointer()); |
2850 Register key = no_reg; | 2893 Register key = no_reg; |
2851 ElementsKind elements_kind = instr->elements_kind(); | 2894 ElementsKind elements_kind = instr->elements_kind(); |
2852 bool key_is_constant = instr->key()->IsConstantOperand(); | 2895 bool key_is_constant = instr->key()->IsConstantOperand(); |
2853 int constant_key = 0; | 2896 int constant_key = 0; |
2854 if (key_is_constant) { | 2897 if (key_is_constant) { |
2855 constant_key = ToInteger32(LConstantOperand::cast(instr->key())); | 2898 constant_key = ToInteger32(LConstantOperand::cast(instr->key())); |
2856 if (constant_key & 0xF0000000) { | 2899 if (constant_key & 0xF0000000) { |
2857 Abort("array index constant value too big."); | 2900 Abort("array index constant value too big."); |
2858 } | 2901 } |
2859 } else { | 2902 } else { |
2860 key = ToRegister(instr->key()); | 2903 key = ToRegister(instr->key()); |
2861 } | 2904 } |
2862 int shift_size = ElementsKindToShiftSize(elements_kind); | 2905 int element_size_shift = ElementsKindToShiftSize(elements_kind); |
2863 int additional_offset = instr->additional_index() << shift_size; | 2906 int shift_size = (instr->hydrogen()->key()->representation().IsTagged()) |
| 2907 ? (element_size_shift - kSmiTagSize) : element_size_shift; |
| 2908 int additional_offset = instr->additional_index() << element_size_shift; |
2864 | 2909 |
2865 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || | 2910 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || |
2866 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { | 2911 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { |
2867 CpuFeatures::Scope scope(VFP3); | 2912 CpuFeatures::Scope scope(VFP3); |
2868 DwVfpRegister result = ToDoubleRegister(instr->result()); | 2913 DwVfpRegister result = ToDoubleRegister(instr->result()); |
2869 Operand operand = key_is_constant | 2914 Operand operand = key_is_constant |
2870 ? Operand(constant_key << shift_size) | 2915 ? Operand(constant_key << element_size_shift) |
2871 : Operand(key, LSL, shift_size); | 2916 : Operand(key, LSL, shift_size); |
2872 __ add(scratch0(), external_pointer, operand); | 2917 __ add(scratch0(), external_pointer, operand); |
2873 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { | 2918 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { |
2874 __ vldr(result.low(), scratch0(), additional_offset); | 2919 __ vldr(result.low(), scratch0(), additional_offset); |
2875 __ vcvt_f64_f32(result, result.low()); | 2920 __ vcvt_f64_f32(result, result.low()); |
2876 } else { // i.e. elements_kind == EXTERNAL_DOUBLE_ELEMENTS | 2921 } else { // i.e. elements_kind == EXTERNAL_DOUBLE_ELEMENTS |
2877 __ vldr(result, scratch0(), additional_offset); | 2922 __ vldr(result, scratch0(), additional_offset); |
2878 } | 2923 } |
2879 } else { | 2924 } else { |
2880 Register result = ToRegister(instr->result()); | 2925 Register result = ToRegister(instr->result()); |
2881 if (instr->additional_index() != 0 && !key_is_constant) { | 2926 MemOperand mem_operand = PrepareKeyedOperand( |
2882 __ add(scratch0(), key, Operand(instr->additional_index())); | 2927 key, external_pointer, key_is_constant, constant_key, |
2883 } | 2928 element_size_shift, shift_size, |
2884 MemOperand mem_operand(key_is_constant | 2929 instr->additional_index(), additional_offset); |
2885 ? MemOperand(external_pointer, | |
2886 (constant_key << shift_size) + additional_offset) | |
2887 : (instr->additional_index() == 0 | |
2888 ? MemOperand(external_pointer, key, LSL, shift_size) | |
2889 : MemOperand(external_pointer, scratch0(), LSL, shift_size))); | |
2890 switch (elements_kind) { | 2930 switch (elements_kind) { |
2891 case EXTERNAL_BYTE_ELEMENTS: | 2931 case EXTERNAL_BYTE_ELEMENTS: |
2892 __ ldrsb(result, mem_operand); | 2932 __ ldrsb(result, mem_operand); |
2893 break; | 2933 break; |
2894 case EXTERNAL_PIXEL_ELEMENTS: | 2934 case EXTERNAL_PIXEL_ELEMENTS: |
2895 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 2935 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
2896 __ ldrb(result, mem_operand); | 2936 __ ldrb(result, mem_operand); |
2897 break; | 2937 break; |
2898 case EXTERNAL_SHORT_ELEMENTS: | 2938 case EXTERNAL_SHORT_ELEMENTS: |
2899 __ ldrsh(result, mem_operand); | 2939 __ ldrsh(result, mem_operand); |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3796 | 3836 |
3797 // Do the store. | 3837 // Do the store. |
3798 if (instr->key()->IsConstantOperand()) { | 3838 if (instr->key()->IsConstantOperand()) { |
3799 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); | 3839 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |
3800 LConstantOperand* const_operand = LConstantOperand::cast(instr->key()); | 3840 LConstantOperand* const_operand = LConstantOperand::cast(instr->key()); |
3801 int offset = | 3841 int offset = |
3802 (ToInteger32(const_operand) + instr->additional_index()) * kPointerSize | 3842 (ToInteger32(const_operand) + instr->additional_index()) * kPointerSize |
3803 + FixedArray::kHeaderSize; | 3843 + FixedArray::kHeaderSize; |
3804 __ str(value, FieldMemOperand(elements, offset)); | 3844 __ str(value, FieldMemOperand(elements, offset)); |
3805 } else { | 3845 } else { |
3806 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2)); | 3846 if (instr->hydrogen()->key()->representation().IsTagged()) { |
| 3847 __ add(scratch, elements, |
| 3848 Operand(key, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 3849 } else { |
| 3850 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2)); |
| 3851 } |
3807 if (instr->additional_index() != 0) { | 3852 if (instr->additional_index() != 0) { |
3808 __ add(scratch, | 3853 __ add(scratch, |
3809 scratch, | 3854 scratch, |
3810 Operand(instr->additional_index() << kPointerSizeLog2)); | 3855 Operand(instr->additional_index() << kPointerSizeLog2)); |
3811 } | 3856 } |
3812 __ str(value, FieldMemOperand(scratch, FixedArray::kHeaderSize)); | 3857 __ str(value, FieldMemOperand(scratch, FixedArray::kHeaderSize)); |
3813 } | 3858 } |
3814 | 3859 |
3815 if (instr->hydrogen()->NeedsWriteBarrier()) { | 3860 if (instr->hydrogen()->NeedsWriteBarrier()) { |
3816 HType type = instr->hydrogen()->value()->type(); | 3861 HType type = instr->hydrogen()->value()->type(); |
(...skipping 24 matching lines...) Expand all Loading... |
3841 // Calculate the effective address of the slot in the array to store the | 3886 // Calculate the effective address of the slot in the array to store the |
3842 // double value. | 3887 // double value. |
3843 if (key_is_constant) { | 3888 if (key_is_constant) { |
3844 constant_key = ToInteger32(LConstantOperand::cast(instr->key())); | 3889 constant_key = ToInteger32(LConstantOperand::cast(instr->key())); |
3845 if (constant_key & 0xF0000000) { | 3890 if (constant_key & 0xF0000000) { |
3846 Abort("array index constant value too big."); | 3891 Abort("array index constant value too big."); |
3847 } | 3892 } |
3848 } else { | 3893 } else { |
3849 key = ToRegister(instr->key()); | 3894 key = ToRegister(instr->key()); |
3850 } | 3895 } |
3851 int shift_size = ElementsKindToShiftSize(FAST_DOUBLE_ELEMENTS); | 3896 int element_size_shift = ElementsKindToShiftSize(FAST_DOUBLE_ELEMENTS); |
| 3897 int shift_size = (instr->hydrogen()->key()->representation().IsTagged()) |
| 3898 ? (element_size_shift - kSmiTagSize) : element_size_shift; |
3852 Operand operand = key_is_constant | 3899 Operand operand = key_is_constant |
3853 ? Operand((constant_key << shift_size) + | 3900 ? Operand((constant_key << element_size_shift) + |
3854 FixedDoubleArray::kHeaderSize - kHeapObjectTag) | 3901 FixedDoubleArray::kHeaderSize - kHeapObjectTag) |
3855 : Operand(key, LSL, shift_size); | 3902 : Operand(key, LSL, shift_size); |
3856 __ add(scratch, elements, operand); | 3903 __ add(scratch, elements, operand); |
3857 if (!key_is_constant) { | 3904 if (!key_is_constant) { |
3858 __ add(scratch, scratch, | 3905 __ add(scratch, scratch, |
3859 Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag)); | 3906 Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag)); |
3860 } | 3907 } |
3861 | 3908 |
3862 if (instr->NeedsCanonicalization()) { | 3909 if (instr->NeedsCanonicalization()) { |
3863 // Check for NaN. All NaNs must be canonicalized. | 3910 // Check for NaN. All NaNs must be canonicalized. |
3864 __ VFPCompareAndSetFlags(value, value); | 3911 __ VFPCompareAndSetFlags(value, value); |
3865 // Only load canonical NaN if the comparison above set the overflow. | 3912 // Only load canonical NaN if the comparison above set the overflow. |
3866 __ Vmov(value, | 3913 __ Vmov(value, |
3867 FixedDoubleArray::canonical_not_the_hole_nan_as_double(), | 3914 FixedDoubleArray::canonical_not_the_hole_nan_as_double(), |
3868 vs); | 3915 vs); |
3869 } | 3916 } |
3870 | 3917 |
3871 __ vstr(value, scratch, instr->additional_index() << shift_size); | 3918 __ vstr(value, scratch, instr->additional_index() << element_size_shift); |
3872 } | 3919 } |
3873 | 3920 |
3874 | 3921 |
3875 void LCodeGen::DoStoreKeyedSpecializedArrayElement( | 3922 void LCodeGen::DoStoreKeyedSpecializedArrayElement( |
3876 LStoreKeyedSpecializedArrayElement* instr) { | 3923 LStoreKeyedSpecializedArrayElement* instr) { |
3877 | 3924 |
3878 Register external_pointer = ToRegister(instr->external_pointer()); | 3925 Register external_pointer = ToRegister(instr->external_pointer()); |
3879 Register key = no_reg; | 3926 Register key = no_reg; |
3880 ElementsKind elements_kind = instr->elements_kind(); | 3927 ElementsKind elements_kind = instr->elements_kind(); |
3881 bool key_is_constant = instr->key()->IsConstantOperand(); | 3928 bool key_is_constant = instr->key()->IsConstantOperand(); |
3882 int constant_key = 0; | 3929 int constant_key = 0; |
3883 if (key_is_constant) { | 3930 if (key_is_constant) { |
3884 constant_key = ToInteger32(LConstantOperand::cast(instr->key())); | 3931 constant_key = ToInteger32(LConstantOperand::cast(instr->key())); |
3885 if (constant_key & 0xF0000000) { | 3932 if (constant_key & 0xF0000000) { |
3886 Abort("array index constant value too big."); | 3933 Abort("array index constant value too big."); |
3887 } | 3934 } |
3888 } else { | 3935 } else { |
3889 key = ToRegister(instr->key()); | 3936 key = ToRegister(instr->key()); |
3890 } | 3937 } |
3891 int shift_size = ElementsKindToShiftSize(elements_kind); | 3938 int element_size_shift = ElementsKindToShiftSize(elements_kind); |
3892 int additional_offset = instr->additional_index() << shift_size; | 3939 int shift_size = (instr->hydrogen()->key()->representation().IsTagged()) |
| 3940 ? (element_size_shift - kSmiTagSize) : element_size_shift; |
| 3941 int additional_offset = instr->additional_index() << element_size_shift; |
3893 | 3942 |
3894 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || | 3943 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || |
3895 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { | 3944 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { |
3896 CpuFeatures::Scope scope(VFP3); | 3945 CpuFeatures::Scope scope(VFP3); |
3897 DwVfpRegister value(ToDoubleRegister(instr->value())); | 3946 DwVfpRegister value(ToDoubleRegister(instr->value())); |
3898 Operand operand(key_is_constant ? Operand(constant_key << shift_size) | 3947 Operand operand(key_is_constant |
3899 : Operand(key, LSL, shift_size)); | 3948 ? Operand(constant_key << element_size_shift) |
| 3949 : Operand(key, LSL, shift_size)); |
3900 __ add(scratch0(), external_pointer, operand); | 3950 __ add(scratch0(), external_pointer, operand); |
3901 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { | 3951 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { |
3902 __ vcvt_f32_f64(double_scratch0().low(), value); | 3952 __ vcvt_f32_f64(double_scratch0().low(), value); |
3903 __ vstr(double_scratch0().low(), scratch0(), additional_offset); | 3953 __ vstr(double_scratch0().low(), scratch0(), additional_offset); |
3904 } else { // i.e. elements_kind == EXTERNAL_DOUBLE_ELEMENTS | 3954 } else { // i.e. elements_kind == EXTERNAL_DOUBLE_ELEMENTS |
3905 __ vstr(value, scratch0(), additional_offset); | 3955 __ vstr(value, scratch0(), additional_offset); |
3906 } | 3956 } |
3907 } else { | 3957 } else { |
3908 Register value(ToRegister(instr->value())); | 3958 Register value(ToRegister(instr->value())); |
3909 if (instr->additional_index() != 0 && !key_is_constant) { | 3959 MemOperand mem_operand = PrepareKeyedOperand( |
3910 __ add(scratch0(), key, Operand(instr->additional_index())); | 3960 key, external_pointer, key_is_constant, constant_key, |
3911 } | 3961 element_size_shift, shift_size, |
3912 MemOperand mem_operand(key_is_constant | 3962 instr->additional_index(), additional_offset); |
3913 ? MemOperand(external_pointer, | |
3914 ((constant_key + instr->additional_index()) | |
3915 << shift_size)) | |
3916 : (instr->additional_index() == 0 | |
3917 ? MemOperand(external_pointer, key, LSL, shift_size) | |
3918 : MemOperand(external_pointer, scratch0(), LSL, shift_size))); | |
3919 switch (elements_kind) { | 3963 switch (elements_kind) { |
3920 case EXTERNAL_PIXEL_ELEMENTS: | 3964 case EXTERNAL_PIXEL_ELEMENTS: |
3921 case EXTERNAL_BYTE_ELEMENTS: | 3965 case EXTERNAL_BYTE_ELEMENTS: |
3922 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 3966 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
3923 __ strb(value, mem_operand); | 3967 __ strb(value, mem_operand); |
3924 break; | 3968 break; |
3925 case EXTERNAL_SHORT_ELEMENTS: | 3969 case EXTERNAL_SHORT_ELEMENTS: |
3926 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 3970 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
3927 __ strh(value, mem_operand); | 3971 __ strh(value, mem_operand); |
3928 break; | 3972 break; |
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5403 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 5447 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
5404 __ ldr(result, FieldMemOperand(scratch, | 5448 __ ldr(result, FieldMemOperand(scratch, |
5405 FixedArray::kHeaderSize - kPointerSize)); | 5449 FixedArray::kHeaderSize - kPointerSize)); |
5406 __ bind(&done); | 5450 __ bind(&done); |
5407 } | 5451 } |
5408 | 5452 |
5409 | 5453 |
5410 #undef __ | 5454 #undef __ |
5411 | 5455 |
5412 } } // namespace v8::internal | 5456 } } // namespace v8::internal |
OLD | NEW |