Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 2523933002: [Turbofan] Add ARM support for simd128 moves and swaps. (Closed)
Patch Set: Rebase. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/simulator-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 } 258 }
259 259
260 void MacroAssembler::Move(DwVfpRegister dst, DwVfpRegister src, 260 void MacroAssembler::Move(DwVfpRegister dst, DwVfpRegister src,
261 Condition cond) { 261 Condition cond) {
262 if (!dst.is(src)) { 262 if (!dst.is(src)) {
263 vmov(dst, src, cond); 263 vmov(dst, src, cond);
264 } 264 }
265 } 265 }
266 266
267 void MacroAssembler::Move(QwNeonRegister dst, QwNeonRegister src) {
268 if (!dst.is(src)) {
269 vmov(dst, src);
270 }
271 }
272
273 void MacroAssembler::Swap(DwVfpRegister srcdst0, DwVfpRegister srcdst1) {
274 if (srcdst0.is(srcdst1)) return; // Swapping aliased registers emits nothing.
275
276 DCHECK(VfpRegisterIsAvailable(srcdst0));
277 DCHECK(VfpRegisterIsAvailable(srcdst1));
278
279 if (CpuFeatures::IsSupported(NEON)) {
280 vswp(srcdst0, srcdst1);
281 } else {
282 DCHECK(!srcdst0.is(kScratchDoubleReg));
283 DCHECK(!srcdst1.is(kScratchDoubleReg));
284 vmov(kScratchDoubleReg, srcdst0);
285 vmov(srcdst0, srcdst1);
286 vmov(srcdst1, kScratchDoubleReg);
287 }
288 }
289
290 void MacroAssembler::Swap(QwNeonRegister srcdst0, QwNeonRegister srcdst1) {
291 if (!srcdst0.is(srcdst1)) {
292 vswp(srcdst0, srcdst1);
293 }
294 }
295
267 void MacroAssembler::Mls(Register dst, Register src1, Register src2, 296 void MacroAssembler::Mls(Register dst, Register src1, Register src2,
268 Register srcA, Condition cond) { 297 Register srcA, Condition cond) {
269 if (CpuFeatures::IsSupported(ARMv7)) { 298 if (CpuFeatures::IsSupported(ARMv7)) {
270 CpuFeatureScope scope(this, ARMv7); 299 CpuFeatureScope scope(this, ARMv7);
271 mls(dst, src1, src2, srcA, cond); 300 mls(dst, src1, src2, srcA, cond);
272 } else { 301 } else {
273 DCHECK(!srcA.is(ip)); 302 DCHECK(!srcA.is(ip));
274 mul(ip, src1, src2, LeaveCC, cond); 303 mul(ip, src1, src2, LeaveCC, cond);
275 sub(dst, srcA, ip, LeaveCC, cond); 304 sub(dst, srcA, ip, LeaveCC, cond);
276 } 305 }
(...skipping 3585 matching lines...) Expand 10 before | Expand all | Expand 10 after
3862 } 3891 }
3863 } 3892 }
3864 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 3893 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
3865 add(result, result, Operand(dividend, LSR, 31)); 3894 add(result, result, Operand(dividend, LSR, 31));
3866 } 3895 }
3867 3896
3868 } // namespace internal 3897 } // namespace internal
3869 } // namespace v8 3898 } // namespace v8
3870 3899
3871 #endif // V8_TARGET_ARCH_ARM 3900 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/simulator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698