OLD | NEW |
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/arm/codegen-arm.h" | 5 #include "src/arm/codegen-arm.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size), | 32 MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size), |
33 CodeObjectRequired::kNo); | 33 CodeObjectRequired::kNo); |
34 | 34 |
35 Register dest = r0; | 35 Register dest = r0; |
36 Register src = r1; | 36 Register src = r1; |
37 Register chars = r2; | 37 Register chars = r2; |
38 Register temp1 = r3; | 38 Register temp1 = r3; |
39 Label less_4; | 39 Label less_4; |
40 | 40 |
41 if (CpuFeatures::IsSupported(NEON)) { | 41 if (CpuFeatures::IsSupported(NEON)) { |
| 42 CpuFeatureScope scope(&masm, NEON); |
42 Label loop, less_256, less_128, less_64, less_32, _16_or_less, _8_or_less; | 43 Label loop, less_256, less_128, less_64, less_32, _16_or_less, _8_or_less; |
43 Label size_less_than_8; | 44 Label size_less_than_8; |
44 __ pld(MemOperand(src, 0)); | 45 __ pld(MemOperand(src, 0)); |
45 | 46 |
46 __ cmp(chars, Operand(8)); | 47 __ cmp(chars, Operand(8)); |
47 __ b(lt, &size_less_than_8); | 48 __ b(lt, &size_less_than_8); |
48 __ cmp(chars, Operand(32)); | 49 __ cmp(chars, Operand(32)); |
49 __ b(lt, &less_32); | 50 __ b(lt, &less_32); |
50 if (CpuFeatures::dcache_line_size() == 32) { | 51 if (CpuFeatures::dcache_line_size() == 32) { |
51 __ pld(MemOperand(src, 32)); | 52 __ pld(MemOperand(src, 32)); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true)); | 187 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true)); |
187 if (buffer == nullptr) return stub; | 188 if (buffer == nullptr) return stub; |
188 | 189 |
189 MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size), | 190 MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size), |
190 CodeObjectRequired::kNo); | 191 CodeObjectRequired::kNo); |
191 | 192 |
192 Register dest = r0; | 193 Register dest = r0; |
193 Register src = r1; | 194 Register src = r1; |
194 Register chars = r2; | 195 Register chars = r2; |
195 if (CpuFeatures::IsSupported(NEON)) { | 196 if (CpuFeatures::IsSupported(NEON)) { |
| 197 CpuFeatureScope scope(&masm, NEON); |
196 Register temp = r3; | 198 Register temp = r3; |
197 Label loop; | 199 Label loop; |
198 | 200 |
199 __ bic(temp, chars, Operand(0x7)); | 201 __ bic(temp, chars, Operand(0x7)); |
200 __ sub(chars, chars, Operand(temp)); | 202 __ sub(chars, chars, Operand(temp)); |
201 __ add(temp, dest, Operand(temp, LSL, 1)); | 203 __ add(temp, dest, Operand(temp, LSL, 1)); |
202 | 204 |
203 __ bind(&loop); | 205 __ bind(&loop); |
204 __ vld1(Neon8, NeonListOperand(d0), NeonMemOperand(src, PostIndex)); | 206 __ vld1(Neon8, NeonListOperand(d0), NeonMemOperand(src, PostIndex)); |
205 __ vmovl(NeonU8, q0, d0); | 207 __ vmovl(NeonU8, q0, d0); |
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 patcher.masm()->ldr(pc, MemOperand(pc, -4)); | 802 patcher.masm()->ldr(pc, MemOperand(pc, -4)); |
801 patcher.masm()->emit_code_stub_address(stub); | 803 patcher.masm()->emit_code_stub_address(stub); |
802 } | 804 } |
803 } | 805 } |
804 | 806 |
805 | 807 |
806 } // namespace internal | 808 } // namespace internal |
807 } // namespace v8 | 809 } // namespace v8 |
808 | 810 |
809 #endif // V8_TARGET_ARCH_ARM | 811 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |