author | duke |
Wed, 05 Jul 2017 23:10:03 +0200 | |
changeset 44509 | 02253db2ace1 |
parent 38018 | 1dc6c6f21231 |
permissions | -rw-r--r-- |
38018
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
1 |
/* |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
2 |
* Copyright (c) 2016, Intel Corporation. |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
3 |
* Intel Math Library (LIBM) Source Code |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
4 |
* |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
5 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
6 |
* |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
7 |
* This code is free software; you can redistribute it and/or modify it |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
8 |
* under the terms of the GNU General Public License version 2 only, as |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
9 |
* published by the Free Software Foundation. |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
10 |
* |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
15 |
* accompanied this code). |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
16 |
* |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
20 |
* |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
22 |
* or visit www.oracle.com if you need additional information or have any |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
23 |
* questions. |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
24 |
* |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
25 |
*/ |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
26 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
27 |
#include "precompiled.hpp" |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
28 |
#include "asm/assembler.hpp" |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
29 |
#include "asm/assembler.inline.hpp" |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
30 |
#include "runtime/stubRoutines.hpp" |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
31 |
#include "macroAssembler_x86.hpp" |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
32 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
33 |
#ifdef _MSC_VER |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
34 |
#define ALIGNED_(x) __declspec(align(x)) |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
35 |
#else |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
36 |
#define ALIGNED_(x) __attribute__ ((aligned(x))) |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
37 |
#endif |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
38 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
39 |
/******************************************************************************/ |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
40 |
// ALGORITHM DESCRIPTION - COS() |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
41 |
// --------------------- |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
42 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
43 |
// 1. RANGE REDUCTION |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
44 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
45 |
// We perform an initial range reduction from X to r with |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
46 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
47 |
// X =~= N * pi/32 + r |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
48 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
49 |
// so that |r| <= pi/64 + epsilon. We restrict inputs to those |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
50 |
// where |N| <= 932560. Beyond this, the range reduction is |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
51 |
// insufficiently accurate. For extremely small inputs, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
52 |
// denormalization can occur internally, impacting performance. |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
53 |
// This means that the main path is actually only taken for |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
54 |
// 2^-252 <= |X| < 90112. |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
55 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
56 |
// To avoid branches, we perform the range reduction to full |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
57 |
// accuracy each time. |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
58 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
59 |
// X - N * (P_1 + P_2 + P_3) |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
60 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
61 |
// where P_1 and P_2 are 32-bit numbers (so multiplication by N |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
62 |
// is exact) and P_3 is a 53-bit number. Together, these |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
63 |
// approximate pi well enough for all cases in the restricted |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
64 |
// range. |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
65 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
66 |
// The main reduction sequence is: |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
67 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
68 |
// y = 32/pi * x |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
69 |
// N = integer(y) |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
70 |
// (computed by adding and subtracting off SHIFTER) |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
71 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
72 |
// m_1 = N * P_1 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
73 |
// m_2 = N * P_2 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
74 |
// r_1 = x - m_1 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
75 |
// r = r_1 - m_2 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
76 |
// (this r can be used for most of the calculation) |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
77 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
78 |
// c_1 = r_1 - r |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
79 |
// m_3 = N * P_3 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
80 |
// c_2 = c_1 - m_2 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
81 |
// c = c_2 - m_3 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
82 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
83 |
// 2. MAIN ALGORITHM |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
84 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
85 |
// The algorithm uses a table lookup based on B = M * pi / 32 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
86 |
// where M = N mod 64. The stored values are: |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
87 |
// sigma closest power of 2 to cos(B) |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
88 |
// C_hl 53-bit cos(B) - sigma |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
89 |
// S_hi + S_lo 2 * 53-bit sin(B) |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
90 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
91 |
// The computation is organized as follows: |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
92 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
93 |
// sin(B + r + c) = [sin(B) + sigma * r] + |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
94 |
// r * (cos(B) - sigma) + |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
95 |
// sin(B) * [cos(r + c) - 1] + |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
96 |
// cos(B) * [sin(r + c) - r] |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
97 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
98 |
// which is approximately: |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
99 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
100 |
// [S_hi + sigma * r] + |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
101 |
// C_hl * r + |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
102 |
// S_lo + S_hi * [(cos(r) - 1) - r * c] + |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
103 |
// (C_hl + sigma) * [(sin(r) - r) + c] |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
104 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
105 |
// and this is what is actually computed. We separate this sum |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
106 |
// into four parts: |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
107 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
108 |
// hi + med + pols + corr |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
109 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
110 |
// where |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
111 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
112 |
// hi = S_hi + sigma r |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
113 |
// med = C_hl * r |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
114 |
// pols = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r) |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
115 |
// corr = S_lo + c * ((C_hl + sigma) - S_hi * r) |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
116 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
117 |
// 3. POLYNOMIAL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
118 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
119 |
// The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) * |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
120 |
// (sin(r) - r) can be rearranged freely, since it is quite |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
121 |
// small, so we exploit parallelism to the fullest. |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
122 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
123 |
// psc4 = SC_4 * r_1 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
124 |
// msc4 = psc4 * r |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
125 |
// r2 = r * r |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
126 |
// msc2 = SC_2 * r2 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
127 |
// r4 = r2 * r2 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
128 |
// psc3 = SC_3 + msc4 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
129 |
// psc1 = SC_1 + msc2 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
130 |
// msc3 = r4 * psc3 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
131 |
// sincospols = psc1 + msc3 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
132 |
// pols = sincospols * |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
133 |
// <S_hi * r^2 | (C_hl + sigma) * r^3> |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
134 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
135 |
// 4. CORRECTION TERM |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
136 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
137 |
// This is where the "c" component of the range reduction is |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
138 |
// taken into account; recall that just "r" is used for most of |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
139 |
// the calculation. |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
140 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
141 |
// -c = m_3 - c_2 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
142 |
// -d = S_hi * r - (C_hl + sigma) |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
143 |
// corr = -c * -d + S_lo |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
144 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
145 |
// 5. COMPENSATED SUMMATIONS |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
146 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
147 |
// The two successive compensated summations add up the high |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
148 |
// and medium parts, leaving just the low parts to add up at |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
149 |
// the end. |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
150 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
151 |
// rs = sigma * r |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
152 |
// res_int = S_hi + rs |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
153 |
// k_0 = S_hi - res_int |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
154 |
// k_2 = k_0 + rs |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
155 |
// med = C_hl * r |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
156 |
// res_hi = res_int + med |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
157 |
// k_1 = res_int - res_hi |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
158 |
// k_3 = k_1 + med |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
159 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
160 |
// 6. FINAL SUMMATION |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
161 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
162 |
// We now add up all the small parts: |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
163 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
164 |
// res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
165 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
166 |
// Now the overall result is just: |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
167 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
168 |
// res_hi + res_lo |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
169 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
170 |
// 7. SMALL ARGUMENTS |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
171 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
172 |
// Inputs with |X| < 2^-252 are treated specially as |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
173 |
// 1 - |x|. |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
174 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
175 |
// Special cases: |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
176 |
// cos(NaN) = quiet NaN, and raise invalid exception |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
177 |
// cos(INF) = NaN and raise invalid exception |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
178 |
// cos(0) = 1 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
179 |
// |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
180 |
/******************************************************************************/ |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
181 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
182 |
#ifdef _LP64 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
183 |
// The 64 bit code is at most SSE2 compliant |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
184 |
ALIGNED_(8) juint _ONE[] = |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
185 |
{ |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
186 |
0x00000000UL, 0x3ff00000UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
187 |
}; |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
188 |
void MacroAssembler::fast_cos(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register r8, Register r9, Register r10, Register r11) { |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
189 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
190 |
Label L_2TAG_PACKET_0_0_1, L_2TAG_PACKET_1_0_1, L_2TAG_PACKET_2_0_1, L_2TAG_PACKET_3_0_1; |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
191 |
Label L_2TAG_PACKET_4_0_1, L_2TAG_PACKET_5_0_1, L_2TAG_PACKET_6_0_1, L_2TAG_PACKET_7_0_1; |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
192 |
Label L_2TAG_PACKET_8_0_1, L_2TAG_PACKET_9_0_1, L_2TAG_PACKET_10_0_1, L_2TAG_PACKET_11_0_1; |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
193 |
Label L_2TAG_PACKET_12_0_1, L_2TAG_PACKET_13_0_1, B1_2, B1_3, B1_4, B1_5, start; |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
194 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
195 |
assert_different_registers(r8, r9, r10, r11, eax, ecx, edx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
196 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
197 |
address ONEHALF = StubRoutines::x86::_ONEHALF_addr(); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
198 |
address P_2 = StubRoutines::x86::_P_2_addr(); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
199 |
address SC_4 = StubRoutines::x86::_SC_4_addr(); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
200 |
address Ctable = StubRoutines::x86::_Ctable_addr(); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
201 |
address SC_2 = StubRoutines::x86::_SC_2_addr(); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
202 |
address SC_3 = StubRoutines::x86::_SC_3_addr(); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
203 |
address SC_1 = StubRoutines::x86::_SC_1_addr(); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
204 |
address PI_INV_TABLE = StubRoutines::x86::_PI_INV_TABLE_addr(); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
205 |
address PI_4 = (address)StubRoutines::x86::_PI_4_addr(); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
206 |
address PI32INV = (address)StubRoutines::x86::_PI32INV_addr(); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
207 |
address SIGN_MASK = (address)StubRoutines::x86::_SIGN_MASK_addr(); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
208 |
address P_1 = (address)StubRoutines::x86::_P_1_addr(); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
209 |
address P_3 = (address)StubRoutines::x86::_P_3_addr(); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
210 |
address ONE = (address)_ONE; |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
211 |
address NEG_ZERO = (address)StubRoutines::x86::_NEG_ZERO_addr(); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
212 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
213 |
bind(start); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
214 |
push(rbx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
215 |
subq(rsp, 16); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
216 |
movsd(Address(rsp, 8), xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
217 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
218 |
bind(B1_2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
219 |
movl(eax, Address(rsp, 12)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
220 |
movq(xmm1, ExternalAddress(PI32INV)); //0x6dc9c883UL, 0x40245f30UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
221 |
andl(eax, 2147418112); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
222 |
subl(eax, 808452096); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
223 |
cmpl(eax, 281346048); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
224 |
jcc(Assembler::above, L_2TAG_PACKET_0_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
225 |
mulsd(xmm1, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
226 |
movdqu(xmm5, ExternalAddress(ONEHALF)); //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
227 |
movq(xmm4, ExternalAddress(SIGN_MASK)); //0x00000000UL, 0x80000000UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
228 |
pand(xmm4, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
229 |
por(xmm5, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
230 |
addpd(xmm1, xmm5); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
231 |
cvttsd2sil(edx, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
232 |
cvtsi2sdl(xmm1, edx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
233 |
movdqu(xmm2, ExternalAddress(P_2)); //0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
234 |
movq(xmm3, ExternalAddress(P_1)); //0x54400000UL, 0x3fb921fbUL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
235 |
mulsd(xmm3, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
236 |
unpcklpd(xmm1, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
237 |
addq(rdx, 1865232); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
238 |
movdqu(xmm4, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
239 |
andq(rdx, 63); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
240 |
movdqu(xmm5, ExternalAddress(SC_4)); //0xa556c734UL, 0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
241 |
lea(rax, ExternalAddress(Ctable)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
242 |
shlq(rdx, 5); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
243 |
addq(rax, rdx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
244 |
mulpd(xmm2, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
245 |
subsd(xmm0, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
246 |
mulsd(xmm1, ExternalAddress(P_3)); //0x2e037073UL, 0x3b63198aUL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
247 |
subsd(xmm4, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
248 |
movq(xmm7, Address(rax, 8)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
249 |
unpcklpd(xmm0, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
250 |
movdqu(xmm3, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
251 |
subsd(xmm4, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
252 |
mulpd(xmm5, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
253 |
subpd(xmm0, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
254 |
movdqu(xmm6, ExternalAddress(SC_2)); //0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
255 |
mulsd(xmm7, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
256 |
subsd(xmm3, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
257 |
mulpd(xmm5, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
258 |
mulpd(xmm0, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
259 |
subsd(xmm3, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
260 |
movdqu(xmm2, Address(rax, 0)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
261 |
subsd(xmm1, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
262 |
movq(xmm3, Address(rax, 24)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
263 |
addsd(xmm2, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
264 |
subsd(xmm7, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
265 |
mulsd(xmm2, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
266 |
mulpd(xmm6, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
267 |
mulsd(xmm3, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
268 |
mulpd(xmm2, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
269 |
mulpd(xmm0, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
270 |
addpd(xmm5, ExternalAddress(SC_3)); //0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
271 |
mulsd(xmm4, Address(rax, 0)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
272 |
addpd(xmm6, ExternalAddress(SC_1)); //0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
273 |
mulpd(xmm5, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
274 |
movdqu(xmm0, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
275 |
addsd(xmm3, Address(rax, 8)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
276 |
mulpd(xmm1, xmm7); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
277 |
movdqu(xmm7, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
278 |
addsd(xmm4, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
279 |
addpd(xmm6, xmm5); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
280 |
movq(xmm5, Address(rax, 8)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
281 |
subsd(xmm5, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
282 |
subsd(xmm3, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
283 |
addsd(xmm1, Address(rax, 16)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
284 |
mulpd(xmm6, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
285 |
addsd(xmm0, xmm5); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
286 |
addsd(xmm3, xmm7); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
287 |
addsd(xmm0, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
288 |
addsd(xmm0, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
289 |
addsd(xmm0, xmm6); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
290 |
unpckhpd(xmm6, xmm6); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
291 |
addsd(xmm0, xmm6); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
292 |
addsd(xmm0, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
293 |
jmp(B1_4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
294 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
295 |
bind(L_2TAG_PACKET_0_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
296 |
jcc(Assembler::greater, L_2TAG_PACKET_1_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
297 |
pextrw(eax, xmm0, 3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
298 |
andl(eax, 32767); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
299 |
pinsrw(xmm0, eax, 3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
300 |
movq(xmm1, ExternalAddress(ONE)); //0x00000000UL, 0x3ff00000UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
301 |
subsd(xmm1, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
302 |
movdqu(xmm0, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
303 |
jmp(B1_4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
304 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
305 |
bind(L_2TAG_PACKET_1_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
306 |
pextrw(eax, xmm0, 3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
307 |
andl(eax, 32752); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
308 |
cmpl(eax, 32752); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
309 |
jcc(Assembler::equal, L_2TAG_PACKET_2_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
310 |
pextrw(ecx, xmm0, 3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
311 |
andl(ecx, 32752); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
312 |
subl(ecx, 16224); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
313 |
shrl(ecx, 7); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
314 |
andl(ecx, 65532); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
315 |
lea(r11, ExternalAddress(PI_INV_TABLE)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
316 |
addq(rcx, r11); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
317 |
movdq(rax, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
318 |
movl(r10, Address(rcx, 20)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
319 |
movl(r8, Address(rcx, 24)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
320 |
movl(edx, eax); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
321 |
shrq(rax, 21); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
322 |
orl(eax, INT_MIN); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
323 |
shrl(eax, 11); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
324 |
movl(r9, r10); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
325 |
imulq(r10, rdx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
326 |
imulq(r9, rax); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
327 |
imulq(r8, rax); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
328 |
movl(rsi, Address(rcx, 16)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
329 |
movl(rdi, Address(rcx, 12)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
330 |
movl(r11, r10); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
331 |
shrq(r10, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
332 |
addq(r9, r10); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
333 |
addq(r11, r8); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
334 |
movl(r8, r11); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
335 |
shrq(r11, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
336 |
addq(r9, r11); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
337 |
movl(r10, rsi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
338 |
imulq(rsi, rdx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
339 |
imulq(r10, rax); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
340 |
movl(r11, rdi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
341 |
imulq(rdi, rdx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
342 |
movl(rbx, rsi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
343 |
shrq(rsi, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
344 |
addq(r9, rbx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
345 |
movl(rbx, r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
346 |
shrq(r9, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
347 |
addq(r10, rsi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
348 |
addq(r10, r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
349 |
shlq(rbx, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
350 |
orq(r8, rbx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
351 |
imulq(r11, rax); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
352 |
movl(r9, Address(rcx, 8)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
353 |
movl(rsi, Address(rcx, 4)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
354 |
movl(rbx, rdi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
355 |
shrq(rdi, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
356 |
addq(r10, rbx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
357 |
movl(rbx, r10); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
358 |
shrq(r10, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
359 |
addq(r11, rdi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
360 |
addq(r11, r10); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
361 |
movq(rdi, r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
362 |
imulq(r9, rdx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
363 |
imulq(rdi, rax); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
364 |
movl(r10, r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
365 |
shrq(r9, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
366 |
addq(r11, r10); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
367 |
movl(r10, r11); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
368 |
shrq(r11, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
369 |
addq(rdi, r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
370 |
addq(rdi, r11); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
371 |
movq(r9, rsi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
372 |
imulq(rsi, rdx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
373 |
imulq(r9, rax); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
374 |
shlq(r10, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
375 |
orq(r10, rbx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
376 |
movl(eax, Address(rcx, 0)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
377 |
movl(r11, rsi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
378 |
shrq(rsi, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
379 |
addq(rdi, r11); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
380 |
movl(r11, rdi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
381 |
shrq(rdi, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
382 |
addq(r9, rsi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
383 |
addq(r9, rdi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
384 |
imulq(rdx, rax); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
385 |
pextrw(rbx, xmm0, 3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
386 |
lea(rdi, ExternalAddress(PI_INV_TABLE)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
387 |
subq(rcx, rdi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
388 |
addl(ecx, ecx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
389 |
addl(ecx, ecx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
390 |
addl(ecx, ecx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
391 |
addl(ecx, 19); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
392 |
movl(rsi, 32768); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
393 |
andl(rsi, rbx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
394 |
shrl(rbx, 4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
395 |
andl(rbx, 2047); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
396 |
subl(rbx, 1023); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
397 |
subl(ecx, rbx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
398 |
addq(r9, rdx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
399 |
movl(edx, ecx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
400 |
addl(edx, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
401 |
cmpl(ecx, 1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
402 |
jcc(Assembler::less, L_2TAG_PACKET_3_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
403 |
negl(ecx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
404 |
addl(ecx, 29); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
405 |
shll(r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
406 |
movl(rdi, r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
407 |
andl(r9, 536870911); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
408 |
testl(r9, 268435456); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
409 |
jcc(Assembler::notEqual, L_2TAG_PACKET_4_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
410 |
shrl(r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
411 |
movl(rbx, 0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
412 |
shlq(r9, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
413 |
orq(r9, r11); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
414 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
415 |
bind(L_2TAG_PACKET_5_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
416 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
417 |
bind(L_2TAG_PACKET_6_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
418 |
cmpq(r9, 0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
419 |
jcc(Assembler::equal, L_2TAG_PACKET_7_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
420 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
421 |
bind(L_2TAG_PACKET_8_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
422 |
bsrq(r11, r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
423 |
movl(ecx, 29); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
424 |
subl(ecx, r11); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
425 |
jcc(Assembler::lessEqual, L_2TAG_PACKET_9_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
426 |
shlq(r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
427 |
movq(rax, r10); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
428 |
shlq(r10); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
429 |
addl(edx, ecx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
430 |
negl(ecx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
431 |
addl(ecx, 64); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
432 |
shrq(rax); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
433 |
shrq(r8); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
434 |
orq(r9, rax); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
435 |
orq(r10, r8); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
436 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
437 |
bind(L_2TAG_PACKET_10_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
438 |
cvtsi2sdq(xmm0, r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
439 |
shrq(r10, 1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
440 |
cvtsi2sdq(xmm3, r10); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
441 |
xorpd(xmm4, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
442 |
shll(edx, 4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
443 |
negl(edx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
444 |
addl(edx, 16368); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
445 |
orl(edx, rsi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
446 |
xorl(edx, rbx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
447 |
pinsrw(xmm4, edx, 3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
448 |
movq(xmm2, ExternalAddress(PI_4)); //0x40000000UL, 0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
449 |
movq(xmm6, ExternalAddress(8 + PI_4)); //0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
450 |
xorpd(xmm5, xmm5); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
451 |
subl(edx, 1008); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
452 |
pinsrw(xmm5, edx, 3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
453 |
mulsd(xmm0, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
454 |
shll(rsi, 16); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
455 |
sarl(rsi, 31); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
456 |
mulsd(xmm3, xmm5); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
457 |
movdqu(xmm1, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
458 |
mulsd(xmm0, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
459 |
shrl(rdi, 29); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
460 |
addsd(xmm1, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
461 |
mulsd(xmm3, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
462 |
addl(rdi, rsi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
463 |
xorl(rdi, rsi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
464 |
mulsd(xmm6, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
465 |
movl(eax, rdi); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
466 |
addsd(xmm6, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
467 |
movdqu(xmm2, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
468 |
addsd(xmm0, xmm6); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
469 |
subsd(xmm2, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
470 |
addsd(xmm6, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
471 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
472 |
bind(L_2TAG_PACKET_11_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
473 |
movq(xmm1, ExternalAddress(PI32INV)); //0x6dc9c883UL, 0x40245f30UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
474 |
mulsd(xmm1, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
475 |
movq(xmm5, ExternalAddress(ONEHALF)); //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
476 |
movq(xmm4, ExternalAddress(SIGN_MASK)); //0x00000000UL, 0x80000000UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
477 |
pand(xmm4, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
478 |
por(xmm5, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
479 |
addpd(xmm1, xmm5); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
480 |
cvttsd2siq(rdx, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
481 |
cvtsi2sdq(xmm1, rdx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
482 |
movq(xmm3, ExternalAddress(P_1)); //0x54400000UL, 0x3fb921fbUL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
483 |
movdqu(xmm2, ExternalAddress(P_2)); //0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
484 |
mulsd(xmm3, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
485 |
unpcklpd(xmm1, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
486 |
shll(eax, 3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
487 |
addl(edx, 1865232); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
488 |
movdqu(xmm4, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
489 |
addl(edx, eax); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
490 |
andl(edx, 63); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
491 |
movdqu(xmm5, ExternalAddress(SC_4)); //0xa556c734UL, 0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
492 |
lea(rax, ExternalAddress(Ctable)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
493 |
shll(edx, 5); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
494 |
addq(rax, rdx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
495 |
mulpd(xmm2, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
496 |
subsd(xmm0, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
497 |
mulsd(xmm1, ExternalAddress(P_3)); //0x2e037073UL, 0x3b63198aUL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
498 |
subsd(xmm4, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
499 |
movq(xmm7, Address(rax, 8)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
500 |
unpcklpd(xmm0, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
501 |
movdqu(xmm3, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
502 |
subsd(xmm4, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
503 |
mulpd(xmm5, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
504 |
subpd(xmm0, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
505 |
mulsd(xmm7, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
506 |
subsd(xmm3, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
507 |
mulpd(xmm5, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
508 |
mulpd(xmm0, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
509 |
subsd(xmm3, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
510 |
movdqu(xmm2, Address(rax, 0)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
511 |
subsd(xmm1, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
512 |
movq(xmm3, Address(rax, 24)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
513 |
addsd(xmm2, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
514 |
subsd(xmm7, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
515 |
subsd(xmm1, xmm6); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
516 |
movdqu(xmm6, ExternalAddress(SC_2)); //0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
517 |
mulsd(xmm2, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
518 |
mulpd(xmm6, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
519 |
mulsd(xmm3, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
520 |
mulpd(xmm2, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
521 |
mulpd(xmm0, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
522 |
addpd(xmm5, ExternalAddress(SC_3)); //0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
523 |
mulsd(xmm4, Address(rax, 0)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
524 |
addpd(xmm6, ExternalAddress(SC_1)); //0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
525 |
mulpd(xmm5, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
526 |
movdqu(xmm0, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
527 |
addsd(xmm3, Address(rax, 8)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
528 |
mulpd(xmm1, xmm7); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
529 |
movdqu(xmm7, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
530 |
addsd(xmm4, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
531 |
addpd(xmm6, xmm5); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
532 |
movq(xmm5, Address(rax, 8)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
533 |
subsd(xmm5, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
534 |
subsd(xmm3, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
535 |
addsd(xmm1, Address(rax, 16)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
536 |
mulpd(xmm6, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
537 |
addsd(xmm5, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
538 |
addsd(xmm3, xmm7); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
539 |
addsd(xmm1, xmm5); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
540 |
addsd(xmm1, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
541 |
addsd(xmm1, xmm6); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
542 |
unpckhpd(xmm6, xmm6); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
543 |
movdqu(xmm0, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
544 |
addsd(xmm1, xmm6); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
545 |
addsd(xmm0, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
546 |
jmp(B1_4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
547 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
548 |
bind(L_2TAG_PACKET_7_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
549 |
addl(edx, 64); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
550 |
movq(r9, r10); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
551 |
movq(r10, r8); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
552 |
movl(r8, 0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
553 |
cmpq(r9, 0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
554 |
jcc(Assembler::notEqual, L_2TAG_PACKET_8_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
555 |
addl(edx, 64); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
556 |
movq(r9, r10); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
557 |
movq(r10, r8); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
558 |
cmpq(r9, 0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
559 |
jcc(Assembler::notEqual, L_2TAG_PACKET_8_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
560 |
xorpd(xmm0, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
561 |
xorpd(xmm6, xmm6); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
562 |
jmp(L_2TAG_PACKET_11_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
563 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
564 |
bind(L_2TAG_PACKET_9_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
565 |
jcc(Assembler::equal, L_2TAG_PACKET_10_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
566 |
negl(ecx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
567 |
shrq(r10); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
568 |
movq(rax, r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
569 |
shrq(r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
570 |
subl(edx, ecx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
571 |
negl(ecx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
572 |
addl(ecx, 64); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
573 |
shlq(rax); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
574 |
orq(r10, rax); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
575 |
jmp(L_2TAG_PACKET_10_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
576 |
bind(L_2TAG_PACKET_3_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
577 |
negl(ecx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
578 |
shlq(r9, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
579 |
orq(r9, r11); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
580 |
shlq(r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
581 |
movq(rdi, r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
582 |
testl(r9, INT_MIN); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
583 |
jcc(Assembler::notEqual, L_2TAG_PACKET_12_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
584 |
shrl(r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
585 |
movl(rbx, 0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
586 |
shrq(rdi, 3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
587 |
jmp(L_2TAG_PACKET_6_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
588 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
589 |
bind(L_2TAG_PACKET_4_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
590 |
shrl(r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
591 |
movl(rbx, 536870912); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
592 |
shrl(rbx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
593 |
shlq(r9, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
594 |
orq(r9, r11); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
595 |
shlq(rbx, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
596 |
addl(rdi, 536870912); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
597 |
movl(rcx, 0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
598 |
movl(r11, 0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
599 |
subq(rcx, r8); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
600 |
sbbq(r11, r10); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
601 |
sbbq(rbx, r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
602 |
movq(r8, rcx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
603 |
movq(r10, r11); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
604 |
movq(r9, rbx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
605 |
movl(rbx, 32768); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
606 |
jmp(L_2TAG_PACKET_5_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
607 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
608 |
bind(L_2TAG_PACKET_12_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
609 |
shrl(r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
610 |
mov64(rbx, 0x100000000); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
611 |
shrq(rbx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
612 |
movl(rcx, 0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
613 |
movl(r11, 0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
614 |
subq(rcx, r8); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
615 |
sbbq(r11, r10); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
616 |
sbbq(rbx, r9); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
617 |
movq(r8, rcx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
618 |
movq(r10, r11); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
619 |
movq(r9, rbx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
620 |
movl(rbx, 32768); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
621 |
shrq(rdi, 3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
622 |
addl(rdi, 536870912); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
623 |
jmp(L_2TAG_PACKET_6_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
624 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
625 |
bind(L_2TAG_PACKET_2_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
626 |
movsd(xmm0, Address(rsp, 8)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
627 |
mulsd(xmm0, ExternalAddress(NEG_ZERO)); //0x00000000UL, 0x80000000UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
628 |
movq(Address(rsp, 0), xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
629 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
630 |
bind(L_2TAG_PACKET_13_0_1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
631 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
632 |
bind(B1_4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
633 |
addq(rsp, 16); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
634 |
pop(rbx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
635 |
} |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
636 |
#else |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
637 |
// The 32 bit code is at most SSE2 compliant |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
638 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
639 |
ALIGNED_(16) juint _static_const_table_cos[] = |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
640 |
{ |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
641 |
0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
642 |
0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL, 0xbf73b92eUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
643 |
0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
644 |
0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
645 |
0xc0000000UL, 0xbc626d19UL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
646 |
0xbfa60beaUL, 0x2ed59f06UL, 0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
647 |
0x00000000UL, 0x3ff00000UL, 0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
648 |
0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL, 0x00000000UL, 0x3ff00000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
649 |
0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL, 0x20000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
650 |
0x3c5e0d89UL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL, 0xbfc59267UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
651 |
0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
652 |
0x3ff00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
653 |
0x20000000UL, 0x3c68076aUL, 0x00000000UL, 0x3ff00000UL, 0x99fcef32UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
654 |
0x3fca8279UL, 0x667f3bcdUL, 0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
655 |
0x00000000UL, 0x3fe00000UL, 0x94247758UL, 0x3fc133ccUL, 0x6b151741UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
656 |
0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL, 0x00000000UL, 0x3fe00000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
657 |
0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL, 0xe0000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
658 |
0x3c39f630UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL, 0xbf9d4a2cUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
659 |
0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
660 |
0x3fe00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0x3fed906bUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
661 |
0x20000000UL, 0x3c7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x76acf82dUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
662 |
0x3fa4a031UL, 0x56c62ddaUL, 0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
663 |
0x00000000UL, 0x3fd00000UL, 0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
664 |
0x3fef6297UL, 0x20000000UL, 0x3c756217UL, 0x00000000UL, 0x3fd00000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
665 |
0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL, 0x3fefd88dUL, 0x40000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
666 |
0xbc887df6UL, 0x00000000UL, 0x3fc00000UL, 0x00000000UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
667 |
0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
668 |
0x00000000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0x3fefd88dUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
669 |
0x40000000UL, 0xbc887df6UL, 0x00000000UL, 0xbfc00000UL, 0x0e5967d5UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
670 |
0x3fac1d1fUL, 0xcff75cb0UL, 0x3fef6297UL, 0x20000000UL, 0x3c756217UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
671 |
0x00000000UL, 0xbfd00000UL, 0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
672 |
0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL, 0x00000000UL, 0xbfd00000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
673 |
0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL, 0x3fed906bUL, 0x20000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
674 |
0x3c7457e6UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL, 0x3f9d4a2cUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
675 |
0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
676 |
0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
677 |
0xe0000000UL, 0x3c39f630UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
678 |
0xbfc133ccUL, 0x6b151741UL, 0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
679 |
0x00000000UL, 0xbfe00000UL, 0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
680 |
0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL, 0x00000000UL, 0xbfe00000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
681 |
0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL, 0x20000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
682 |
0x3c68076aUL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL, 0x3fc59267UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
683 |
0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
684 |
0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
685 |
0x20000000UL, 0x3c5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
686 |
0x3fb37ca1UL, 0xa6aea963UL, 0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
687 |
0x00000000UL, 0xbff00000UL, 0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
688 |
0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL, 0x00000000UL, 0xbff00000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
689 |
0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL, 0xc0000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
690 |
0xbc626d19UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL, 0x3f73b92eUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
691 |
0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
692 |
0xbff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
693 |
0x00000000UL, 0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
694 |
0x3f73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
695 |
0x00000000UL, 0xbff00000UL, 0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
696 |
0xbfc8f8b8UL, 0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0xbff00000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
697 |
0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
698 |
0x3c75d28dUL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL, 0x3fb37ca1UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
699 |
0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL, 0x3c672cedUL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
700 |
0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0xbfde2b5dUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
701 |
0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
702 |
0x3fc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
703 |
0x00000000UL, 0xbff00000UL, 0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
704 |
0xbfe44cf3UL, 0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0xbff00000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
705 |
0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
706 |
0x3c8bdd34UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL, 0xbfc133ccUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
707 |
0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL, 0x3c82c5e1UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
708 |
0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0xbfea9b66UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
709 |
0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
710 |
0x3f9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
711 |
0x00000000UL, 0xbfe00000UL, 0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
712 |
0xbfed906bUL, 0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0xbfe00000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
713 |
0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
714 |
0xbc8760b1UL, 0x00000000UL, 0xbfd00000UL, 0x0e5967d5UL, 0x3fac1d1fUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
715 |
0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL, 0xbc756217UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
716 |
0xbfd00000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0xbfefd88dUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
717 |
0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0xbfc00000UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
718 |
0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x00000000UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
719 |
0x00000000UL, 0x00000000UL, 0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
720 |
0xbfefd88dUL, 0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0x3fc00000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
721 |
0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
722 |
0xbc756217UL, 0x00000000UL, 0x3fd00000UL, 0x76acf82dUL, 0x3fa4a031UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
723 |
0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL, 0xbc8760b1UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
724 |
0x3fd00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0xbfed906bUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
725 |
0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
726 |
0xbf9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
727 |
0x00000000UL, 0x3fe00000UL, 0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
728 |
0xbfea9b66UL, 0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0x3fe00000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
729 |
0x94247758UL, 0x3fc133ccUL, 0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
730 |
0x3c82c5e1UL, 0x00000000UL, 0x3fe00000UL, 0x99fcef32UL, 0x3fca8279UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
731 |
0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL, 0x3c8bdd34UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
732 |
0x3fe00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0xbfe44cf3UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
733 |
0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
734 |
0xbfc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
735 |
0x00000000UL, 0x3ff00000UL, 0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
736 |
0xbfde2b5dUL, 0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0x3ff00000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
737 |
0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
738 |
0x3c672cedUL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL, 0xbfa60beaUL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
739 |
0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL, 0x3c75d28dUL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
740 |
0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0xbfc8f8b8UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
741 |
0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
742 |
0xbf73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
743 |
0x00000000UL, 0x3ff00000UL, 0x55555555UL, 0xbfc55555UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
744 |
0xbfe00000UL, 0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
745 |
0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL, 0xa556c734UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
746 |
0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL, 0x1a600000UL, 0x3d90b461UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
747 |
0x1a600000UL, 0x3d90b461UL, 0x54400000UL, 0x3fb921fbUL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
748 |
0x00000000UL, 0x2e037073UL, 0x3b63198aUL, 0x00000000UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
749 |
0x6dc9c883UL, 0x40245f30UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
750 |
0x43380000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x3ff00000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
751 |
0x00000000UL, 0x00000000UL, 0x00000000UL, 0x80000000UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
752 |
0x00000000UL, 0x00000000UL, 0x80000000UL, 0x00000000UL, 0x00000000UL, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
753 |
0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
754 |
}; |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
755 |
//registers, |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
756 |
// input: (rbp + 8) |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
757 |
// scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7 |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
758 |
// rax, rdx, rcx, rbx (tmp) |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
759 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
760 |
// Code generated by Intel C compiler for LIBM library |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
761 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
762 |
void MacroAssembler::fast_cos(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) { |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
763 |
Label L_2TAG_PACKET_0_0_2, L_2TAG_PACKET_1_0_2, L_2TAG_PACKET_2_0_2, L_2TAG_PACKET_3_0_2; |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
764 |
Label L_2TAG_PACKET_4_0_2, L_2TAG_PACKET_5_0_2, L_2TAG_PACKET_6_0_2, L_2TAG_PACKET_7_0_2; |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
765 |
Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2, L_2TAG_PACKET_10_0_2, L_2TAG_PACKET_11_0_2; |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
766 |
Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start; |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
767 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
768 |
assert_different_registers(tmp, eax, ecx, edx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
769 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
770 |
address static_const_table_cos = (address)_static_const_table_cos; |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
771 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
772 |
bind(start); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
773 |
subl(rsp, 120); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
774 |
movl(Address(rsp, 56), tmp); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
775 |
lea(tmp, ExternalAddress(static_const_table_cos)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
776 |
movsd(xmm0, Address(rsp, 128)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
777 |
pextrw(eax, xmm0, 3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
778 |
andl(eax, 32767); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
779 |
subl(eax, 12336); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
780 |
cmpl(eax, 4293); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
781 |
jcc(Assembler::above, L_2TAG_PACKET_0_0_2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
782 |
movsd(xmm1, Address(tmp, 2160)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
783 |
mulsd(xmm1, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
784 |
movdqu(xmm5, Address(tmp, 2240)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
785 |
movsd(xmm4, Address(tmp, 2224)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
786 |
pand(xmm4, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
787 |
por(xmm5, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
788 |
movsd(xmm3, Address(tmp, 2128)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
789 |
movdqu(xmm2, Address(tmp, 2112)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
790 |
addpd(xmm1, xmm5); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
791 |
cvttsd2sil(edx, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
792 |
cvtsi2sdl(xmm1, edx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
793 |
mulsd(xmm3, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
794 |
unpcklpd(xmm1, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
795 |
addl(edx, 1865232); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
796 |
movdqu(xmm4, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
797 |
andl(edx, 63); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
798 |
movdqu(xmm5, Address(tmp, 2096)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
799 |
lea(eax, Address(tmp, 0)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
800 |
shll(edx, 5); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
801 |
addl(eax, edx); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
802 |
mulpd(xmm2, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
803 |
subsd(xmm0, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
804 |
mulsd(xmm1, Address(tmp, 2144)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
805 |
subsd(xmm4, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
806 |
movsd(xmm7, Address(eax, 8)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
807 |
unpcklpd(xmm0, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
808 |
movapd(xmm3, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
809 |
subsd(xmm4, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
810 |
mulpd(xmm5, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
811 |
subpd(xmm0, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
812 |
movdqu(xmm6, Address(tmp, 2064)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
813 |
mulsd(xmm7, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
814 |
subsd(xmm3, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
815 |
mulpd(xmm5, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
816 |
mulpd(xmm0, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
817 |
subsd(xmm3, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
818 |
movdqu(xmm2, Address(eax, 0)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
819 |
subsd(xmm1, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
820 |
movsd(xmm3, Address(eax, 24)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
821 |
addsd(xmm2, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
822 |
subsd(xmm7, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
823 |
mulsd(xmm2, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
824 |
mulpd(xmm6, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
825 |
mulsd(xmm3, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
826 |
mulpd(xmm2, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
827 |
mulpd(xmm0, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
828 |
addpd(xmm5, Address(tmp, 2080)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
829 |
mulsd(xmm4, Address(eax, 0)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
830 |
addpd(xmm6, Address(tmp, 2048)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
831 |
mulpd(xmm5, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
832 |
movapd(xmm0, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
833 |
addsd(xmm3, Address(eax, 8)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
834 |
mulpd(xmm1, xmm7); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
835 |
movapd(xmm7, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
836 |
addsd(xmm4, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
837 |
addpd(xmm6, xmm5); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
838 |
movsd(xmm5, Address(eax, 8)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
839 |
subsd(xmm5, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
840 |
subsd(xmm3, xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
841 |
addsd(xmm1, Address(eax, 16)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
842 |
mulpd(xmm6, xmm2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
843 |
addsd(xmm5, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
844 |
addsd(xmm3, xmm7); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
845 |
addsd(xmm1, xmm5); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
846 |
addsd(xmm1, xmm3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
847 |
addsd(xmm1, xmm6); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
848 |
unpckhpd(xmm6, xmm6); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
849 |
addsd(xmm1, xmm6); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
850 |
addsd(xmm4, xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
851 |
movsd(Address(rsp, 0), xmm4); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
852 |
fld_d(Address(rsp, 0)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
853 |
jmp(L_2TAG_PACKET_1_0_2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
854 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
855 |
bind(L_2TAG_PACKET_0_0_2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
856 |
jcc(Assembler::greater, L_2TAG_PACKET_2_0_2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
857 |
pextrw(eax, xmm0, 3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
858 |
andl(eax, 32767); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
859 |
pinsrw(xmm0, eax, 3); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
860 |
movsd(xmm1, Address(tmp, 2192)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
861 |
subsd(xmm1, xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
862 |
movsd(Address(rsp, 0), xmm1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
863 |
fld_d(Address(rsp, 0)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
864 |
jmp(L_2TAG_PACKET_1_0_2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
865 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
866 |
bind(L_2TAG_PACKET_2_0_2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
867 |
movl(eax, Address(rsp, 132)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
868 |
andl(eax, 2146435072); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
869 |
cmpl(eax, 2146435072); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
870 |
jcc(Assembler::equal, L_2TAG_PACKET_3_0_2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
871 |
subl(rsp, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
872 |
movsd(Address(rsp, 0), xmm0); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
873 |
lea(eax, Address(rsp, 40)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
874 |
movl(Address(rsp, 8), eax); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
875 |
movl(eax, 1); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
876 |
movl(Address(rsp, 12), eax); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
877 |
call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlibm_sin_cos_huge()))); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
878 |
addl(rsp, 32); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
879 |
fld_d(Address(rsp, 8)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
880 |
jmp(L_2TAG_PACKET_1_0_2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
881 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
882 |
bind(L_2TAG_PACKET_3_0_2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
883 |
fld_d(Address(rsp, 128)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
884 |
fmul_d(Address(tmp, 2208)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
885 |
|
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
886 |
bind(L_2TAG_PACKET_1_0_2); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
887 |
movl(tmp, Address(rsp, 56)); |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
888 |
} |
1dc6c6f21231
8152907: Update for x86 tan and log10 in the math lib
vdeshpande
parents:
diff
changeset
|
889 |
#endif |