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 "src/arm/simulator-arm.h" | 9 #include "src/arm/simulator-arm.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 if (CpuFeatures::IsSupported(NEON)) { | 102 if (CpuFeatures::IsSupported(NEON)) { |
103 Label loop, less_256, less_128, less_64, less_32, _16_or_less, _8_or_less; | 103 Label loop, less_256, less_128, less_64, less_32, _16_or_less, _8_or_less; |
104 Label size_less_than_8; | 104 Label size_less_than_8; |
105 __ pld(MemOperand(src, 0)); | 105 __ pld(MemOperand(src, 0)); |
106 | 106 |
107 __ cmp(chars, Operand(8)); | 107 __ cmp(chars, Operand(8)); |
108 __ b(lt, &size_less_than_8); | 108 __ b(lt, &size_less_than_8); |
109 __ cmp(chars, Operand(32)); | 109 __ cmp(chars, Operand(32)); |
110 __ b(lt, &less_32); | 110 __ b(lt, &less_32); |
111 if (CpuFeatures::cache_line_size() == 32) { | 111 if (CpuFeatures::dcache_line_size() == 32) { |
112 __ pld(MemOperand(src, 32)); | 112 __ pld(MemOperand(src, 32)); |
113 } | 113 } |
114 __ cmp(chars, Operand(64)); | 114 __ cmp(chars, Operand(64)); |
115 __ b(lt, &less_64); | 115 __ b(lt, &less_64); |
116 __ pld(MemOperand(src, 64)); | 116 __ pld(MemOperand(src, 64)); |
117 if (CpuFeatures::cache_line_size() == 32) { | 117 if (CpuFeatures::dcache_line_size() == 32) { |
118 __ pld(MemOperand(src, 96)); | 118 __ pld(MemOperand(src, 96)); |
119 } | 119 } |
120 __ cmp(chars, Operand(128)); | 120 __ cmp(chars, Operand(128)); |
121 __ b(lt, &less_128); | 121 __ b(lt, &less_128); |
122 __ pld(MemOperand(src, 128)); | 122 __ pld(MemOperand(src, 128)); |
123 if (CpuFeatures::cache_line_size() == 32) { | 123 if (CpuFeatures::dcache_line_size() == 32) { |
124 __ pld(MemOperand(src, 160)); | 124 __ pld(MemOperand(src, 160)); |
125 } | 125 } |
126 __ pld(MemOperand(src, 192)); | 126 __ pld(MemOperand(src, 192)); |
127 if (CpuFeatures::cache_line_size() == 32) { | 127 if (CpuFeatures::dcache_line_size() == 32) { |
128 __ pld(MemOperand(src, 224)); | 128 __ pld(MemOperand(src, 224)); |
129 } | 129 } |
130 __ cmp(chars, Operand(256)); | 130 __ cmp(chars, Operand(256)); |
131 __ b(lt, &less_256); | 131 __ b(lt, &less_256); |
132 __ sub(chars, chars, Operand(256)); | 132 __ sub(chars, chars, Operand(256)); |
133 | 133 |
134 __ bind(&loop); | 134 __ bind(&loop); |
135 __ pld(MemOperand(src, 256)); | 135 __ pld(MemOperand(src, 256)); |
136 __ vld1(Neon8, NeonListOperand(d0, 4), NeonMemOperand(src, PostIndex)); | 136 __ vld1(Neon8, NeonListOperand(d0, 4), NeonMemOperand(src, PostIndex)); |
137 if (CpuFeatures::cache_line_size() == 32) { | 137 if (CpuFeatures::dcache_line_size() == 32) { |
138 __ pld(MemOperand(src, 256)); | 138 __ pld(MemOperand(src, 256)); |
139 } | 139 } |
140 __ vld1(Neon8, NeonListOperand(d4, 4), NeonMemOperand(src, PostIndex)); | 140 __ vld1(Neon8, NeonListOperand(d4, 4), NeonMemOperand(src, PostIndex)); |
141 __ sub(chars, chars, Operand(64), SetCC); | 141 __ sub(chars, chars, Operand(64), SetCC); |
142 __ vst1(Neon8, NeonListOperand(d0, 4), NeonMemOperand(dest, PostIndex)); | 142 __ vst1(Neon8, NeonListOperand(d0, 4), NeonMemOperand(dest, PostIndex)); |
143 __ vst1(Neon8, NeonListOperand(d4, 4), NeonMemOperand(dest, PostIndex)); | 143 __ vst1(Neon8, NeonListOperand(d4, 4), NeonMemOperand(dest, PostIndex)); |
144 __ b(ge, &loop); | 144 __ b(ge, &loop); |
145 __ add(chars, chars, Operand(256)); | 145 __ add(chars, chars, Operand(256)); |
146 | 146 |
147 __ bind(&less_256); | 147 __ bind(&less_256); |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 patcher.masm()->ldr(pc, MemOperand(pc, -4)); | 949 patcher.masm()->ldr(pc, MemOperand(pc, -4)); |
950 patcher.masm()->emit_code_stub_address(stub); | 950 patcher.masm()->emit_code_stub_address(stub); |
951 } | 951 } |
952 } | 952 } |
953 | 953 |
954 | 954 |
955 } // namespace internal | 955 } // namespace internal |
956 } // namespace v8 | 956 } // namespace v8 |
957 | 957 |
958 #endif // V8_TARGET_ARCH_ARM | 958 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |