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

Unified 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, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/assembler_arm64_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm64.cc
===================================================================
--- runtime/vm/assembler_arm64.cc (revision 36692)
+++ runtime/vm/assembler_arm64.cc (working copy)
@@ -877,6 +877,39 @@
}
+void Assembler::VRecps(VRegister vd, VRegister vn) {
+ ASSERT(vn != VTMP);
+ ASSERT(vd != VTMP);
+
+ // Reciprocal estimate.
+ vrecpes(vd, vn);
+ // 2 Newton-Raphson steps.
+ vrecpss(VTMP, vn, vd);
+ vmuls(vd, vd, VTMP);
+ vrecpss(VTMP, vn, vd);
+ vmuls(vd, vd, VTMP);
+}
+
+
+void Assembler::VRSqrts(VRegister vd, VRegister vn) {
+ ASSERT(vd != VTMP);
+ ASSERT(vn != VTMP);
+
+ // Reciprocal square root estimate.
+ vrsqrtes(vd, vn);
+ // 2 Newton-Raphson steps. xn+1 = xn * (3 - V1*xn^2) / 2.
+ // First step.
+ vmuls(VTMP, vd, vd); // VTMP <- xn^2
+ vrsqrtss(VTMP, vn, VTMP); // VTMP <- (3 - V1*VTMP) / 2.
+ vmuls(vd, vd, VTMP); // xn+1 <- xn * VTMP
+ // Second step.
+ vmuls(VTMP, vd, vd);
+ vrsqrtss(VTMP, vn, VTMP);
+ vmuls(vd, vd, VTMP);
+}
+
+
+
// Store into object.
// Preserves object and value registers.
void Assembler::StoreIntoObjectFilterNoSmi(Register object,
« 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