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

Unified Diff: src/third_party/fdlibm/fdlibm.cc

Issue 866553003: Allocate typed array for rempio2 result. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comments Created 5 years, 10 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 | « src/runtime/runtime-maths.cc ('k') | src/third_party/fdlibm/fdlibm.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/third_party/fdlibm/fdlibm.cc
diff --git a/src/third_party/fdlibm/fdlibm.cc b/src/third_party/fdlibm/fdlibm.cc
index 90099f141b46ef1de4da7c4df4c9b87deb4da781..b8bc243f4df74e61fec5330d34c2cfc592ddcbb3 100644
--- a/src/third_party/fdlibm/fdlibm.cc
+++ b/src/third_party/fdlibm/fdlibm.cc
@@ -126,7 +126,7 @@ static const double PIo2[] = {
};
-int __kernel_rem_pio2(double* x, double* y, int e0, int nx) {
+INLINE(int __kernel_rem_pio2(double* x, double* y, int e0, int nx)) {
static const int32_t jk = 3;
double fw;
int32_t jx = nx - 1;
@@ -135,12 +135,12 @@ int __kernel_rem_pio2(double* x, double* y, int e0, int nx) {
int32_t q0 = e0 - 24 * (jv + 1);
int32_t m = jx + jk;
- double f[10];
+ double f[20];
for (int i = 0, j = jv - jx; i <= m; i++, j++) {
f[i] = (j < 0) ? zero : static_cast<double>(two_over_pi[j]);
}
- double q[10];
+ double q[20];
for (int i = 0; i <= jk; i++) {
fw = 0.0;
for (int j = 0; j <= jx; j++) fw += x[j] * f[jx + i - j];
@@ -151,7 +151,7 @@ int __kernel_rem_pio2(double* x, double* y, int e0, int nx) {
recompute:
- int32_t iq[10];
+ int32_t iq[20];
double z = q[jz];
for (int i = 0, j = jz; j > 0; i++, j--) {
fw = static_cast<double>(static_cast<int32_t>(twon24 * z));
@@ -242,7 +242,7 @@ recompute:
fw *= twon24;
}
- double fq[10];
+ double fq[20];
for (int i = jz; i >= 0; i--) {
fw = 0.0;
for (int k = 0; k <= jk && k <= jz - i; k++) fw += PIo2[k] * q[i + k];
« no previous file with comments | « src/runtime/runtime-maths.cc ('k') | src/third_party/fdlibm/fdlibm.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698