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 3015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3026 | 3026 |
3027 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || | 3027 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || |
3028 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { | 3028 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { |
3029 CpuFeatures::Scope scope(VFP3); | 3029 CpuFeatures::Scope scope(VFP3); |
3030 DwVfpRegister result = ToDoubleRegister(instr->result()); | 3030 DwVfpRegister result = ToDoubleRegister(instr->result()); |
3031 Operand operand = key_is_constant | 3031 Operand operand = key_is_constant |
3032 ? Operand(constant_key << element_size_shift) | 3032 ? Operand(constant_key << element_size_shift) |
3033 : Operand(key, LSL, shift_size); | 3033 : Operand(key, LSL, shift_size); |
3034 __ add(scratch0(), external_pointer, operand); | 3034 __ add(scratch0(), external_pointer, operand); |
3035 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { | 3035 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { |
3036 __ vldr(result.low(), scratch0(), additional_offset); | 3036 __ vldr(kScratchDoubleReg.low(), scratch0(), additional_offset); |
3037 __ vcvt_f64_f32(result, result.low()); | 3037 __ vcvt_f64_f32(result, kScratchDoubleReg.low()); |
3038 } else { // i.e. elements_kind == EXTERNAL_DOUBLE_ELEMENTS | 3038 } else { // i.e. elements_kind == EXTERNAL_DOUBLE_ELEMENTS |
3039 __ vldr(result, scratch0(), additional_offset); | 3039 __ vldr(result, scratch0(), additional_offset); |
3040 } | 3040 } |
3041 } else { | 3041 } else { |
3042 Register result = ToRegister(instr->result()); | 3042 Register result = ToRegister(instr->result()); |
3043 MemOperand mem_operand = PrepareKeyedOperand( | 3043 MemOperand mem_operand = PrepareKeyedOperand( |
3044 key, external_pointer, key_is_constant, constant_key, | 3044 key, external_pointer, key_is_constant, constant_key, |
3045 element_size_shift, shift_size, | 3045 element_size_shift, shift_size, |
3046 instr->additional_index(), additional_offset); | 3046 instr->additional_index(), additional_offset); |
3047 switch (elements_kind) { | 3047 switch (elements_kind) { |
(...skipping 2748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5796 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 5796 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
5797 __ ldr(result, FieldMemOperand(scratch, | 5797 __ ldr(result, FieldMemOperand(scratch, |
5798 FixedArray::kHeaderSize - kPointerSize)); | 5798 FixedArray::kHeaderSize - kPointerSize)); |
5799 __ bind(&done); | 5799 __ bind(&done); |
5800 } | 5800 } |
5801 | 5801 |
5802 | 5802 |
5803 #undef __ | 5803 #undef __ |
5804 | 5804 |
5805 } } // namespace v8::internal | 5805 } } // namespace v8::internal |
OLD | NEW |