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

Side by Side Diff: runtime/vm/assembler_arm64.cc

Issue 307523002: Adds more ARM64 SIMD instructions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/assembler_arm64_test.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 (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 if (Address::CanHoldOffset(offset, Address::Offset, kQWord)) { 870 if (Address::CanHoldOffset(offset, Address::Offset, kQWord)) {
871 fstrq(src, Address(base, offset, Address::Offset, kQWord)); 871 fstrq(src, Address(base, offset, Address::Offset, kQWord));
872 } else { 872 } else {
873 ASSERT(base != TMP2); 873 ASSERT(base != TMP2);
874 AddImmediate(TMP2, base, offset, pp); 874 AddImmediate(TMP2, base, offset, pp);
875 fstrq(src, Address(TMP2)); 875 fstrq(src, Address(TMP2));
876 } 876 }
877 } 877 }
878 878
879 879
880 void Assembler::VRecps(VRegister vd, VRegister vn) {
881 ASSERT(vn != VTMP);
882 ASSERT(vd != VTMP);
883
884 // Reciprocal estimate.
885 vrecpes(vd, vn);
886 // 2 Newton-Raphson steps.
887 vrecpss(VTMP, vn, vd);
888 vmuls(vd, vd, VTMP);
889 vrecpss(VTMP, vn, vd);
890 vmuls(vd, vd, VTMP);
891 }
892
893
894 void Assembler::VRSqrts(VRegister vd, VRegister vn) {
895 ASSERT(vd != VTMP);
896 ASSERT(vn != VTMP);
897
898 // Reciprocal square root estimate.
899 vrsqrtes(vd, vn);
900 // 2 Newton-Raphson steps. xn+1 = xn * (3 - V1*xn^2) / 2.
901 // First step.
902 vmuls(VTMP, vd, vd); // VTMP <- xn^2
903 vrsqrtss(VTMP, vn, VTMP); // VTMP <- (3 - V1*VTMP) / 2.
904 vmuls(vd, vd, VTMP); // xn+1 <- xn * VTMP
905 // Second step.
906 vmuls(VTMP, vd, vd);
907 vrsqrtss(VTMP, vn, VTMP);
908 vmuls(vd, vd, VTMP);
909 }
910
911
912
880 // Store into object. 913 // Store into object.
881 // Preserves object and value registers. 914 // Preserves object and value registers.
882 void Assembler::StoreIntoObjectFilterNoSmi(Register object, 915 void Assembler::StoreIntoObjectFilterNoSmi(Register object,
883 Register value, 916 Register value,
884 Label* no_update) { 917 Label* no_update) {
885 COMPILE_ASSERT((kNewObjectAlignmentOffset == kWordSize) && 918 COMPILE_ASSERT((kNewObjectAlignmentOffset == kWordSize) &&
886 (kOldObjectAlignmentOffset == 0)); 919 (kOldObjectAlignmentOffset == 0));
887 920
888 // Write-barrier triggers if the value is in the new space (has bit set) and 921 // Write-barrier triggers if the value is in the new space (has bit set) and
889 // the object is in the old space (has bit cleared). 922 // the object is in the old space (has bit cleared).
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 LoadImmediate(TMP, tags, pp); 1375 LoadImmediate(TMP, tags, pp);
1343 StoreFieldToOffset(TMP, instance_reg, Object::tags_offset(), pp); 1376 StoreFieldToOffset(TMP, instance_reg, Object::tags_offset(), pp);
1344 } else { 1377 } else {
1345 b(failure); 1378 b(failure);
1346 } 1379 }
1347 } 1380 }
1348 1381
1349 } // namespace dart 1382 } // namespace dart
1350 1383
1351 #endif // defined TARGET_ARCH_ARM64 1384 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/assembler_arm64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698