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 3161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3172 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || | 3172 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || |
3173 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { | 3173 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { |
3174 DwVfpRegister result = ToDoubleRegister(instr->result()); | 3174 DwVfpRegister result = ToDoubleRegister(instr->result()); |
3175 Operand operand = key_is_constant | 3175 Operand operand = key_is_constant |
3176 ? Operand(constant_key << element_size_shift) | 3176 ? Operand(constant_key << element_size_shift) |
3177 : Operand(key, LSL, shift_size); | 3177 : Operand(key, LSL, shift_size); |
3178 __ add(scratch0(), external_pointer, operand); | 3178 __ add(scratch0(), external_pointer, operand); |
3179 if (CpuFeatures::IsSupported(VFP2)) { | 3179 if (CpuFeatures::IsSupported(VFP2)) { |
3180 CpuFeatures::Scope scope(VFP2); | 3180 CpuFeatures::Scope scope(VFP2); |
3181 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { | 3181 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { |
3182 __ vldr(result.low(), scratch0(), additional_offset); | 3182 __ vldr(kScratchDoubleReg.low(), scratch0(), additional_offset); |
3183 __ vcvt_f64_f32(result, result.low()); | 3183 __ vcvt_f64_f32(result, kScratchDoubleReg.low()); |
3184 } else { // i.e. elements_kind == EXTERNAL_DOUBLE_ELEMENTS | 3184 } else { // i.e. elements_kind == EXTERNAL_DOUBLE_ELEMENTS |
3185 __ vldr(result, scratch0(), additional_offset); | 3185 __ vldr(result, scratch0(), additional_offset); |
3186 } | 3186 } |
3187 } else { | 3187 } else { |
3188 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { | 3188 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { |
3189 Register value = external_pointer; | 3189 Register value = external_pointer; |
3190 __ ldr(value, MemOperand(scratch0(), additional_offset)); | 3190 __ ldr(value, MemOperand(scratch0(), additional_offset)); |
3191 __ and_(sfpd_lo, value, Operand(kBinary32MantissaMask)); | 3191 __ and_(sfpd_lo, value, Operand(kBinary32MantissaMask)); |
3192 | 3192 |
3193 __ mov(scratch0(), Operand(value, LSR, kBinary32MantissaBits)); | 3193 __ mov(scratch0(), Operand(value, LSR, kBinary32MantissaBits)); |
(...skipping 2907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6101 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 6101 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
6102 __ ldr(result, FieldMemOperand(scratch, | 6102 __ ldr(result, FieldMemOperand(scratch, |
6103 FixedArray::kHeaderSize - kPointerSize)); | 6103 FixedArray::kHeaderSize - kPointerSize)); |
6104 __ bind(&done); | 6104 __ bind(&done); |
6105 } | 6105 } |
6106 | 6106 |
6107 | 6107 |
6108 #undef __ | 6108 #undef __ |
6109 | 6109 |
6110 } } // namespace v8::internal | 6110 } } // namespace v8::internal |
OLD | NEW |