1 /*
   2  * Copyright (c) 2015, Intel Corporation.
   3  * Intel Math Library (LIBM) Source Code
   4  *
   5  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   6  *
   7  * This code is free software; you can redistribute it and/or modify it
   8  * under the terms of the GNU General Public License version 2 only, as
   9  * published by the Free Software Foundation.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  *
  25  */
  26 
  27 #include "precompiled.hpp"
  28 #include "asm/assembler.hpp"
  29 #include "asm/assembler.inline.hpp"
  30 #include "macroAssembler_x86.hpp"
  31 
  32 #ifdef _MSC_VER
  33 #define ALIGNED_(x) __declspec(align(x))
  34 #else
  35 #define ALIGNED_(x) __attribute__ ((aligned(x)))
  36 #endif
  37 
  38 /******************************************************************************/
  39 //                     ALGORITHM DESCRIPTION - EXP()
  40 //                     ---------------------
  41 //
  42 // Description:
  43 //  Let K = 64 (table size).
  44 //        x    x/log(2)     n
  45 //       e  = 2          = 2 * T[j] * (1 + P(y))
  46 //  where
  47 //       x = m*log(2)/K + y,    y in [-log(2)/K..log(2)/K]
  48 //       m = n*K + j,           m,n,j - signed integer, j in [-K/2..K/2]
  49 //                  j/K
  50 //       values of 2   are tabulated as T[j] = T_hi[j] ( 1 + T_lo[j]).
  51 //
  52 //       P(y) is a minimax polynomial approximation of exp(x)-1
  53 //       on small interval [-log(2)/K..log(2)/K] (were calculated by Maple V).
  54 //
  55 //  To avoid problems with arithmetic overflow and underflow,
  56 //            n                        n1  n2
  57 //  value of 2  is safely computed as 2 * 2 where n1 in [-BIAS/2..BIAS/2]
  58 //  where BIAS is a value of exponent bias.
  59 //
  60 // Special cases:
  61 //  exp(NaN) = NaN
  62 //  exp(+INF) = +INF
  63 //  exp(-INF) = 0
  64 //  exp(x) = 1 for subnormals
  65 //  for finite argument, only exp(0)=1 is exact
  66 //  For IEEE double
  67 //    if x >  709.782712893383973096 then exp(x) overflow
  68 //    if x < -745.133219101941108420 then exp(x) underflow
  69 //
  70 /******************************************************************************/
  71 
  72 #ifdef _LP64
  73 
  74 ALIGNED_(16) juint _cv[] =
  75 {
  76     0x652b82feUL, 0x40571547UL, 0x652b82feUL, 0x40571547UL, 0xfefa0000UL,
  77     0x3f862e42UL, 0xfefa0000UL, 0x3f862e42UL, 0xbc9e3b3aUL, 0x3d1cf79aUL,
  78     0xbc9e3b3aUL, 0x3d1cf79aUL, 0xfffffffeUL, 0x3fdfffffUL, 0xfffffffeUL,
  79     0x3fdfffffUL, 0xe3289860UL, 0x3f56c15cUL, 0x555b9e25UL, 0x3fa55555UL,
  80     0xc090cf0fUL, 0x3f811115UL, 0x55548ba1UL, 0x3fc55555UL
  81 };
  82 
  83 ALIGNED_(16) juint _shifter[] =
  84 {
  85     0x00000000UL, 0x43380000UL, 0x00000000UL, 0x43380000UL
  86 };
  87 
  88 ALIGNED_(16) juint _mmask[] =
  89 {
  90     0xffffffc0UL, 0x00000000UL, 0xffffffc0UL, 0x00000000UL
  91 };
  92 
  93 ALIGNED_(16) juint _bias[] =
  94 {
  95     0x0000ffc0UL, 0x00000000UL, 0x0000ffc0UL, 0x00000000UL
  96 };
  97 
  98 ALIGNED_(16) juint _Tbl_addr[] =
  99 {
 100     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x0e03754dUL,
 101     0x3cad7bbfUL, 0x3e778060UL, 0x00002c9aUL, 0x3567f613UL, 0x3c8cd252UL,
 102     0xd3158574UL, 0x000059b0UL, 0x61e6c861UL, 0x3c60f74eUL, 0x18759bc8UL,
 103     0x00008745UL, 0x5d837b6cUL, 0x3c979aa6UL, 0x6cf9890fUL, 0x0000b558UL,
 104     0x702f9cd1UL, 0x3c3ebe3dUL, 0x32d3d1a2UL, 0x0000e3ecUL, 0x1e63bcd8UL,
 105     0x3ca3516eUL, 0xd0125b50UL, 0x00011301UL, 0x26f0387bUL, 0x3ca4c554UL,
 106     0xaea92ddfUL, 0x0001429aUL, 0x62523fb6UL, 0x3ca95153UL, 0x3c7d517aUL,
 107     0x000172b8UL, 0x3f1353bfUL, 0x3c8b898cUL, 0xeb6fcb75UL, 0x0001a35bUL,
 108     0x3e3a2f5fUL, 0x3c9aecf7UL, 0x3168b9aaUL, 0x0001d487UL, 0x44a6c38dUL,
 109     0x3c8a6f41UL, 0x88628cd6UL, 0x0002063bUL, 0xe3a8a894UL, 0x3c968efdUL,
 110     0x6e756238UL, 0x0002387aUL, 0x981fe7f2UL, 0x3c80472bUL, 0x65e27cddUL,
 111     0x00026b45UL, 0x6d09ab31UL, 0x3c82f7e1UL, 0xf51fdee1UL, 0x00029e9dUL,
 112     0x720c0ab3UL, 0x3c8b3782UL, 0xa6e4030bUL, 0x0002d285UL, 0x4db0abb6UL,
 113     0x3c834d75UL, 0x0a31b715UL, 0x000306feUL, 0x5dd3f84aUL, 0x3c8fdd39UL,
 114     0xb26416ffUL, 0x00033c08UL, 0xcc187d29UL, 0x3ca12f8cUL, 0x373aa9caUL,
 115     0x000371a7UL, 0x738b5e8bUL, 0x3ca7d229UL, 0x34e59ff6UL, 0x0003a7dbUL,
 116     0xa72a4c6dUL, 0x3c859f48UL, 0x4c123422UL, 0x0003dea6UL, 0x259d9205UL,
 117     0x3ca8b846UL, 0x21f72e29UL, 0x0004160aUL, 0x60c2ac12UL, 0x3c4363edUL,
 118     0x6061892dUL, 0x00044e08UL, 0xdaa10379UL, 0x3c6ecce1UL, 0xb5c13cd0UL,
 119     0x000486a2UL, 0xbb7aafb0UL, 0x3c7690ceUL, 0xd5362a27UL, 0x0004bfdaUL,
 120     0x9b282a09UL, 0x3ca083ccUL, 0x769d2ca6UL, 0x0004f9b2UL, 0xc1aae707UL,
 121     0x3ca509b0UL, 0x569d4f81UL, 0x0005342bUL, 0x18fdd78eUL, 0x3c933505UL,
 122     0x36b527daUL, 0x00056f47UL, 0xe21c5409UL, 0x3c9063e1UL, 0xdd485429UL,
 123     0x0005ab07UL, 0x2b64c035UL, 0x3c9432e6UL, 0x15ad2148UL, 0x0005e76fUL,
 124     0x99f08c0aUL, 0x3ca01284UL, 0xb03a5584UL, 0x0006247eUL, 0x0073dc06UL,
 125     0x3c99f087UL, 0x82552224UL, 0x00066238UL, 0x0da05571UL, 0x3c998d4dUL,
 126     0x667f3bccUL, 0x0006a09eUL, 0x86ce4786UL, 0x3ca52bb9UL, 0x3c651a2eUL,
 127     0x0006dfb2UL, 0x206f0dabUL, 0x3ca32092UL, 0xe8ec5f73UL, 0x00071f75UL,
 128     0x8e17a7a6UL, 0x3ca06122UL, 0x564267c8UL, 0x00075febUL, 0x461e9f86UL,
 129     0x3ca244acUL, 0x73eb0186UL, 0x0007a114UL, 0xabd66c55UL, 0x3c65ebe1UL,
 130     0x36cf4e62UL, 0x0007e2f3UL, 0xbbff67d0UL, 0x3c96fe9fUL, 0x994cce12UL,
 131     0x00082589UL, 0x14c801dfUL, 0x3c951f14UL, 0x9b4492ecUL, 0x000868d9UL,
 132     0xc1f0eab4UL, 0x3c8db72fUL, 0x422aa0dbUL, 0x0008ace5UL, 0x59f35f44UL,
 133     0x3c7bf683UL, 0x99157736UL, 0x0008f1aeUL, 0x9c06283cUL, 0x3ca360baUL,
 134     0xb0cdc5e4UL, 0x00093737UL, 0x20f962aaUL, 0x3c95e8d1UL, 0x9fde4e4fUL,
 135     0x00097d82UL, 0x2b91ce27UL, 0x3c71affcUL, 0x82a3f090UL, 0x0009c491UL,
 136     0x589a2ebdUL, 0x3c9b6d34UL, 0x7b5de564UL, 0x000a0c66UL, 0x9ab89880UL,
 137     0x3c95277cUL, 0xb23e255cUL, 0x000a5503UL, 0x6e735ab3UL, 0x3c846984UL,
 138     0x5579fdbfUL, 0x000a9e6bUL, 0x92cb3387UL, 0x3c8c1a77UL, 0x995ad3adUL,
 139     0x000ae89fUL, 0xdc2d1d96UL, 0x3ca22466UL, 0xb84f15faUL, 0x000b33a2UL,
 140     0xb19505aeUL, 0x3ca1112eUL, 0xf2fb5e46UL, 0x000b7f76UL, 0x0a5fddcdUL,
 141     0x3c74ffd7UL, 0x904bc1d2UL, 0x000bcc1eUL, 0x30af0cb3UL, 0x3c736eaeUL,
 142     0xdd85529cUL, 0x000c199bUL, 0xd10959acUL, 0x3c84e08fUL, 0x2e57d14bUL,
 143     0x000c67f1UL, 0x6c921968UL, 0x3c676b2cUL, 0xdcef9069UL, 0x000cb720UL,
 144     0x36df99b3UL, 0x3c937009UL, 0x4a07897bUL, 0x000d072dUL, 0xa63d07a7UL,
 145     0x3c74a385UL, 0xdcfba487UL, 0x000d5818UL, 0xd5c192acUL, 0x3c8e5a50UL,
 146     0x03db3285UL, 0x000da9e6UL, 0x1c4a9792UL, 0x3c98bb73UL, 0x337b9b5eUL,
 147     0x000dfc97UL, 0x603a88d3UL, 0x3c74b604UL, 0xe78b3ff6UL, 0x000e502eUL,
 148     0x92094926UL, 0x3c916f27UL, 0xa2a490d9UL, 0x000ea4afUL, 0x41aa2008UL,
 149     0x3c8ec3bcUL, 0xee615a27UL, 0x000efa1bUL, 0x31d185eeUL, 0x3c8a64a9UL,
 150     0x5b6e4540UL, 0x000f5076UL, 0x4d91cd9dUL, 0x3c77893bUL, 0x819e90d8UL,
 151     0x000fa7c1UL
 152 };
 153 
 154 ALIGNED_(16) juint _ALLONES[] =
 155 {
 156     0xffffffffUL, 0xffffffffUL, 0xffffffffUL, 0xffffffffUL
 157 };
 158 
 159 ALIGNED_(16) juint _ebias[] =
 160 {
 161     0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x3ff00000UL
 162 };
 163 
 164 ALIGNED_(4) juint _XMAX[] =
 165 {
 166     0xffffffffUL, 0x7fefffffUL
 167 };
 168 
 169 ALIGNED_(4) juint _XMIN[] =
 170 {
 171     0x00000000UL, 0x00100000UL
 172 };
 173 
 174 ALIGNED_(4) juint _INF[] =
 175 {
 176     0x00000000UL, 0x7ff00000UL
 177 };
 178 
 179 ALIGNED_(4) juint _ZERO[] =
 180 {
 181     0x00000000UL, 0x00000000UL
 182 };
 183 
 184 ALIGNED_(4) juint _ONE_val[] =
 185 {
 186     0x00000000UL, 0x3ff00000UL
 187 };
 188 
 189 
 190 // Registers:
 191 // input: xmm0
 192 // scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
 193 //          rax, rdx, rcx, tmp - r11
 194 
 195 // Code generated by Intel C compiler for LIBM library
 196 
 197 void MacroAssembler::fast_exp(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
 198   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;
 199   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;
 200   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;
 201   Label L_2TAG_PACKET_12_0_2, B1_3, B1_5, start;
 202 
 203   assert_different_registers(tmp, eax, ecx, edx);
 204   jmp(start);
 205   address cv = (address)_cv;
 206   address Shifter = (address)_shifter;
 207   address mmask = (address)_mmask;
 208   address bias = (address)_bias;
 209   address Tbl_addr = (address)_Tbl_addr;
 210   address ALLONES = (address)_ALLONES;
 211   address ebias = (address)_ebias;
 212   address XMAX = (address)_XMAX;
 213   address XMIN = (address)_XMIN;
 214   address INF = (address)_INF;
 215   address ZERO = (address)_ZERO;
 216   address ONE_val = (address)_ONE_val;
 217 
 218   bind(start);
 219   subq(rsp, 24);
 220   movsd(Address(rsp, 8), xmm0);
 221   unpcklpd(xmm0, xmm0);
 222   movdqu(xmm1, ExternalAddress(cv));       // 0x652b82feUL, 0x40571547UL, 0x652b82feUL, 0x40571547UL
 223   movdqu(xmm6, ExternalAddress(Shifter));  // 0x00000000UL, 0x43380000UL, 0x00000000UL, 0x43380000UL
 224   movdqu(xmm2, ExternalAddress(16+cv));    // 0xfefa0000UL, 0x3f862e42UL, 0xfefa0000UL, 0x3f862e42UL
 225   movdqu(xmm3, ExternalAddress(32+cv));    // 0xbc9e3b3aUL, 0x3d1cf79aUL, 0xbc9e3b3aUL, 0x3d1cf79aUL
 226   pextrw(eax, xmm0, 3);
 227   andl(eax, 32767);
 228   movl(edx, 16527);
 229   subl(edx, eax);
 230   subl(eax, 15504);
 231   orl(edx, eax);
 232   cmpl(edx, INT_MIN);
 233   jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
 234   mulpd(xmm1, xmm0);
 235   addpd(xmm1, xmm6);
 236   movapd(xmm7, xmm1);
 237   subpd(xmm1, xmm6);
 238   mulpd(xmm2, xmm1);
 239   movdqu(xmm4, ExternalAddress(64+cv));    // 0xe3289860UL, 0x3f56c15cUL, 0x555b9e25UL, 0x3fa55555UL
 240   mulpd(xmm3, xmm1);
 241   movdqu(xmm5, ExternalAddress(80+cv));    // 0xc090cf0fUL, 0x3f811115UL, 0x55548ba1UL, 0x3fc55555UL
 242   subpd(xmm0, xmm2);
 243   movdl(eax, xmm7);
 244   movl(ecx, eax);
 245   andl(ecx, 63);
 246   shll(ecx, 4);
 247   sarl(eax, 6);
 248   movl(edx, eax);
 249   movdqu(xmm6, ExternalAddress(mmask));    // 0xffffffc0UL, 0x00000000UL, 0xffffffc0UL, 0x00000000UL
 250   pand(xmm7, xmm6);
 251   movdqu(xmm6, ExternalAddress(bias));     // 0x0000ffc0UL, 0x00000000UL, 0x0000ffc0UL, 0x00000000UL
 252   paddq(xmm7, xmm6);
 253   psllq(xmm7, 46);
 254   subpd(xmm0, xmm3);
 255   lea(tmp, ExternalAddress(Tbl_addr));
 256   movdqu(xmm2, Address(ecx,tmp));
 257   mulpd(xmm4, xmm0);
 258   movapd(xmm6, xmm0);
 259   movapd(xmm1, xmm0);
 260   mulpd(xmm6, xmm6);
 261   mulpd(xmm0, xmm6);
 262   addpd(xmm5, xmm4);
 263   mulsd(xmm0, xmm6);
 264   mulpd(xmm6, ExternalAddress(48+cv));     // 0xfffffffeUL, 0x3fdfffffUL, 0xfffffffeUL, 0x3fdfffffUL
 265   addsd(xmm1, xmm2);
 266   unpckhpd(xmm2, xmm2);
 267   mulpd(xmm0, xmm5);
 268   addsd(xmm1, xmm0);
 269   por(xmm2, xmm7);
 270   unpckhpd(xmm0, xmm0);
 271   addsd(xmm0, xmm1);
 272   addsd(xmm0, xmm6);
 273   addl(edx, 894);
 274   cmpl(edx, 1916);
 275   jcc (Assembler::above, L_2TAG_PACKET_1_0_2);
 276   mulsd(xmm0, xmm2);
 277   addsd(xmm0, xmm2);
 278   jmp (B1_5);
 279 
 280   bind(L_2TAG_PACKET_1_0_2);
 281   xorpd(xmm3, xmm3);
 282   movdqu(xmm4, ExternalAddress(ALLONES));  // 0xffffffffUL, 0xffffffffUL, 0xffffffffUL, 0xffffffffUL
 283   movl(edx, -1022);
 284   subl(edx, eax);
 285   movdl(xmm5, edx);
 286   psllq(xmm4, xmm5);
 287   movl(ecx, eax);
 288   sarl(eax, 1);
 289   pinsrw(xmm3, eax, 3);
 290   movdqu(xmm6, ExternalAddress(ebias));    // 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x3ff00000UL
 291   psllq(xmm3, 4);
 292   psubd(xmm2, xmm3);
 293   mulsd(xmm0, xmm2);
 294   cmpl(edx, 52);
 295   jcc(Assembler::greater, L_2TAG_PACKET_2_0_2);
 296   pand(xmm4, xmm2);
 297   paddd(xmm3, xmm6);
 298   subsd(xmm2, xmm4);
 299   addsd(xmm0, xmm2);
 300   cmpl(ecx, 1023);
 301   jcc(Assembler::greaterEqual, L_2TAG_PACKET_3_0_2);
 302   pextrw(ecx, xmm0, 3);
 303   andl(ecx, 32768);
 304   orl(edx, ecx);
 305   cmpl(edx, 0);
 306   jcc(Assembler::equal, L_2TAG_PACKET_4_0_2);
 307   movapd(xmm6, xmm0);
 308   addsd(xmm0, xmm4);
 309   mulsd(xmm0, xmm3);
 310   pextrw(ecx, xmm0, 3);
 311   andl(ecx, 32752);
 312   cmpl(ecx, 0);
 313   jcc(Assembler::equal, L_2TAG_PACKET_5_0_2);
 314   jmp(B1_5);
 315 
 316   bind(L_2TAG_PACKET_5_0_2);
 317   mulsd(xmm6, xmm3);
 318   mulsd(xmm4, xmm3);
 319   movdqu(xmm0, xmm6);
 320   pxor(xmm6, xmm4);
 321   psrad(xmm6, 31);
 322   pshufd(xmm6, xmm6, 85);
 323   psllq(xmm0, 1);
 324   psrlq(xmm0, 1);
 325   pxor(xmm0, xmm6);
 326   psrlq(xmm6, 63);
 327   paddq(xmm0, xmm6);
 328   paddq(xmm0, xmm4);
 329   movl(Address(rsp,0), 15);
 330   jmp(L_2TAG_PACKET_6_0_2);
 331 
 332   bind(L_2TAG_PACKET_4_0_2);
 333   addsd(xmm0, xmm4);
 334   mulsd(xmm0, xmm3);
 335   jmp(B1_5);
 336 
 337   bind(L_2TAG_PACKET_3_0_2);
 338   addsd(xmm0, xmm4);
 339   mulsd(xmm0, xmm3);
 340   pextrw(ecx, xmm0, 3);
 341   andl(ecx, 32752);
 342   cmpl(ecx, 32752);
 343   jcc(Assembler::aboveEqual, L_2TAG_PACKET_7_0_2);
 344   jmp(B1_5);
 345 
 346   bind(L_2TAG_PACKET_2_0_2);
 347   paddd(xmm3, xmm6);
 348   addpd(xmm0, xmm2);
 349   mulsd(xmm0, xmm3);
 350   movl(Address(rsp,0), 15);
 351   jmp(L_2TAG_PACKET_6_0_2);
 352 
 353   bind(L_2TAG_PACKET_8_0_2);
 354   cmpl(eax, 2146435072);
 355   jcc(Assembler::aboveEqual, L_2TAG_PACKET_9_0_2);
 356   movl(eax, Address(rsp,12));
 357   cmpl(eax, INT_MIN);
 358   jcc(Assembler::aboveEqual, L_2TAG_PACKET_10_0_2);
 359   movsd(xmm0, ExternalAddress(XMAX));      // 0xffffffffUL, 0x7fefffffUL
 360   mulsd(xmm0, xmm0);
 361 
 362   bind(L_2TAG_PACKET_7_0_2);
 363   movl(Address(rsp,0), 14);
 364   jmp(L_2TAG_PACKET_6_0_2);
 365 
 366   bind(L_2TAG_PACKET_10_0_2);
 367   movsd(xmm0, ExternalAddress(XMIN));      // 0x00000000UL, 0x00100000UL
 368   mulsd(xmm0, xmm0);
 369   movl(Address(rsp,0), 15);
 370   jmp(L_2TAG_PACKET_6_0_2);
 371 
 372   bind(L_2TAG_PACKET_9_0_2);
 373   movl(edx, Address(rsp,8));
 374   cmpl(eax, 2146435072);
 375   jcc(Assembler::above, L_2TAG_PACKET_11_0_2);
 376   cmpl(edx, 0);
 377   jcc(Assembler::notEqual, L_2TAG_PACKET_11_0_2);
 378   movl(eax, Address(rsp,12));
 379   cmpl(eax, 2146435072);
 380   jcc(Assembler::notEqual, L_2TAG_PACKET_12_0_2);
 381   movsd(xmm0, ExternalAddress(INF));       // 0x00000000UL, 0x7ff00000UL
 382   jmp(B1_5);
 383 
 384   bind(L_2TAG_PACKET_12_0_2);
 385   movsd(xmm0, ExternalAddress(ZERO));      // 0x00000000UL, 0x00000000UL
 386   jmp(B1_5);
 387 
 388   bind(L_2TAG_PACKET_11_0_2);
 389   movsd(xmm0, Address(rsp, 8));
 390   addsd(xmm0, xmm0);
 391   jmp(B1_5);
 392 
 393   bind(L_2TAG_PACKET_0_0_2);
 394   movl(eax, Address(rsp, 12));
 395   andl(eax, 2147483647);
 396   cmpl(eax, 1083179008);
 397   jcc(Assembler::aboveEqual, L_2TAG_PACKET_8_0_2);
 398   movsd(Address(rsp, 8), xmm0);
 399   addsd(xmm0, ExternalAddress(ONE_val));   // 0x00000000UL, 0x3ff00000UL
 400   jmp(B1_5);
 401 
 402   bind(L_2TAG_PACKET_6_0_2);
 403   movq(Address(rsp, 16), xmm0);
 404 
 405   bind(B1_3);
 406   movq(xmm0, Address(rsp, 16));
 407 
 408   bind(B1_5);
 409   addq(rsp, 24);
 410 }
 411 
 412 #endif
 413 
 414 #ifndef _LP64
 415 
 416 ALIGNED_(16) juint _static_const_table[] =
 417 {
 418     0x00000000UL, 0xfff00000UL, 0x00000000UL, 0xfff00000UL, 0xffffffc0UL,
 419     0x00000000UL, 0xffffffc0UL, 0x00000000UL, 0x0000ffc0UL, 0x00000000UL,
 420     0x0000ffc0UL, 0x00000000UL, 0x00000000UL, 0x43380000UL, 0x00000000UL,
 421     0x43380000UL, 0x652b82feUL, 0x40571547UL, 0x652b82feUL, 0x40571547UL,
 422     0xfefa0000UL, 0x3f862e42UL, 0xfefa0000UL, 0x3f862e42UL, 0xbc9e3b3aUL,
 423     0x3d1cf79aUL, 0xbc9e3b3aUL, 0x3d1cf79aUL, 0xfffffffeUL, 0x3fdfffffUL,
 424     0xfffffffeUL, 0x3fdfffffUL, 0xe3289860UL, 0x3f56c15cUL, 0x555b9e25UL,
 425     0x3fa55555UL, 0xc090cf0fUL, 0x3f811115UL, 0x55548ba1UL, 0x3fc55555UL,
 426     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x0e03754dUL,
 427     0x3cad7bbfUL, 0x3e778060UL, 0x00002c9aUL, 0x3567f613UL, 0x3c8cd252UL,
 428     0xd3158574UL, 0x000059b0UL, 0x61e6c861UL, 0x3c60f74eUL, 0x18759bc8UL,
 429     0x00008745UL, 0x5d837b6cUL, 0x3c979aa6UL, 0x6cf9890fUL, 0x0000b558UL,
 430     0x702f9cd1UL, 0x3c3ebe3dUL, 0x32d3d1a2UL, 0x0000e3ecUL, 0x1e63bcd8UL,
 431     0x3ca3516eUL, 0xd0125b50UL, 0x00011301UL, 0x26f0387bUL, 0x3ca4c554UL,
 432     0xaea92ddfUL, 0x0001429aUL, 0x62523fb6UL, 0x3ca95153UL, 0x3c7d517aUL,
 433     0x000172b8UL, 0x3f1353bfUL, 0x3c8b898cUL, 0xeb6fcb75UL, 0x0001a35bUL,
 434     0x3e3a2f5fUL, 0x3c9aecf7UL, 0x3168b9aaUL, 0x0001d487UL, 0x44a6c38dUL,
 435     0x3c8a6f41UL, 0x88628cd6UL, 0x0002063bUL, 0xe3a8a894UL, 0x3c968efdUL,
 436     0x6e756238UL, 0x0002387aUL, 0x981fe7f2UL, 0x3c80472bUL, 0x65e27cddUL,
 437     0x00026b45UL, 0x6d09ab31UL, 0x3c82f7e1UL, 0xf51fdee1UL, 0x00029e9dUL,
 438     0x720c0ab3UL, 0x3c8b3782UL, 0xa6e4030bUL, 0x0002d285UL, 0x4db0abb6UL,
 439     0x3c834d75UL, 0x0a31b715UL, 0x000306feUL, 0x5dd3f84aUL, 0x3c8fdd39UL,
 440     0xb26416ffUL, 0x00033c08UL, 0xcc187d29UL, 0x3ca12f8cUL, 0x373aa9caUL,
 441     0x000371a7UL, 0x738b5e8bUL, 0x3ca7d229UL, 0x34e59ff6UL, 0x0003a7dbUL,
 442     0xa72a4c6dUL, 0x3c859f48UL, 0x4c123422UL, 0x0003dea6UL, 0x259d9205UL,
 443     0x3ca8b846UL, 0x21f72e29UL, 0x0004160aUL, 0x60c2ac12UL, 0x3c4363edUL,
 444     0x6061892dUL, 0x00044e08UL, 0xdaa10379UL, 0x3c6ecce1UL, 0xb5c13cd0UL,
 445     0x000486a2UL, 0xbb7aafb0UL, 0x3c7690ceUL, 0xd5362a27UL, 0x0004bfdaUL,
 446     0x9b282a09UL, 0x3ca083ccUL, 0x769d2ca6UL, 0x0004f9b2UL, 0xc1aae707UL,
 447     0x3ca509b0UL, 0x569d4f81UL, 0x0005342bUL, 0x18fdd78eUL, 0x3c933505UL,
 448     0x36b527daUL, 0x00056f47UL, 0xe21c5409UL, 0x3c9063e1UL, 0xdd485429UL,
 449     0x0005ab07UL, 0x2b64c035UL, 0x3c9432e6UL, 0x15ad2148UL, 0x0005e76fUL,
 450     0x99f08c0aUL, 0x3ca01284UL, 0xb03a5584UL, 0x0006247eUL, 0x0073dc06UL,
 451     0x3c99f087UL, 0x82552224UL, 0x00066238UL, 0x0da05571UL, 0x3c998d4dUL,
 452     0x667f3bccUL, 0x0006a09eUL, 0x86ce4786UL, 0x3ca52bb9UL, 0x3c651a2eUL,
 453     0x0006dfb2UL, 0x206f0dabUL, 0x3ca32092UL, 0xe8ec5f73UL, 0x00071f75UL,
 454     0x8e17a7a6UL, 0x3ca06122UL, 0x564267c8UL, 0x00075febUL, 0x461e9f86UL,
 455     0x3ca244acUL, 0x73eb0186UL, 0x0007a114UL, 0xabd66c55UL, 0x3c65ebe1UL,
 456     0x36cf4e62UL, 0x0007e2f3UL, 0xbbff67d0UL, 0x3c96fe9fUL, 0x994cce12UL,
 457     0x00082589UL, 0x14c801dfUL, 0x3c951f14UL, 0x9b4492ecUL, 0x000868d9UL,
 458     0xc1f0eab4UL, 0x3c8db72fUL, 0x422aa0dbUL, 0x0008ace5UL, 0x59f35f44UL,
 459     0x3c7bf683UL, 0x99157736UL, 0x0008f1aeUL, 0x9c06283cUL, 0x3ca360baUL,
 460     0xb0cdc5e4UL, 0x00093737UL, 0x20f962aaUL, 0x3c95e8d1UL, 0x9fde4e4fUL,
 461     0x00097d82UL, 0x2b91ce27UL, 0x3c71affcUL, 0x82a3f090UL, 0x0009c491UL,
 462     0x589a2ebdUL, 0x3c9b6d34UL, 0x7b5de564UL, 0x000a0c66UL, 0x9ab89880UL,
 463     0x3c95277cUL, 0xb23e255cUL, 0x000a5503UL, 0x6e735ab3UL, 0x3c846984UL,
 464     0x5579fdbfUL, 0x000a9e6bUL, 0x92cb3387UL, 0x3c8c1a77UL, 0x995ad3adUL,
 465     0x000ae89fUL, 0xdc2d1d96UL, 0x3ca22466UL, 0xb84f15faUL, 0x000b33a2UL,
 466     0xb19505aeUL, 0x3ca1112eUL, 0xf2fb5e46UL, 0x000b7f76UL, 0x0a5fddcdUL,
 467     0x3c74ffd7UL, 0x904bc1d2UL, 0x000bcc1eUL, 0x30af0cb3UL, 0x3c736eaeUL,
 468     0xdd85529cUL, 0x000c199bUL, 0xd10959acUL, 0x3c84e08fUL, 0x2e57d14bUL,
 469     0x000c67f1UL, 0x6c921968UL, 0x3c676b2cUL, 0xdcef9069UL, 0x000cb720UL,
 470     0x36df99b3UL, 0x3c937009UL, 0x4a07897bUL, 0x000d072dUL, 0xa63d07a7UL,
 471     0x3c74a385UL, 0xdcfba487UL, 0x000d5818UL, 0xd5c192acUL, 0x3c8e5a50UL,
 472     0x03db3285UL, 0x000da9e6UL, 0x1c4a9792UL, 0x3c98bb73UL, 0x337b9b5eUL,
 473     0x000dfc97UL, 0x603a88d3UL, 0x3c74b604UL, 0xe78b3ff6UL, 0x000e502eUL,
 474     0x92094926UL, 0x3c916f27UL, 0xa2a490d9UL, 0x000ea4afUL, 0x41aa2008UL,
 475     0x3c8ec3bcUL, 0xee615a27UL, 0x000efa1bUL, 0x31d185eeUL, 0x3c8a64a9UL,
 476     0x5b6e4540UL, 0x000f5076UL, 0x4d91cd9dUL, 0x3c77893bUL, 0x819e90d8UL,
 477     0x000fa7c1UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x7ff00000UL,
 478     0x00000000UL, 0x00000000UL, 0xffffffffUL, 0x7fefffffUL, 0x00000000UL,
 479     0x00100000UL
 480 };
 481 
 482 //registers,
 483 // input: (rbp + 8)
 484 // scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
 485 //          rax, rdx, rcx, rbx (tmp)
 486 
 487 // Code generated by Intel C compiler for LIBM library
 488 
 489 void MacroAssembler::fast_exp(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
 490   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;
 491   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;
 492   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;
 493   Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start;
 494 
 495   assert_different_registers(tmp, eax, ecx, edx);
 496   jmp(start);
 497   address static_const_table = (address)_static_const_table;
 498 
 499   bind(start);
 500   subl(rsp, 120);
 501   movl(Address(rsp, 64), tmp);
 502   lea(tmp, ExternalAddress(static_const_table));
 503   movdqu(xmm0, Address(rsp, 128));
 504   unpcklpd(xmm0, xmm0);
 505   movdqu(xmm1, Address(tmp, 64));          // 0x652b82feUL, 0x40571547UL, 0x652b82feUL, 0x40571547UL
 506   movdqu(xmm6, Address(tmp, 48));          // 0x00000000UL, 0x43380000UL, 0x00000000UL, 0x43380000UL
 507   movdqu(xmm2, Address(tmp, 80));          // 0xfefa0000UL, 0x3f862e42UL, 0xfefa0000UL, 0x3f862e42UL
 508   movdqu(xmm3, Address(tmp, 96));          // 0xbc9e3b3aUL, 0x3d1cf79aUL, 0xbc9e3b3aUL, 0x3d1cf79aUL
 509   pextrw(eax, xmm0, 3);
 510   andl(eax, 32767);
 511   movl(edx, 16527);
 512   subl(edx, eax);
 513   subl(eax, 15504);
 514   orl(edx, eax);
 515   cmpl(edx, INT_MIN);
 516   jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
 517   mulpd(xmm1, xmm0);
 518   addpd(xmm1, xmm6);
 519   movapd(xmm7, xmm1);
 520   subpd(xmm1, xmm6);
 521   mulpd(xmm2, xmm1);
 522   movdqu(xmm4, Address(tmp, 128));         // 0xe3289860UL, 0x3f56c15cUL, 0x555b9e25UL, 0x3fa55555UL
 523   mulpd(xmm3, xmm1);
 524   movdqu(xmm5, Address(tmp, 144));         // 0xc090cf0fUL, 0x3f811115UL, 0x55548ba1UL, 0x3fc55555UL
 525   subpd(xmm0, xmm2);
 526   movdl(eax, xmm7);
 527   movl(ecx, eax);
 528   andl(ecx, 63);
 529   shll(ecx, 4);
 530   sarl(eax, 6);
 531   movl(edx, eax);
 532   movdqu(xmm6, Address(tmp, 16));          // 0xffffffc0UL, 0x00000000UL, 0xffffffc0UL, 0x00000000UL
 533   pand(xmm7, xmm6);
 534   movdqu(xmm6, Address(tmp, 32));          // 0x0000ffc0UL, 0x00000000UL, 0x0000ffc0UL, 0x00000000UL
 535   paddq(xmm7, xmm6);
 536   psllq(xmm7, 46);
 537   subpd(xmm0, xmm3);
 538   movdqu(xmm2, Address(tmp, ecx, Address::times_1, 160));
 539   mulpd(xmm4, xmm0);
 540   movapd(xmm6, xmm0);
 541   movapd(xmm1, xmm0);
 542   mulpd(xmm6, xmm6);
 543   mulpd(xmm0, xmm6);
 544   addpd(xmm5, xmm4);
 545   mulsd(xmm0, xmm6);
 546   mulpd(xmm6, Address(tmp, 112));          // 0xfffffffeUL, 0x3fdfffffUL, 0xfffffffeUL, 0x3fdfffffUL
 547   addsd(xmm1, xmm2);
 548   unpckhpd(xmm2, xmm2);
 549   mulpd(xmm0, xmm5);
 550   addsd(xmm1, xmm0);
 551   por(xmm2, xmm7);
 552   unpckhpd(xmm0, xmm0);
 553   addsd(xmm0, xmm1);
 554   addsd(xmm0, xmm6);
 555   addl(edx, 894);
 556   cmpl(edx, 1916);
 557   jcc (Assembler::above, L_2TAG_PACKET_1_0_2);
 558   mulsd(xmm0, xmm2);
 559   addsd(xmm0, xmm2);
 560   jmp(L_2TAG_PACKET_2_0_2);
 561 
 562   bind(L_2TAG_PACKET_1_0_2);
 563   fnstcw(Address(rsp, 24));
 564   movzwl(edx, Address(rsp, 24));
 565   orl(edx, 768);
 566   movw(Address(rsp, 28), edx);
 567   fldcw(Address(rsp, 28));
 568   movl(edx, eax);
 569   sarl(eax, 1);
 570   subl(edx, eax);
 571   movdqu(xmm6, Address(tmp, 0));           // 0x00000000UL, 0xfff00000UL, 0x00000000UL, 0xfff00000UL
 572   pandn(xmm6, xmm2);
 573   addl(eax, 1023);
 574   movdl(xmm3, eax);
 575   psllq(xmm3, 52);
 576   por(xmm6, xmm3);
 577   addl(edx, 1023);
 578   movdl(xmm4, edx);
 579   psllq(xmm4, 52);
 580   movsd(Address(rsp, 8), xmm0);
 581   fld_d(Address(rsp, 8));
 582   movsd(Address(rsp, 16), xmm6);
 583   fld_d(Address(rsp, 16));
 584   fmula(1);
 585   faddp(1);
 586   movsd(Address(rsp, 8), xmm4);
 587   fld_d(Address(rsp, 8));
 588   fmulp(1);
 589   fstp_d(Address(rsp, 8));
 590   movsd(xmm0,Address(rsp, 8));
 591   fldcw(Address(rsp, 24));
 592   pextrw(ecx, xmm0, 3);
 593   andl(ecx, 32752);
 594   cmpl(ecx, 32752);
 595   jcc(Assembler::greaterEqual, L_2TAG_PACKET_3_0_2);
 596   cmpl(ecx, 0);
 597   jcc(Assembler::equal, L_2TAG_PACKET_4_0_2);
 598   jmp(L_2TAG_PACKET_2_0_2);
 599   cmpl(ecx, INT_MIN);
 600   jcc(Assembler::less, L_2TAG_PACKET_3_0_2);
 601   cmpl(ecx, -1064950997);
 602   jcc(Assembler::less, L_2TAG_PACKET_2_0_2);
 603   jcc(Assembler::greater, L_2TAG_PACKET_4_0_2);
 604   movl(edx, Address(rsp, 128));
 605   cmpl(edx ,-17155601);
 606   jcc(Assembler::less, L_2TAG_PACKET_2_0_2);
 607   jmp(L_2TAG_PACKET_4_0_2);
 608 
 609   bind(L_2TAG_PACKET_3_0_2);
 610   movl(edx, 14);
 611   jmp(L_2TAG_PACKET_5_0_2);
 612 
 613   bind(L_2TAG_PACKET_4_0_2);
 614   movl(edx, 15);
 615 
 616   bind(L_2TAG_PACKET_5_0_2);
 617   movsd(Address(rsp, 0), xmm0);
 618   movsd(xmm0, Address(rsp, 128));
 619   fld_d(Address(rsp, 0));
 620   jmp(L_2TAG_PACKET_6_0_2);
 621 
 622   bind(L_2TAG_PACKET_7_0_2);
 623   cmpl(eax, 2146435072);
 624   jcc(Assembler::greaterEqual, L_2TAG_PACKET_8_0_2);
 625   movl(eax, Address(rsp, 132));
 626   cmpl(eax, INT_MIN);
 627   jcc(Assembler::greaterEqual, L_2TAG_PACKET_9_0_2);
 628   movsd(xmm0, Address(tmp, 1208));         // 0xffffffffUL, 0x7fefffffUL
 629   mulsd(xmm0, xmm0);
 630   movl(edx, 14);
 631   jmp(L_2TAG_PACKET_5_0_2);
 632 
 633   bind(L_2TAG_PACKET_9_0_2);
 634   movsd(xmm0, Address(tmp, 1216));
 635   mulsd(xmm0, xmm0);
 636   movl(edx, 15);
 637   jmp(L_2TAG_PACKET_5_0_2);
 638 
 639   bind(L_2TAG_PACKET_8_0_2);
 640   movl(edx, Address(rsp, 128));
 641   cmpl(eax, 2146435072);
 642   jcc(Assembler::above, L_2TAG_PACKET_10_0_2);
 643   cmpl(edx, 0);
 644   jcc(Assembler::notEqual, L_2TAG_PACKET_10_0_2);
 645   movl(eax, Address(rsp, 132));
 646   cmpl(eax, 2146435072);
 647   jcc(Assembler::notEqual, L_2TAG_PACKET_11_0_2);
 648   movsd(xmm0, Address(tmp, 1192));         // 0x00000000UL, 0x7ff00000UL
 649   jmp(L_2TAG_PACKET_2_0_2);
 650 
 651   bind(L_2TAG_PACKET_11_0_2);
 652   movsd(xmm0, Address(tmp, 1200));         // 0x00000000UL, 0x00000000UL
 653   jmp(L_2TAG_PACKET_2_0_2);
 654 
 655   bind(L_2TAG_PACKET_10_0_2);
 656   movsd(xmm0, Address(rsp, 128));
 657   addsd(xmm0, xmm0);
 658   jmp(L_2TAG_PACKET_2_0_2);
 659 
 660   bind(L_2TAG_PACKET_0_0_2);
 661   movl(eax, Address(rsp, 132));
 662   andl(eax, 2147483647);
 663   cmpl(eax, 1083179008);
 664   jcc(Assembler::aboveEqual, L_2TAG_PACKET_7_0_2);
 665   movsd(xmm0, Address(rsp, 128));
 666   addsd(xmm0, Address(tmp, 1184));         // 0x00000000UL, 0x3ff00000UL
 667   jmp(L_2TAG_PACKET_2_0_2);
 668 
 669   bind(L_2TAG_PACKET_2_0_2);
 670   movsd(Address(rsp, 48), xmm0);
 671   fld_d(Address(rsp, 48));
 672 
 673   bind(L_2TAG_PACKET_6_0_2);
 674   movl(tmp, Address(rsp, 64));
 675 }
 676 
 677 #endif
 678 
 679 /******************************************************************************/
 680 //                     ALGORITHM DESCRIPTION - LOG()
 681 //                     ---------------------
 682 //
 683 //    x=2^k * mx, mx in [1,2)
 684 //
 685 //    Get B~1/mx based on the output of rcpss instruction (B0)
 686 //    B = int((B0*2^7+0.5))/2^7
 687 //
 688 //    Reduced argument: r=B*mx-1.0 (computed accurately in high and low parts)
 689 //
 690 //    Result:  k*log(2) - log(B) + p(r) if |x-1| >= small value (2^-6)  and
 691 //             p(r) is a degree 7 polynomial
 692 //             -log(B) read from data table (high, low parts)
 693 //             Result is formed from high and low parts
 694 //
 695 // Special cases:
 696 //  log(NaN) = quiet NaN, and raise invalid exception
 697 //  log(+INF) = that INF
 698 //  log(0) = -INF with divide-by-zero exception raised
 699 //  log(1) = +0
 700 //  log(x) = NaN with invalid exception raised if x < -0, including -INF
 701 //
 702 /******************************************************************************/
 703 
 704 #ifdef _LP64
 705 
 706 ALIGNED_(16) juint _L_tbl[] =
 707 {
 708   0xfefa3800UL, 0x3fe62e42UL, 0x93c76730UL, 0x3d2ef357UL, 0xaa241800UL,
 709   0x3fe5ee82UL, 0x0cda46beUL, 0x3d220238UL, 0x5c364800UL, 0x3fe5af40UL,
 710   0xac10c9fbUL, 0x3d2dfa63UL, 0x26bb8c00UL, 0x3fe5707aUL, 0xff3303ddUL,
 711   0x3d09980bUL, 0x26867800UL, 0x3fe5322eUL, 0x5d257531UL, 0x3d05ccc4UL,
 712   0x835a5000UL, 0x3fe4f45aUL, 0x6d93b8fbUL, 0xbd2e6c51UL, 0x6f970c00UL,
 713   0x3fe4b6fdUL, 0xed4c541cUL, 0x3cef7115UL, 0x27e8a400UL, 0x3fe47a15UL,
 714   0xf94d60aaUL, 0xbd22cb6aUL, 0xf2f92400UL, 0x3fe43d9fUL, 0x481051f7UL,
 715   0xbcfd984fUL, 0x2125cc00UL, 0x3fe4019cUL, 0x30f0c74cUL, 0xbd26ce79UL,
 716   0x0c36c000UL, 0x3fe3c608UL, 0x7cfe13c2UL, 0xbd02b736UL, 0x17197800UL,
 717   0x3fe38ae2UL, 0xbb5569a4UL, 0xbd218b7aUL, 0xad9d8c00UL, 0x3fe35028UL,
 718   0x9527e6acUL, 0x3d10b83fUL, 0x44340800UL, 0x3fe315daUL, 0xc5a0ed9cUL,
 719   0xbd274e93UL, 0x57b0e000UL, 0x3fe2dbf5UL, 0x07b9dc11UL, 0xbd17a6e5UL,
 720   0x6d0ec000UL, 0x3fe2a278UL, 0xe797882dUL, 0x3d206d2bUL, 0x1134dc00UL,
 721   0x3fe26962UL, 0x05226250UL, 0xbd0b61f1UL, 0xd8bebc00UL, 0x3fe230b0UL,
 722   0x6e48667bUL, 0x3d12fc06UL, 0x5fc61800UL, 0x3fe1f863UL, 0xc9fe81d3UL,
 723   0xbd2a7242UL, 0x49ae6000UL, 0x3fe1c078UL, 0xed70e667UL, 0x3cccacdeUL,
 724   0x40f23c00UL, 0x3fe188eeUL, 0xf8ab4650UL, 0x3d14cc4eUL, 0xf6f29800UL,
 725   0x3fe151c3UL, 0xa293ae49UL, 0xbd2edd97UL, 0x23c75c00UL, 0x3fe11af8UL,
 726   0xbb9ddcb2UL, 0xbd258647UL, 0x8611cc00UL, 0x3fe0e489UL, 0x07801742UL,
 727   0x3d1c2998UL, 0xe2d05400UL, 0x3fe0ae76UL, 0x887e7e27UL, 0x3d1f486bUL,
 728   0x0533c400UL, 0x3fe078bfUL, 0x41edf5fdUL, 0x3d268122UL, 0xbe760400UL,
 729   0x3fe04360UL, 0xe79539e0UL, 0xbd04c45fUL, 0xe5b20800UL, 0x3fe00e5aUL,
 730   0xb1727b1cUL, 0xbd053ba3UL, 0xaf7a4800UL, 0x3fdfb358UL, 0x3c164935UL,
 731   0x3d0085faUL, 0xee031800UL, 0x3fdf4aa7UL, 0x6f014a8bUL, 0x3d12cde5UL,
 732   0x56b41000UL, 0x3fdee2a1UL, 0x5a470251UL, 0x3d2f27f4UL, 0xc3ddb000UL,
 733   0x3fde7b42UL, 0x5372bd08UL, 0xbd246550UL, 0x1a272800UL, 0x3fde148aUL,
 734   0x07322938UL, 0xbd1326b2UL, 0x484c9800UL, 0x3fddae75UL, 0x60dc616aUL,
 735   0xbd1ea42dUL, 0x46def800UL, 0x3fdd4902UL, 0xe9a767a8UL, 0x3d235bafUL,
 736   0x18064800UL, 0x3fdce42fUL, 0x3ec7a6b0UL, 0xbd0797c3UL, 0xc7455800UL,
 737   0x3fdc7ff9UL, 0xc15249aeUL, 0xbd29b6ddUL, 0x693fa000UL, 0x3fdc1c60UL,
 738   0x7fe8e180UL, 0x3d2cec80UL, 0x1b80e000UL, 0x3fdbb961UL, 0xf40a666dUL,
 739   0x3d27d85bUL, 0x04462800UL, 0x3fdb56faUL, 0x2d841995UL, 0x3d109525UL,
 740   0x5248d000UL, 0x3fdaf529UL, 0x52774458UL, 0xbd217cc5UL, 0x3c8ad800UL,
 741   0x3fda93edUL, 0xbea77a5dUL, 0x3d1e36f2UL, 0x0224f800UL, 0x3fda3344UL,
 742   0x7f9d79f5UL, 0x3d23c645UL, 0xea15f000UL, 0x3fd9d32bUL, 0x10d0c0b0UL,
 743   0xbd26279eUL, 0x43135800UL, 0x3fd973a3UL, 0xa502d9f0UL, 0xbd152313UL,
 744   0x635bf800UL, 0x3fd914a8UL, 0x2ee6307dUL, 0xbd1766b5UL, 0xa88b3000UL,
 745   0x3fd8b639UL, 0xe5e70470UL, 0xbd205ae1UL, 0x776dc800UL, 0x3fd85855UL,
 746   0x3333778aUL, 0x3d2fd56fUL, 0x3bd81800UL, 0x3fd7fafaUL, 0xc812566aUL,
 747   0xbd272090UL, 0x687cf800UL, 0x3fd79e26UL, 0x2efd1778UL, 0x3d29ec7dUL,
 748   0x76c67800UL, 0x3fd741d8UL, 0x49dc60b3UL, 0x3d2d8b09UL, 0xe6af1800UL,
 749   0x3fd6e60eUL, 0x7c222d87UL, 0x3d172165UL, 0x3e9c6800UL, 0x3fd68ac8UL,
 750   0x2756eba0UL, 0x3d20a0d3UL, 0x0b3ab000UL, 0x3fd63003UL, 0xe731ae00UL,
 751   0xbd2db623UL, 0xdf596000UL, 0x3fd5d5bdUL, 0x08a465dcUL, 0xbd0a0b2aUL,
 752   0x53c8d000UL, 0x3fd57bf7UL, 0xee5d40efUL, 0x3d1fadedUL, 0x0738a000UL,
 753   0x3fd522aeUL, 0x8164c759UL, 0x3d2ebe70UL, 0x9e173000UL, 0x3fd4c9e0UL,
 754   0x1b0ad8a4UL, 0xbd2e2089UL, 0xc271c800UL, 0x3fd4718dUL, 0x0967d675UL,
 755   0xbd2f27ceUL, 0x23d5e800UL, 0x3fd419b4UL, 0xec90e09dUL, 0x3d08e436UL,
 756   0x77333000UL, 0x3fd3c252UL, 0xb606bd5cUL, 0x3d183b54UL, 0x76be1000UL,
 757   0x3fd36b67UL, 0xb0f177c8UL, 0x3d116ecdUL, 0xe1d36000UL, 0x3fd314f1UL,
 758   0xd3213cb8UL, 0xbd28e27aUL, 0x7cdc9000UL, 0x3fd2bef0UL, 0x4a5004f4UL,
 759   0x3d2a9cfaUL, 0x1134d800UL, 0x3fd26962UL, 0xdf5bb3b6UL, 0x3d2c93c1UL,
 760   0x6d0eb800UL, 0x3fd21445UL, 0xba46baeaUL, 0x3d0a87deUL, 0x635a6800UL,
 761   0x3fd1bf99UL, 0x5147bdb7UL, 0x3d2ca6edUL, 0xcbacf800UL, 0x3fd16b5cUL,
 762   0xf7a51681UL, 0x3d2b9acdUL, 0x8227e800UL, 0x3fd1178eUL, 0x63a5f01cUL,
 763   0xbd2c210eUL, 0x67616000UL, 0x3fd0c42dUL, 0x163ceae9UL, 0x3d27188bUL,
 764   0x604d5800UL, 0x3fd07138UL, 0x16ed4e91UL, 0x3cf89cdbUL, 0x5626c800UL,
 765   0x3fd01eaeUL, 0x1485e94aUL, 0xbd16f08cUL, 0x6cb3b000UL, 0x3fcf991cUL,
 766   0xca0cdf30UL, 0x3d1bcbecUL, 0xe4dd0000UL, 0x3fcef5adUL, 0x65bb8e11UL,
 767   0xbcca2115UL, 0xffe71000UL, 0x3fce530eUL, 0x6041f430UL, 0x3cc21227UL,
 768   0xb0d49000UL, 0x3fcdb13dUL, 0xf715b035UL, 0xbd2aff2aUL, 0xf2656000UL,
 769   0x3fcd1037UL, 0x75b6f6e4UL, 0xbd084a7eUL, 0xc6f01000UL, 0x3fcc6ffbUL,
 770   0xc5962bd2UL, 0xbcf1ec72UL, 0x383be000UL, 0x3fcbd087UL, 0x595412b6UL,
 771   0xbd2d4bc4UL, 0x575bd000UL, 0x3fcb31d8UL, 0x4eace1aaUL, 0xbd0c358dUL,
 772   0x3c8ae000UL, 0x3fca93edUL, 0x50562169UL, 0xbd287243UL, 0x07089000UL,
 773   0x3fc9f6c4UL, 0x6865817aUL, 0x3d29904dUL, 0xdcf70000UL, 0x3fc95a5aUL,
 774   0x58a0ff6fUL, 0x3d07f228UL, 0xeb390000UL, 0x3fc8beafUL, 0xaae92cd1UL,
 775   0xbd073d54UL, 0x6551a000UL, 0x3fc823c1UL, 0x9a631e83UL, 0x3d1e0ddbUL,
 776   0x85445000UL, 0x3fc7898dUL, 0x70914305UL, 0xbd1c6610UL, 0x8b757000UL,
 777   0x3fc6f012UL, 0xe59c21e1UL, 0xbd25118dUL, 0xbe8c1000UL, 0x3fc6574eUL,
 778   0x2c3c2e78UL, 0x3d19cf8bUL, 0x6b544000UL, 0x3fc5bf40UL, 0xeb68981cUL,
 779   0xbd127023UL, 0xe4a1b000UL, 0x3fc527e5UL, 0xe5697dc7UL, 0x3d2633e8UL,
 780   0x8333b000UL, 0x3fc4913dUL, 0x54fdb678UL, 0x3d258379UL, 0xa5993000UL,
 781   0x3fc3fb45UL, 0x7e6a354dUL, 0xbd2cd1d8UL, 0xb0159000UL, 0x3fc365fcUL,
 782   0x234b7289UL, 0x3cc62fa8UL, 0x0c868000UL, 0x3fc2d161UL, 0xcb81b4a1UL,
 783   0x3d039d6cUL, 0x2a49c000UL, 0x3fc23d71UL, 0x8fd3df5cUL, 0x3d100d23UL,
 784   0x7e23f000UL, 0x3fc1aa2bUL, 0x44389934UL, 0x3d2ca78eUL, 0x8227e000UL,
 785   0x3fc1178eUL, 0xce2d07f2UL, 0x3d21ef78UL, 0xb59e4000UL, 0x3fc08598UL,
 786   0x7009902cUL, 0xbd27e5ddUL, 0x39dbe000UL, 0x3fbfe891UL, 0x4fa10afdUL,
 787   0xbd2534d6UL, 0x830a2000UL, 0x3fbec739UL, 0xafe645e0UL, 0xbd2dc068UL,
 788   0x63844000UL, 0x3fbda727UL, 0x1fa71733UL, 0x3d1a8940UL, 0x01bc4000UL,
 789   0x3fbc8858UL, 0xc65aacd3UL, 0x3d2646d1UL, 0x8dad6000UL, 0x3fbb6ac8UL,
 790   0x2bf768e5UL, 0xbd139080UL, 0x40b1c000UL, 0x3fba4e76UL, 0xb94407c8UL,
 791   0xbd0e42b6UL, 0x5d594000UL, 0x3fb9335eUL, 0x3abd47daUL, 0x3d23115cUL,
 792   0x2f40e000UL, 0x3fb8197eUL, 0xf96ffdf7UL, 0x3d0f80dcUL, 0x0aeac000UL,
 793   0x3fb700d3UL, 0xa99ded32UL, 0x3cec1e8dUL, 0x4d97a000UL, 0x3fb5e95aUL,
 794   0x3c5d1d1eUL, 0xbd2c6906UL, 0x5d208000UL, 0x3fb4d311UL, 0x82f4e1efUL,
 795   0xbcf53a25UL, 0xa7d1e000UL, 0x3fb3bdf5UL, 0xa5db4ed7UL, 0x3d2cc85eUL,
 796   0xa4472000UL, 0x3fb2aa04UL, 0xae9c697dUL, 0xbd20b6e8UL, 0xd1466000UL,
 797   0x3fb1973bUL, 0x560d9e9bUL, 0xbd25325dUL, 0xb59e4000UL, 0x3fb08598UL,
 798   0x7009902cUL, 0xbd17e5ddUL, 0xc006c000UL, 0x3faeea31UL, 0x4fc93b7bUL,
 799   0xbd0e113eUL, 0xcdddc000UL, 0x3faccb73UL, 0x47d82807UL, 0xbd1a68f2UL,
 800   0xd0fb0000UL, 0x3faaaef2UL, 0x353bb42eUL, 0x3d20fc1aUL, 0x149fc000UL,
 801   0x3fa894aaUL, 0xd05a267dUL, 0xbd197995UL, 0xf2d4c000UL, 0x3fa67c94UL,
 802   0xec19afa2UL, 0xbd029efbUL, 0xd42e0000UL, 0x3fa466aeUL, 0x75bdfd28UL,
 803   0xbd2c1673UL, 0x2f8d0000UL, 0x3fa252f3UL, 0xe021b67bUL, 0x3d283e9aUL,
 804   0x89e74000UL, 0x3fa0415dUL, 0x5cf1d753UL, 0x3d0111c0UL, 0xec148000UL,
 805   0x3f9c63d2UL, 0x3f9eb2f3UL, 0x3d2578c6UL, 0x28c90000UL, 0x3f984925UL,
 806   0x325a0c34UL, 0xbd2aa0baUL, 0x25980000UL, 0x3f9432a9UL, 0x928637feUL,
 807   0x3d098139UL, 0x58938000UL, 0x3f902056UL, 0x06e2f7d2UL, 0xbd23dc5bUL,
 808   0xa3890000UL, 0x3f882448UL, 0xda74f640UL, 0xbd275577UL, 0x75890000UL,
 809   0x3f801015UL, 0x999d2be8UL, 0xbd10c76bUL, 0x59580000UL, 0x3f700805UL,
 810   0xcb31c67bUL, 0x3d2166afUL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
 811   0x80000000UL
 812 };
 813 
 814 ALIGNED_(16) juint _log2[] =
 815 {
 816   0xfefa3800UL, 0x3fa62e42UL, 0x93c76730UL, 0x3ceef357UL
 817 };
 818 
 819 ALIGNED_(16) juint _coeff[] =
 820 {
 821   0x92492492UL, 0x3fc24924UL, 0x00000000UL, 0xbfd00000UL, 0x3d6fb175UL,
 822   0xbfc5555eUL, 0x55555555UL, 0x3fd55555UL, 0x9999999aUL, 0x3fc99999UL,
 823   0x00000000UL, 0xbfe00000UL
 824 };
 825 
 826 //registers,
 827 // input: xmm0
 828 // scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
 829 //          rax, rdx, rcx, r8, r11
 830 
 831 void MacroAssembler::fast_log(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp1, Register tmp2) {
 832   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;
 833   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;
 834   Label L_2TAG_PACKET_8_0_2;
 835   Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start;
 836 
 837   assert_different_registers(tmp1, tmp2, eax, ecx, edx);
 838   jmp(start);
 839   address L_tbl = (address)_L_tbl;
 840   address log2 = (address)_log2;
 841   address coeff = (address)_coeff;
 842 
 843   bind(start);
 844   subq(rsp, 24);
 845   movsd(Address(rsp, 0), xmm0);
 846   mov64(rax, 0x3ff0000000000000);
 847   movdq(xmm2, rax);
 848   mov64(rdx, 0x77f0000000000000);
 849   movdq(xmm3, rdx);
 850   movl(ecx, 32768);
 851   movdl(xmm4, rcx);
 852   mov64(tmp1, 0xffffe00000000000);
 853   movdq(xmm5, tmp1);
 854   movdqu(xmm1, xmm0);
 855   pextrw(eax, xmm0, 3);
 856   por(xmm0, xmm2);
 857   movl(ecx, 16352);
 858   psrlq(xmm0, 27);
 859   lea(tmp2, ExternalAddress(L_tbl));
 860   psrld(xmm0, 2);
 861   rcpps(xmm0, xmm0);
 862   psllq(xmm1, 12);
 863   pshufd(xmm6, xmm5, 228);
 864   psrlq(xmm1, 12);
 865   subl(eax, 16);
 866   cmpl(eax, 32736);
 867   jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
 868 
 869   bind(L_2TAG_PACKET_1_0_2);
 870   paddd(xmm0, xmm4);
 871   por(xmm1, xmm3);
 872   movdl(edx, xmm0);
 873   psllq(xmm0, 29);
 874   pand(xmm5, xmm1);
 875   pand(xmm0, xmm6);
 876   subsd(xmm1, xmm5);
 877   mulpd(xmm5, xmm0);
 878   andl(eax, 32752);
 879   subl(eax, ecx);
 880   cvtsi2sdl(xmm7, eax);
 881   mulsd(xmm1, xmm0);
 882   movq(xmm6, ExternalAddress(log2));       // 0xfefa3800UL, 0x3fa62e42UL
 883   movdqu(xmm3, ExternalAddress(coeff));    // 0x92492492UL, 0x3fc24924UL, 0x00000000UL, 0xbfd00000UL
 884   subsd(xmm5, xmm2);
 885   andl(edx, 16711680);
 886   shrl(edx, 12);
 887   movdqu(xmm0, Address(tmp2, edx));
 888   movdqu(xmm4, ExternalAddress(16 + coeff)); // 0x3d6fb175UL, 0xbfc5555eUL, 0x55555555UL, 0x3fd55555UL
 889   addsd(xmm1, xmm5);
 890   movdqu(xmm2, ExternalAddress(32 + coeff)); // 0x9999999aUL, 0x3fc99999UL, 0x00000000UL, 0xbfe00000UL
 891   mulsd(xmm6, xmm7);
 892   movddup(xmm5, xmm1);
 893   mulsd(xmm7, ExternalAddress(8 + log2));    // 0x93c76730UL, 0x3ceef357UL
 894   mulsd(xmm3, xmm1);
 895   addsd(xmm0, xmm6);
 896   mulpd(xmm4, xmm5);
 897   mulpd(xmm5, xmm5);
 898   movddup(xmm6, xmm0);
 899   addsd(xmm0, xmm1);
 900   addpd(xmm4, xmm2);
 901   mulpd(xmm3, xmm5);
 902   subsd(xmm6, xmm0);
 903   mulsd(xmm4, xmm1);
 904   pshufd(xmm2, xmm0, 238);
 905   addsd(xmm1, xmm6);
 906   mulsd(xmm5, xmm5);
 907   addsd(xmm7, xmm2);
 908   addpd(xmm4, xmm3);
 909   addsd(xmm1, xmm7);
 910   mulpd(xmm4, xmm5);
 911   addsd(xmm1, xmm4);
 912   pshufd(xmm5, xmm4, 238);
 913   addsd(xmm1, xmm5);
 914   addsd(xmm0, xmm1);
 915   jmp(B1_5);
 916 
 917   bind(L_2TAG_PACKET_0_0_2);
 918   movq(xmm0, Address(rsp, 0));
 919   movq(xmm1, Address(rsp, 0));
 920   addl(eax, 16);
 921   cmpl(eax, 32768);
 922   jcc(Assembler::aboveEqual, L_2TAG_PACKET_2_0_2);
 923   cmpl(eax, 16);
 924   jcc(Assembler::below, L_2TAG_PACKET_3_0_2);
 925 
 926   bind(L_2TAG_PACKET_4_0_2);
 927   addsd(xmm0, xmm0);
 928   jmp(B1_5);
 929 
 930   bind(L_2TAG_PACKET_5_0_2);
 931   jcc(Assembler::above, L_2TAG_PACKET_4_0_2);
 932   cmpl(edx, 0);
 933   jcc(Assembler::above, L_2TAG_PACKET_4_0_2);
 934   jmp(L_2TAG_PACKET_6_0_2);
 935 
 936   bind(L_2TAG_PACKET_3_0_2);
 937   xorpd(xmm1, xmm1);
 938   addsd(xmm1, xmm0);
 939   movdl(edx, xmm1);
 940   psrlq(xmm1, 32);
 941   movdl(ecx, xmm1);
 942   orl(edx, ecx);
 943   cmpl(edx, 0);
 944   jcc(Assembler::equal, L_2TAG_PACKET_7_0_2);
 945   xorpd(xmm1, xmm1);
 946   movl(eax, 18416);
 947   pinsrw(xmm1, eax, 3);
 948   mulsd(xmm0, xmm1);
 949   movdqu(xmm1, xmm0);
 950   pextrw(eax, xmm0, 3);
 951   por(xmm0, xmm2);
 952   psrlq(xmm0, 27);
 953   movl(ecx, 18416);
 954   psrld(xmm0, 2);
 955   rcpps(xmm0, xmm0);
 956   psllq(xmm1, 12);
 957   pshufd(xmm6, xmm5, 228);
 958   psrlq(xmm1, 12);
 959   jmp(L_2TAG_PACKET_1_0_2);
 960 
 961   bind(L_2TAG_PACKET_2_0_2);
 962   movdl(edx, xmm1);
 963   psrlq(xmm1, 32);
 964   movdl(ecx, xmm1);
 965   addl(ecx, ecx);
 966   cmpl(ecx, -2097152);
 967   jcc(Assembler::aboveEqual, L_2TAG_PACKET_5_0_2);
 968   orl(edx, ecx);
 969   cmpl(edx, 0);
 970   jcc(Assembler::equal, L_2TAG_PACKET_7_0_2);
 971 
 972   bind(L_2TAG_PACKET_6_0_2);
 973   xorpd(xmm1, xmm1);
 974   xorpd(xmm0, xmm0);
 975   movl(eax, 32752);
 976   pinsrw(xmm1, eax, 3);
 977   mulsd(xmm0, xmm1);
 978   movl(Address(rsp, 16), 3);
 979   jmp(L_2TAG_PACKET_8_0_2);
 980   bind(L_2TAG_PACKET_7_0_2);
 981   xorpd(xmm1, xmm1);
 982   xorpd(xmm0, xmm0);
 983   movl(eax, 49136);
 984   pinsrw(xmm0, eax, 3);
 985   divsd(xmm0, xmm1);
 986   movl(Address(rsp, 16), 2);
 987 
 988   bind(L_2TAG_PACKET_8_0_2);
 989   movq(Address(rsp, 8), xmm0);
 990 
 991   bind(B1_3);
 992   movq(xmm0, Address(rsp, 8));
 993 
 994   bind(B1_5);
 995   addq(rsp, 24);
 996 }
 997 
 998 #endif
 999 
1000 #ifndef _LP64
1001 
1002 ALIGNED_(16) juint _static_const_table_log[] =
1003 {
1004   0xfefa3800UL, 0x3fe62e42UL, 0x93c76730UL, 0x3d2ef357UL, 0xaa241800UL,
1005   0x3fe5ee82UL, 0x0cda46beUL, 0x3d220238UL, 0x5c364800UL, 0x3fe5af40UL,
1006   0xac10c9fbUL, 0x3d2dfa63UL, 0x26bb8c00UL, 0x3fe5707aUL, 0xff3303ddUL,
1007   0x3d09980bUL, 0x26867800UL, 0x3fe5322eUL, 0x5d257531UL, 0x3d05ccc4UL,
1008   0x835a5000UL, 0x3fe4f45aUL, 0x6d93b8fbUL, 0xbd2e6c51UL, 0x6f970c00UL,
1009   0x3fe4b6fdUL, 0xed4c541cUL, 0x3cef7115UL, 0x27e8a400UL, 0x3fe47a15UL,
1010   0xf94d60aaUL, 0xbd22cb6aUL, 0xf2f92400UL, 0x3fe43d9fUL, 0x481051f7UL,
1011   0xbcfd984fUL, 0x2125cc00UL, 0x3fe4019cUL, 0x30f0c74cUL, 0xbd26ce79UL,
1012   0x0c36c000UL, 0x3fe3c608UL, 0x7cfe13c2UL, 0xbd02b736UL, 0x17197800UL,
1013   0x3fe38ae2UL, 0xbb5569a4UL, 0xbd218b7aUL, 0xad9d8c00UL, 0x3fe35028UL,
1014   0x9527e6acUL, 0x3d10b83fUL, 0x44340800UL, 0x3fe315daUL, 0xc5a0ed9cUL,
1015   0xbd274e93UL, 0x57b0e000UL, 0x3fe2dbf5UL, 0x07b9dc11UL, 0xbd17a6e5UL,
1016   0x6d0ec000UL, 0x3fe2a278UL, 0xe797882dUL, 0x3d206d2bUL, 0x1134dc00UL,
1017   0x3fe26962UL, 0x05226250UL, 0xbd0b61f1UL, 0xd8bebc00UL, 0x3fe230b0UL,
1018   0x6e48667bUL, 0x3d12fc06UL, 0x5fc61800UL, 0x3fe1f863UL, 0xc9fe81d3UL,
1019   0xbd2a7242UL, 0x49ae6000UL, 0x3fe1c078UL, 0xed70e667UL, 0x3cccacdeUL,
1020   0x40f23c00UL, 0x3fe188eeUL, 0xf8ab4650UL, 0x3d14cc4eUL, 0xf6f29800UL,
1021   0x3fe151c3UL, 0xa293ae49UL, 0xbd2edd97UL, 0x23c75c00UL, 0x3fe11af8UL,
1022   0xbb9ddcb2UL, 0xbd258647UL, 0x8611cc00UL, 0x3fe0e489UL, 0x07801742UL,
1023   0x3d1c2998UL, 0xe2d05400UL, 0x3fe0ae76UL, 0x887e7e27UL, 0x3d1f486bUL,
1024   0x0533c400UL, 0x3fe078bfUL, 0x41edf5fdUL, 0x3d268122UL, 0xbe760400UL,
1025   0x3fe04360UL, 0xe79539e0UL, 0xbd04c45fUL, 0xe5b20800UL, 0x3fe00e5aUL,
1026   0xb1727b1cUL, 0xbd053ba3UL, 0xaf7a4800UL, 0x3fdfb358UL, 0x3c164935UL,
1027   0x3d0085faUL, 0xee031800UL, 0x3fdf4aa7UL, 0x6f014a8bUL, 0x3d12cde5UL,
1028   0x56b41000UL, 0x3fdee2a1UL, 0x5a470251UL, 0x3d2f27f4UL, 0xc3ddb000UL,
1029   0x3fde7b42UL, 0x5372bd08UL, 0xbd246550UL, 0x1a272800UL, 0x3fde148aUL,
1030   0x07322938UL, 0xbd1326b2UL, 0x484c9800UL, 0x3fddae75UL, 0x60dc616aUL,
1031   0xbd1ea42dUL, 0x46def800UL, 0x3fdd4902UL, 0xe9a767a8UL, 0x3d235bafUL,
1032   0x18064800UL, 0x3fdce42fUL, 0x3ec7a6b0UL, 0xbd0797c3UL, 0xc7455800UL,
1033   0x3fdc7ff9UL, 0xc15249aeUL, 0xbd29b6ddUL, 0x693fa000UL, 0x3fdc1c60UL,
1034   0x7fe8e180UL, 0x3d2cec80UL, 0x1b80e000UL, 0x3fdbb961UL, 0xf40a666dUL,
1035   0x3d27d85bUL, 0x04462800UL, 0x3fdb56faUL, 0x2d841995UL, 0x3d109525UL,
1036   0x5248d000UL, 0x3fdaf529UL, 0x52774458UL, 0xbd217cc5UL, 0x3c8ad800UL,
1037   0x3fda93edUL, 0xbea77a5dUL, 0x3d1e36f2UL, 0x0224f800UL, 0x3fda3344UL,
1038   0x7f9d79f5UL, 0x3d23c645UL, 0xea15f000UL, 0x3fd9d32bUL, 0x10d0c0b0UL,
1039   0xbd26279eUL, 0x43135800UL, 0x3fd973a3UL, 0xa502d9f0UL, 0xbd152313UL,
1040   0x635bf800UL, 0x3fd914a8UL, 0x2ee6307dUL, 0xbd1766b5UL, 0xa88b3000UL,
1041   0x3fd8b639UL, 0xe5e70470UL, 0xbd205ae1UL, 0x776dc800UL, 0x3fd85855UL,
1042   0x3333778aUL, 0x3d2fd56fUL, 0x3bd81800UL, 0x3fd7fafaUL, 0xc812566aUL,
1043   0xbd272090UL, 0x687cf800UL, 0x3fd79e26UL, 0x2efd1778UL, 0x3d29ec7dUL,
1044   0x76c67800UL, 0x3fd741d8UL, 0x49dc60b3UL, 0x3d2d8b09UL, 0xe6af1800UL,
1045   0x3fd6e60eUL, 0x7c222d87UL, 0x3d172165UL, 0x3e9c6800UL, 0x3fd68ac8UL,
1046   0x2756eba0UL, 0x3d20a0d3UL, 0x0b3ab000UL, 0x3fd63003UL, 0xe731ae00UL,
1047   0xbd2db623UL, 0xdf596000UL, 0x3fd5d5bdUL, 0x08a465dcUL, 0xbd0a0b2aUL,
1048   0x53c8d000UL, 0x3fd57bf7UL, 0xee5d40efUL, 0x3d1fadedUL, 0x0738a000UL,
1049   0x3fd522aeUL, 0x8164c759UL, 0x3d2ebe70UL, 0x9e173000UL, 0x3fd4c9e0UL,
1050   0x1b0ad8a4UL, 0xbd2e2089UL, 0xc271c800UL, 0x3fd4718dUL, 0x0967d675UL,
1051   0xbd2f27ceUL, 0x23d5e800UL, 0x3fd419b4UL, 0xec90e09dUL, 0x3d08e436UL,
1052   0x77333000UL, 0x3fd3c252UL, 0xb606bd5cUL, 0x3d183b54UL, 0x76be1000UL,
1053   0x3fd36b67UL, 0xb0f177c8UL, 0x3d116ecdUL, 0xe1d36000UL, 0x3fd314f1UL,
1054   0xd3213cb8UL, 0xbd28e27aUL, 0x7cdc9000UL, 0x3fd2bef0UL, 0x4a5004f4UL,
1055   0x3d2a9cfaUL, 0x1134d800UL, 0x3fd26962UL, 0xdf5bb3b6UL, 0x3d2c93c1UL,
1056   0x6d0eb800UL, 0x3fd21445UL, 0xba46baeaUL, 0x3d0a87deUL, 0x635a6800UL,
1057   0x3fd1bf99UL, 0x5147bdb7UL, 0x3d2ca6edUL, 0xcbacf800UL, 0x3fd16b5cUL,
1058   0xf7a51681UL, 0x3d2b9acdUL, 0x8227e800UL, 0x3fd1178eUL, 0x63a5f01cUL,
1059   0xbd2c210eUL, 0x67616000UL, 0x3fd0c42dUL, 0x163ceae9UL, 0x3d27188bUL,
1060   0x604d5800UL, 0x3fd07138UL, 0x16ed4e91UL, 0x3cf89cdbUL, 0x5626c800UL,
1061   0x3fd01eaeUL, 0x1485e94aUL, 0xbd16f08cUL, 0x6cb3b000UL, 0x3fcf991cUL,
1062   0xca0cdf30UL, 0x3d1bcbecUL, 0xe4dd0000UL, 0x3fcef5adUL, 0x65bb8e11UL,
1063   0xbcca2115UL, 0xffe71000UL, 0x3fce530eUL, 0x6041f430UL, 0x3cc21227UL,
1064   0xb0d49000UL, 0x3fcdb13dUL, 0xf715b035UL, 0xbd2aff2aUL, 0xf2656000UL,
1065   0x3fcd1037UL, 0x75b6f6e4UL, 0xbd084a7eUL, 0xc6f01000UL, 0x3fcc6ffbUL,
1066   0xc5962bd2UL, 0xbcf1ec72UL, 0x383be000UL, 0x3fcbd087UL, 0x595412b6UL,
1067   0xbd2d4bc4UL, 0x575bd000UL, 0x3fcb31d8UL, 0x4eace1aaUL, 0xbd0c358dUL,
1068   0x3c8ae000UL, 0x3fca93edUL, 0x50562169UL, 0xbd287243UL, 0x07089000UL,
1069   0x3fc9f6c4UL, 0x6865817aUL, 0x3d29904dUL, 0xdcf70000UL, 0x3fc95a5aUL,
1070   0x58a0ff6fUL, 0x3d07f228UL, 0xeb390000UL, 0x3fc8beafUL, 0xaae92cd1UL,
1071   0xbd073d54UL, 0x6551a000UL, 0x3fc823c1UL, 0x9a631e83UL, 0x3d1e0ddbUL,
1072   0x85445000UL, 0x3fc7898dUL, 0x70914305UL, 0xbd1c6610UL, 0x8b757000UL,
1073   0x3fc6f012UL, 0xe59c21e1UL, 0xbd25118dUL, 0xbe8c1000UL, 0x3fc6574eUL,
1074   0x2c3c2e78UL, 0x3d19cf8bUL, 0x6b544000UL, 0x3fc5bf40UL, 0xeb68981cUL,
1075   0xbd127023UL, 0xe4a1b000UL, 0x3fc527e5UL, 0xe5697dc7UL, 0x3d2633e8UL,
1076   0x8333b000UL, 0x3fc4913dUL, 0x54fdb678UL, 0x3d258379UL, 0xa5993000UL,
1077   0x3fc3fb45UL, 0x7e6a354dUL, 0xbd2cd1d8UL, 0xb0159000UL, 0x3fc365fcUL,
1078   0x234b7289UL, 0x3cc62fa8UL, 0x0c868000UL, 0x3fc2d161UL, 0xcb81b4a1UL,
1079   0x3d039d6cUL, 0x2a49c000UL, 0x3fc23d71UL, 0x8fd3df5cUL, 0x3d100d23UL,
1080   0x7e23f000UL, 0x3fc1aa2bUL, 0x44389934UL, 0x3d2ca78eUL, 0x8227e000UL,
1081   0x3fc1178eUL, 0xce2d07f2UL, 0x3d21ef78UL, 0xb59e4000UL, 0x3fc08598UL,
1082   0x7009902cUL, 0xbd27e5ddUL, 0x39dbe000UL, 0x3fbfe891UL, 0x4fa10afdUL,
1083   0xbd2534d6UL, 0x830a2000UL, 0x3fbec739UL, 0xafe645e0UL, 0xbd2dc068UL,
1084   0x63844000UL, 0x3fbda727UL, 0x1fa71733UL, 0x3d1a8940UL, 0x01bc4000UL,
1085   0x3fbc8858UL, 0xc65aacd3UL, 0x3d2646d1UL, 0x8dad6000UL, 0x3fbb6ac8UL,
1086   0x2bf768e5UL, 0xbd139080UL, 0x40b1c000UL, 0x3fba4e76UL, 0xb94407c8UL,
1087   0xbd0e42b6UL, 0x5d594000UL, 0x3fb9335eUL, 0x3abd47daUL, 0x3d23115cUL,
1088   0x2f40e000UL, 0x3fb8197eUL, 0xf96ffdf7UL, 0x3d0f80dcUL, 0x0aeac000UL,
1089   0x3fb700d3UL, 0xa99ded32UL, 0x3cec1e8dUL, 0x4d97a000UL, 0x3fb5e95aUL,
1090   0x3c5d1d1eUL, 0xbd2c6906UL, 0x5d208000UL, 0x3fb4d311UL, 0x82f4e1efUL,
1091   0xbcf53a25UL, 0xa7d1e000UL, 0x3fb3bdf5UL, 0xa5db4ed7UL, 0x3d2cc85eUL,
1092   0xa4472000UL, 0x3fb2aa04UL, 0xae9c697dUL, 0xbd20b6e8UL, 0xd1466000UL,
1093   0x3fb1973bUL, 0x560d9e9bUL, 0xbd25325dUL, 0xb59e4000UL, 0x3fb08598UL,
1094   0x7009902cUL, 0xbd17e5ddUL, 0xc006c000UL, 0x3faeea31UL, 0x4fc93b7bUL,
1095   0xbd0e113eUL, 0xcdddc000UL, 0x3faccb73UL, 0x47d82807UL, 0xbd1a68f2UL,
1096   0xd0fb0000UL, 0x3faaaef2UL, 0x353bb42eUL, 0x3d20fc1aUL, 0x149fc000UL,
1097   0x3fa894aaUL, 0xd05a267dUL, 0xbd197995UL, 0xf2d4c000UL, 0x3fa67c94UL,
1098   0xec19afa2UL, 0xbd029efbUL, 0xd42e0000UL, 0x3fa466aeUL, 0x75bdfd28UL,
1099   0xbd2c1673UL, 0x2f8d0000UL, 0x3fa252f3UL, 0xe021b67bUL, 0x3d283e9aUL,
1100   0x89e74000UL, 0x3fa0415dUL, 0x5cf1d753UL, 0x3d0111c0UL, 0xec148000UL,
1101   0x3f9c63d2UL, 0x3f9eb2f3UL, 0x3d2578c6UL, 0x28c90000UL, 0x3f984925UL,
1102   0x325a0c34UL, 0xbd2aa0baUL, 0x25980000UL, 0x3f9432a9UL, 0x928637feUL,
1103   0x3d098139UL, 0x58938000UL, 0x3f902056UL, 0x06e2f7d2UL, 0xbd23dc5bUL,
1104   0xa3890000UL, 0x3f882448UL, 0xda74f640UL, 0xbd275577UL, 0x75890000UL,
1105   0x3f801015UL, 0x999d2be8UL, 0xbd10c76bUL, 0x59580000UL, 0x3f700805UL,
1106   0xcb31c67bUL, 0x3d2166afUL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
1107   0x80000000UL, 0xfefa3800UL, 0x3fa62e42UL, 0x93c76730UL, 0x3ceef357UL,
1108   0x92492492UL, 0x3fc24924UL, 0x00000000UL, 0xbfd00000UL, 0x3d6fb175UL,
1109   0xbfc5555eUL, 0x55555555UL, 0x3fd55555UL, 0x9999999aUL, 0x3fc99999UL,
1110   0x00000000UL, 0xbfe00000UL, 0x00000000UL, 0xffffe000UL, 0x00000000UL,
1111   0xffffe000UL
1112 };
1113 //registers,
1114 // input: xmm0
1115 // scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
1116 //          rax, rdx, rcx, rbx (tmp)
1117 
1118 void MacroAssembler::fast_log(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
1119   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;
1120   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;
1121   Label L_2TAG_PACKET_8_0_2, L_2TAG_PACKET_9_0_2;
1122   Label L_2TAG_PACKET_10_0_2, start;
1123 
1124   assert_different_registers(tmp, eax, ecx, edx);
1125   jmp(start);
1126   address static_const_table = (address)_static_const_table_log;
1127 
1128   bind(start);
1129   subl(rsp, 104);
1130   movl(Address(rsp, 40), tmp);
1131   lea(tmp, ExternalAddress(static_const_table));
1132   xorpd(xmm2, xmm2);
1133   movl(eax, 16368);
1134   pinsrw(xmm2, eax, 3);
1135   xorpd(xmm3, xmm3);
1136   movl(edx, 30704);
1137   pinsrw(xmm3, edx, 3);
1138   movsd(xmm0, Address(rsp, 112));
1139   movapd(xmm1, xmm0);
1140   movl(ecx, 32768);
1141   movdl(xmm4, ecx);
1142   movsd(xmm5, Address(tmp, 2128));         // 0x00000000UL, 0xffffe000UL
1143   pextrw(eax, xmm0, 3);
1144   por(xmm0, xmm2);
1145   psllq(xmm0, 5);
1146   movl(ecx, 16352);
1147   psrlq(xmm0, 34);
1148   rcpss(xmm0, xmm0);
1149   psllq(xmm1, 12);
1150   pshufd(xmm6, xmm5, 228);
1151   psrlq(xmm1, 12);
1152   subl(eax, 16);
1153   cmpl(eax, 32736);
1154   jcc(Assembler::aboveEqual, L_2TAG_PACKET_0_0_2);
1155 
1156   bind(L_2TAG_PACKET_1_0_2);
1157   paddd(xmm0, xmm4);
1158   por(xmm1, xmm3);
1159   movdl(edx, xmm0);
1160   psllq(xmm0, 29);
1161   pand(xmm5, xmm1);
1162   pand(xmm0, xmm6);
1163   subsd(xmm1, xmm5);
1164   mulpd(xmm5, xmm0);
1165   andl(eax, 32752);
1166   subl(eax, ecx);
1167   cvtsi2sdl(xmm7, eax);
1168   mulsd(xmm1, xmm0);
1169   movsd(xmm6, Address(tmp, 2064));         // 0xfefa3800UL, 0x3fa62e42UL
1170   movdqu(xmm3, Address(tmp, 2080));        // 0x92492492UL, 0x3fc24924UL, 0x00000000UL, 0xbfd00000UL
1171   subsd(xmm5, xmm2);
1172   andl(edx, 16711680);
1173   shrl(edx, 12);
1174   movdqu(xmm0, Address(tmp, edx));
1175   movdqu(xmm4, Address(tmp, 2096));        // 0x3d6fb175UL, 0xbfc5555eUL, 0x55555555UL, 0x3fd55555UL
1176   addsd(xmm1, xmm5);
1177   movdqu(xmm2, Address(tmp, 2112));        // 0x9999999aUL, 0x3fc99999UL, 0x00000000UL, 0xbfe00000UL
1178   mulsd(xmm6, xmm7);
1179   pshufd(xmm5, xmm1, 68);
1180   mulsd(xmm7, Address(tmp, 2072));         // 0x93c76730UL, 0x3ceef357UL, 0x92492492UL, 0x3fc24924UL
1181   mulsd(xmm3, xmm1);
1182   addsd(xmm0, xmm6);
1183   mulpd(xmm4, xmm5);
1184   mulpd(xmm5, xmm5);
1185   pshufd(xmm6, xmm0, 228);
1186   addsd(xmm0, xmm1);
1187   addpd(xmm4, xmm2);
1188   mulpd(xmm3, xmm5);
1189   subsd(xmm6, xmm0);
1190   mulsd(xmm4, xmm1);
1191   pshufd(xmm2, xmm0, 238);
1192   addsd(xmm1, xmm6);
1193   mulsd(xmm5, xmm5);
1194   addsd(xmm7, xmm2);
1195   addpd(xmm4, xmm3);
1196   addsd(xmm1, xmm7);
1197   mulpd(xmm4, xmm5);
1198   addsd(xmm1, xmm4);
1199   pshufd(xmm5, xmm4, 238);
1200   addsd(xmm1, xmm5);
1201   addsd(xmm0, xmm1);
1202   jmp(L_2TAG_PACKET_2_0_2);
1203 
1204   bind(L_2TAG_PACKET_0_0_2);
1205   movsd(xmm0, Address(rsp, 112));
1206   movdqu(xmm1, xmm0);
1207   addl(eax, 16);
1208   cmpl(eax, 32768);
1209   jcc(Assembler::aboveEqual, L_2TAG_PACKET_3_0_2);
1210   cmpl(eax, 16);
1211   jcc(Assembler::below, L_2TAG_PACKET_4_0_2);
1212 
1213   bind(L_2TAG_PACKET_5_0_2);
1214   addsd(xmm0, xmm0);
1215   jmp(L_2TAG_PACKET_2_0_2);
1216 
1217   bind(L_2TAG_PACKET_6_0_2);
1218   jcc(Assembler::above, L_2TAG_PACKET_5_0_2);
1219   cmpl(edx, 0);
1220   jcc(Assembler::above, L_2TAG_PACKET_5_0_2);
1221   jmp(L_2TAG_PACKET_7_0_2);
1222 
1223   bind(L_2TAG_PACKET_3_0_2);
1224   movdl(edx, xmm1);
1225   psrlq(xmm1, 32);
1226   movdl(ecx, xmm1);
1227   addl(ecx, ecx);
1228   cmpl(ecx, -2097152);
1229   jcc(Assembler::aboveEqual, L_2TAG_PACKET_6_0_2);
1230   orl(edx, ecx);
1231   cmpl(edx, 0);
1232   jcc(Assembler::equal, L_2TAG_PACKET_8_0_2);
1233 
1234   bind(L_2TAG_PACKET_7_0_2);
1235   xorpd(xmm1, xmm1);
1236   xorpd(xmm0, xmm0);
1237   movl(eax, 32752);
1238   pinsrw(xmm1, eax, 3);
1239   movl(edx, 3);
1240   mulsd(xmm0, xmm1);
1241 
1242   bind(L_2TAG_PACKET_9_0_2);
1243   movsd(Address(rsp, 0), xmm0);
1244   movsd(xmm0, Address(rsp, 112));
1245   fld_d(Address(rsp, 0));
1246   jmp(L_2TAG_PACKET_10_0_2);
1247 
1248   bind(L_2TAG_PACKET_8_0_2);
1249   xorpd(xmm1, xmm1);
1250   xorpd(xmm0, xmm0);
1251   movl(eax, 49136);
1252   pinsrw(xmm0, eax, 3);
1253   divsd(xmm0, xmm1);
1254   movl(edx, 2);
1255   jmp(L_2TAG_PACKET_9_0_2);
1256 
1257   bind(L_2TAG_PACKET_4_0_2);
1258   movdl(edx, xmm1);
1259   psrlq(xmm1, 32);
1260   movdl(ecx, xmm1);
1261   orl(edx, ecx);
1262   cmpl(edx, 0);
1263   jcc(Assembler::equal, L_2TAG_PACKET_8_0_2);
1264   xorpd(xmm1, xmm1);
1265   movl(eax, 18416);
1266   pinsrw(xmm1, eax, 3);
1267   mulsd(xmm0, xmm1);
1268   movapd(xmm1, xmm0);
1269   pextrw(eax, xmm0, 3);
1270   por(xmm0, xmm2);
1271   psllq(xmm0, 5);
1272   movl(ecx, 18416);
1273   psrlq(xmm0, 34);
1274   rcpss(xmm0, xmm0);
1275   psllq(xmm1, 12);
1276   pshufd(xmm6, xmm5, 228);
1277   psrlq(xmm1, 12);
1278   jmp(L_2TAG_PACKET_1_0_2);
1279 
1280   bind(L_2TAG_PACKET_2_0_2);
1281   movsd(Address(rsp, 24), xmm0);
1282   fld_d(Address(rsp, 24));
1283 
1284   bind(L_2TAG_PACKET_10_0_2);
1285   movl(tmp, Address(rsp, 40));
1286 }
1287 
1288 #endif
1289 
1290 /******************************************************************************/
1291 //                     ALGORITHM DESCRIPTION - SIN()
1292 //                     ---------------------
1293 //
1294 //     1. RANGE REDUCTION
1295 //
1296 //     We perform an initial range reduction from X to r with
1297 //
1298 //          X =~= N * pi/32 + r
1299 //
1300 //     so that |r| <= pi/64 + epsilon. We restrict inputs to those
1301 //     where |N| <= 932560. Beyond this, the range reduction is
1302 //     insufficiently accurate. For extremely small inputs,
1303 //     denormalization can occur internally, impacting performance.
1304 //     This means that the main path is actually only taken for
1305 //     2^-252 <= |X| < 90112.
1306 //
1307 //     To avoid branches, we perform the range reduction to full
1308 //     accuracy each time.
1309 //
1310 //          X - N * (P_1 + P_2 + P_3)
1311 //
1312 //     where P_1 and P_2 are 32-bit numbers (so multiplication by N
1313 //     is exact) and P_3 is a 53-bit number. Together, these
1314 //     approximate pi well enough for all cases in the restricted
1315 //     range.
1316 //
1317 //     The main reduction sequence is:
1318 //
1319 //             y = 32/pi * x
1320 //             N = integer(y)
1321 //     (computed by adding and subtracting off SHIFTER)
1322 //
1323 //             m_1 = N * P_1
1324 //             m_2 = N * P_2
1325 //             r_1 = x - m_1
1326 //             r = r_1 - m_2
1327 //     (this r can be used for most of the calculation)
1328 //
1329 //             c_1 = r_1 - r
1330 //             m_3 = N * P_3
1331 //             c_2 = c_1 - m_2
1332 //             c = c_2 - m_3
1333 //
1334 //     2. MAIN ALGORITHM
1335 //
1336 //     The algorithm uses a table lookup based on B = M * pi / 32
1337 //     where M = N mod 64. The stored values are:
1338 //       sigma             closest power of 2 to cos(B)
1339 //       C_hl              53-bit cos(B) - sigma
1340 //       S_hi + S_lo       2 * 53-bit sin(B)
1341 //
1342 //     The computation is organized as follows:
1343 //
1344 //          sin(B + r + c) = [sin(B) + sigma * r] +
1345 //                           r * (cos(B) - sigma) +
1346 //                           sin(B) * [cos(r + c) - 1] +
1347 //                           cos(B) * [sin(r + c) - r]
1348 //
1349 //     which is approximately:
1350 //
1351 //          [S_hi + sigma * r] +
1352 //          C_hl * r +
1353 //          S_lo + S_hi * [(cos(r) - 1) - r * c] +
1354 //          (C_hl + sigma) * [(sin(r) - r) + c]
1355 //
1356 //     and this is what is actually computed. We separate this sum
1357 //     into four parts:
1358 //
1359 //          hi + med + pols + corr
1360 //
1361 //     where
1362 //
1363 //          hi       = S_hi + sigma r
1364 //          med      = C_hl * r
1365 //          pols     = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r)
1366 //          corr     = S_lo + c * ((C_hl + sigma) - S_hi * r)
1367 //
1368 //     3. POLYNOMIAL
1369 //
1370 //     The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) *
1371 //     (sin(r) - r) can be rearranged freely, since it is quite
1372 //     small, so we exploit parallelism to the fullest.
1373 //
1374 //          psc4       =   SC_4 * r_1
1375 //          msc4       =   psc4 * r
1376 //          r2         =   r * r
1377 //          msc2       =   SC_2 * r2
1378 //          r4         =   r2 * r2
1379 //          psc3       =   SC_3 + msc4
1380 //          psc1       =   SC_1 + msc2
1381 //          msc3       =   r4 * psc3
1382 //          sincospols =   psc1 + msc3
1383 //          pols       =   sincospols *
1384 //                         <S_hi * r^2 | (C_hl + sigma) * r^3>
1385 //
1386 //     4. CORRECTION TERM
1387 //
1388 //     This is where the "c" component of the range reduction is
1389 //     taken into account; recall that just "r" is used for most of
1390 //     the calculation.
1391 //
1392 //          -c   = m_3 - c_2
1393 //          -d   = S_hi * r - (C_hl + sigma)
1394 //          corr = -c * -d + S_lo
1395 //
1396 //     5. COMPENSATED SUMMATIONS
1397 //
1398 //     The two successive compensated summations add up the high
1399 //     and medium parts, leaving just the low parts to add up at
1400 //     the end.
1401 //
1402 //          rs        =  sigma * r
1403 //          res_int   =  S_hi + rs
1404 //          k_0       =  S_hi - res_int
1405 //          k_2       =  k_0 + rs
1406 //          med       =  C_hl * r
1407 //          res_hi    =  res_int + med
1408 //          k_1       =  res_int - res_hi
1409 //          k_3       =  k_1 + med
1410 //
1411 //     6. FINAL SUMMATION
1412 //
1413 //     We now add up all the small parts:
1414 //
1415 //          res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3
1416 //
1417 //     Now the overall result is just:
1418 //
1419 //          res_hi + res_lo
1420 //
1421 //     7. SMALL ARGUMENTS
1422 //
1423 //     If |x| < SNN (SNN meaning the smallest normal number), we
1424 //     simply perform 0.1111111 cdots 1111 * x. For SNN <= |x|, we
1425 //     do 2^-55 * (2^55 * x - x).
1426 //
1427 // Special cases:
1428 //  sin(NaN) = quiet NaN, and raise invalid exception
1429 //  sin(INF) = NaN and raise invalid exception
1430 //  sin(+/-0) = +/-0
1431 //
1432 /******************************************************************************/
1433 
1434 #ifdef _LP64
1435 
1436 ALIGNED_(16) juint _ONEHALF[] =
1437 {
1438     0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
1439 };
1440 
1441 ALIGNED_(16) juint _P_2[] =
1442 {
1443     0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL
1444 };
1445 
1446 ALIGNED_(16) juint _SC_4[] =
1447 {
1448     0xa556c734UL, 0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL
1449 };
1450 
1451 ALIGNED_(16) juint _Ctable[] =
1452 {
1453     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
1454     0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL, 0xbf73b92eUL,
1455     0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
1456     0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL,
1457     0xc0000000UL, 0xbc626d19UL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL,
1458     0xbfa60beaUL, 0x2ed59f06UL, 0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL,
1459     0x00000000UL, 0x3ff00000UL, 0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL,
1460     0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL, 0x00000000UL, 0x3ff00000UL,
1461     0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL, 0x20000000UL,
1462     0x3c5e0d89UL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL, 0xbfc59267UL,
1463     0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
1464     0x3ff00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL,
1465     0x20000000UL, 0x3c68076aUL, 0x00000000UL, 0x3ff00000UL, 0x99fcef32UL,
1466     0x3fca8279UL, 0x667f3bcdUL, 0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL,
1467     0x00000000UL, 0x3fe00000UL, 0x94247758UL, 0x3fc133ccUL, 0x6b151741UL,
1468     0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL, 0x00000000UL, 0x3fe00000UL,
1469     0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL, 0xe0000000UL,
1470     0x3c39f630UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL, 0xbf9d4a2cUL,
1471     0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
1472     0x3fe00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0x3fed906bUL,
1473     0x20000000UL, 0x3c7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x76acf82dUL,
1474     0x3fa4a031UL, 0x56c62ddaUL, 0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL,
1475     0x00000000UL, 0x3fd00000UL, 0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL,
1476     0x3fef6297UL, 0x20000000UL, 0x3c756217UL, 0x00000000UL, 0x3fd00000UL,
1477     0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL, 0x3fefd88dUL, 0x40000000UL,
1478     0xbc887df6UL, 0x00000000UL, 0x3fc00000UL, 0x00000000UL, 0x00000000UL,
1479     0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
1480     0x00000000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0x3fefd88dUL,
1481     0x40000000UL, 0xbc887df6UL, 0x00000000UL, 0xbfc00000UL, 0x0e5967d5UL,
1482     0x3fac1d1fUL, 0xcff75cb0UL, 0x3fef6297UL, 0x20000000UL, 0x3c756217UL,
1483     0x00000000UL, 0xbfd00000UL, 0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL,
1484     0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL, 0x00000000UL, 0xbfd00000UL,
1485     0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL, 0x3fed906bUL, 0x20000000UL,
1486     0x3c7457e6UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL, 0x3f9d4a2cUL,
1487     0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
1488     0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL,
1489     0xe0000000UL, 0x3c39f630UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL,
1490     0xbfc133ccUL, 0x6b151741UL, 0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL,
1491     0x00000000UL, 0xbfe00000UL, 0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL,
1492     0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL, 0x00000000UL, 0xbfe00000UL,
1493     0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL, 0x20000000UL,
1494     0x3c68076aUL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL, 0x3fc59267UL,
1495     0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
1496     0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL,
1497     0x20000000UL, 0x3c5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL,
1498     0x3fb37ca1UL, 0xa6aea963UL, 0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL,
1499     0x00000000UL, 0xbff00000UL, 0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL,
1500     0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL, 0x00000000UL, 0xbff00000UL,
1501     0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL, 0xc0000000UL,
1502     0xbc626d19UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL, 0x3f73b92eUL,
1503     0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
1504     0xbff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
1505     0x00000000UL, 0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL,
1506     0x3f73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
1507     0x00000000UL, 0xbff00000UL, 0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL,
1508     0xbfc8f8b8UL, 0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0xbff00000UL,
1509     0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL,
1510     0x3c75d28dUL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL, 0x3fb37ca1UL,
1511     0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL, 0x3c672cedUL, 0x00000000UL,
1512     0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0xbfde2b5dUL,
1513     0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL,
1514     0x3fc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
1515     0x00000000UL, 0xbff00000UL, 0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL,
1516     0xbfe44cf3UL, 0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0xbff00000UL,
1517     0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL,
1518     0x3c8bdd34UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL, 0xbfc133ccUL,
1519     0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL, 0x3c82c5e1UL, 0x00000000UL,
1520     0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0xbfea9b66UL,
1521     0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL,
1522     0x3f9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
1523     0x00000000UL, 0xbfe00000UL, 0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL,
1524     0xbfed906bUL, 0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0xbfe00000UL,
1525     0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL,
1526     0xbc8760b1UL, 0x00000000UL, 0xbfd00000UL, 0x0e5967d5UL, 0x3fac1d1fUL,
1527     0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL, 0xbc756217UL, 0x00000000UL,
1528     0xbfd00000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0xbfefd88dUL,
1529     0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0xbfc00000UL, 0x00000000UL,
1530     0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x00000000UL, 0x00000000UL,
1531     0x00000000UL, 0x00000000UL, 0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL,
1532     0xbfefd88dUL, 0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0x3fc00000UL,
1533     0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL,
1534     0xbc756217UL, 0x00000000UL, 0x3fd00000UL, 0x76acf82dUL, 0x3fa4a031UL,
1535     0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL, 0xbc8760b1UL, 0x00000000UL,
1536     0x3fd00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0xbfed906bUL,
1537     0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL,
1538     0xbf9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
1539     0x00000000UL, 0x3fe00000UL, 0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL,
1540     0xbfea9b66UL, 0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0x3fe00000UL,
1541     0x94247758UL, 0x3fc133ccUL, 0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL,
1542     0x3c82c5e1UL, 0x00000000UL, 0x3fe00000UL, 0x99fcef32UL, 0x3fca8279UL,
1543     0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL, 0x3c8bdd34UL, 0x00000000UL,
1544     0x3fe00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0xbfe44cf3UL,
1545     0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL,
1546     0xbfc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
1547     0x00000000UL, 0x3ff00000UL, 0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL,
1548     0xbfde2b5dUL, 0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0x3ff00000UL,
1549     0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL,
1550     0x3c672cedUL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL, 0xbfa60beaUL,
1551     0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL, 0x3c75d28dUL, 0x00000000UL,
1552     0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0xbfc8f8b8UL,
1553     0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL,
1554     0xbf73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
1555     0x00000000UL, 0x3ff00000UL
1556 };
1557 
1558 ALIGNED_(16) juint _SC_2[] =
1559 {
1560     0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL
1561 };
1562 
1563 ALIGNED_(16) juint _SC_3[] =
1564 {
1565     0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL
1566 };
1567 
1568 ALIGNED_(16) juint _SC_1[] =
1569 {
1570     0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL
1571 };
1572 
1573 ALIGNED_(16) juint _PI_INV_TABLE[] =
1574 {
1575     0x00000000UL, 0x00000000UL, 0xa2f9836eUL, 0x4e441529UL, 0xfc2757d1UL,
1576     0xf534ddc0UL, 0xdb629599UL, 0x3c439041UL, 0xfe5163abUL, 0xdebbc561UL,
1577     0xb7246e3aUL, 0x424dd2e0UL, 0x06492eeaUL, 0x09d1921cUL, 0xfe1deb1cUL,
1578     0xb129a73eUL, 0xe88235f5UL, 0x2ebb4484UL, 0xe99c7026UL, 0xb45f7e41UL,
1579     0x3991d639UL, 0x835339f4UL, 0x9c845f8bUL, 0xbdf9283bUL, 0x1ff897ffUL,
1580     0xde05980fUL, 0xef2f118bUL, 0x5a0a6d1fUL, 0x6d367ecfUL, 0x27cb09b7UL,
1581     0x4f463f66UL, 0x9e5fea2dUL, 0x7527bac7UL, 0xebe5f17bUL, 0x3d0739f7UL,
1582     0x8a5292eaUL, 0x6bfb5fb1UL, 0x1f8d5d08UL, 0x56033046UL, 0xfc7b6babUL,
1583     0xf0cfbc21UL
1584 };
1585 
1586 ALIGNED_(8) juint _PI_4[] =
1587 {
1588     0x40000000UL, 0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL
1589 };
1590 
1591 ALIGNED_(8) juint _PI32INV[] =
1592 {
1593     0x6dc9c883UL, 0x40245f30UL
1594 };
1595 
1596 ALIGNED_(8) juint _SHIFTER[] =
1597 {
1598     0x00000000UL, 0x43380000UL
1599 };
1600 
1601 ALIGNED_(8) juint _SIGN_MASK[] =
1602 {
1603     0x00000000UL, 0x80000000UL
1604 };
1605 
1606 ALIGNED_(8) juint _P_3[] =
1607 {
1608     0x2e037073UL, 0x3b63198aUL
1609 };
1610 
1611 ALIGNED_(8) juint _ALL_ONES[] =
1612 {
1613     0xffffffffUL, 0x3fefffffUL
1614 };
1615 
1616 ALIGNED_(8) juint _TWO_POW_55[] =
1617 {
1618     0x00000000UL, 0x43600000UL
1619 };
1620 
1621 ALIGNED_(8) juint _TWO_POW_M55[] =
1622 {
1623     0x00000000UL, 0x3c800000ULL
1624 };
1625 
1626 ALIGNED_(8) juint _P_1[] =
1627 {
1628     0x54400000UL, 0x3fb921fbUL
1629 };
1630 
1631 ALIGNED_(8) juint _NEG_ZERO[] =
1632 {
1633     0x00000000UL, 0x80000000UL
1634 };
1635 
1636 void MacroAssembler::fast_sin(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ebx, Register ecx, Register edx, Register tmp1, Register tmp2, Register tmp3, Register tmp4) {
1637   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;
1638   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;
1639   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;
1640   Label L_2TAG_PACKET_13_0_1, L_2TAG_PACKET_14_0_1;
1641   Label L_2TAG_PACKET_12_0_1, B1_1, B1_2, B1_4, start;
1642 
1643   assert_different_registers(tmp1, tmp2, tmp3, tmp4, eax, ebx, ecx, edx);
1644   address ONEHALF = (address)_ONEHALF;
1645   address P_2 = (address)_P_2;
1646   address SC_4 = (address)_SC_4;
1647   address Ctable = (address)_Ctable;
1648   address SC_2 = (address)_SC_2;
1649   address SC_3 = (address)_SC_3;
1650   address SC_1 = (address)_SC_1;
1651   address PI_INV_TABLE = (address)_PI_INV_TABLE;
1652   address PI_4 = (address)_PI_4;
1653   address PI32INV = (address)_PI32INV;
1654   address SHIFTER = (address)_SHIFTER;
1655   address SIGN_MASK = (address)_SIGN_MASK;
1656   address P_3 = (address)_P_3;
1657   address ALL_ONES = (address)_ALL_ONES;
1658   address TWO_POW_55 = (address)_TWO_POW_55;
1659   address TWO_POW_M55 = (address)_TWO_POW_M55;
1660   address P_1 = (address)_P_1;
1661   address NEG_ZERO = (address)_NEG_ZERO;
1662 
1663   bind(start);
1664   push(rbx);
1665   subq(rsp, 16);
1666   movsd(Address(rsp, 8), xmm0);
1667   movl(eax, Address(rsp, 12));
1668   movq(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x40245f30UL
1669   movq(xmm2, ExternalAddress(SHIFTER));    //0x00000000UL, 0x43380000UL
1670   andl(eax, 2147418112);
1671   subl(eax, 808452096);
1672   cmpl(eax, 281346048);
1673   jcc(Assembler::above, L_2TAG_PACKET_0_0_1);
1674   mulsd(xmm1, xmm0);
1675   movdqu(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
1676   movq(xmm4, ExternalAddress(SIGN_MASK));    //0x00000000UL, 0x80000000UL
1677   pand(xmm4, xmm0);
1678   por(xmm5, xmm4);
1679   addpd(xmm1, xmm5);
1680   cvttsd2sil(edx, xmm1);
1681   cvtsi2sdl(xmm1, edx);
1682   movdqu(xmm6, ExternalAddress(P_2));    //0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL
1683   mov64(r8, 0x3fb921fb54400000);
1684   movdq(xmm3, r8);
1685   movdqu(xmm5, ExternalAddress(SC_4));    //0xa556c734UL, 0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL
1686   pshufd(xmm4, xmm0, 68);
1687   mulsd(xmm3, xmm1);
1688   movddup(xmm1, xmm1);
1689   andl(edx, 63);
1690   shll(edx, 5);
1691   lea(rax, ExternalAddress(Ctable));
1692   addq(rax, rdx);
1693   mulpd(xmm6, xmm1);
1694   mulsd(xmm1, ExternalAddress(P_3));    //0x2e037073UL, 0x3b63198aUL
1695   subsd(xmm4, xmm3);
1696   movq(xmm7, Address(rax, 8));
1697   subsd(xmm0, xmm3);
1698   movddup(xmm3, xmm4);
1699   subsd(xmm4, xmm6);
1700   pshufd(xmm0, xmm0, 68);
1701   movdqu(xmm2, Address(rax, 0));
1702   mulpd(xmm5, xmm0);
1703   subpd(xmm0, xmm6);
1704   mulsd(xmm7, xmm4);
1705   subsd(xmm3, xmm4);
1706   mulpd(xmm5, xmm0);
1707   mulpd(xmm0, xmm0);
1708   subsd(xmm3, xmm6);
1709   movdqu(xmm6, ExternalAddress(SC_2));    //0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL
1710   subsd(xmm1, xmm3);
1711   movq(xmm3, Address(rax, 24));
1712   addsd(xmm2, xmm3);
1713   subsd(xmm7, xmm2);
1714   mulsd(xmm2, xmm4);
1715   mulpd(xmm6, xmm0);
1716   mulsd(xmm3, xmm4);
1717   mulpd(xmm2, xmm0);
1718   mulpd(xmm0, xmm0);
1719   addpd(xmm5, ExternalAddress(SC_3));    //0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL
1720   mulsd(xmm4, Address(rax, 0));
1721   addpd(xmm6, ExternalAddress(SC_1));    //0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL
1722   mulpd(xmm5, xmm0);
1723   movdqu(xmm0, xmm3);
1724   addsd(xmm3, Address(rax, 8));
1725   mulpd(xmm1, xmm7);
1726   movdqu(xmm7, xmm4);
1727   addsd(xmm4, xmm3);
1728   addpd(xmm6, xmm5);
1729   movq(xmm5, Address(rax, 8));
1730   subsd(xmm5, xmm3);
1731   subsd(xmm3, xmm4);
1732   addsd(xmm1, Address(rax, 16));
1733   mulpd(xmm6, xmm2);
1734   addsd(xmm5, xmm0);
1735   addsd(xmm3, xmm7);
1736   addsd(xmm1, xmm5);
1737   addsd(xmm1, xmm3);
1738   addsd(xmm1, xmm6);
1739   unpckhpd(xmm6, xmm6);
1740   movdqu(xmm0, xmm4);
1741   addsd(xmm1, xmm6);
1742   addsd(xmm0, xmm1);
1743   jmp(B1_4);
1744 
1745   bind(L_2TAG_PACKET_0_0_1);
1746   jcc(Assembler::greater, L_2TAG_PACKET_1_0_1);
1747   shrl(eax, 20);
1748   cmpl(eax, 3325);
1749   jcc(Assembler::notEqual, L_2TAG_PACKET_2_0_1);
1750   mulsd(xmm0, ExternalAddress(ALL_ONES));    //0xffffffffUL, 0x3fefffffUL
1751   jmp(B1_4);
1752 
1753   bind(L_2TAG_PACKET_2_0_1);
1754   movq(xmm3, ExternalAddress(TWO_POW_55));    //0x00000000UL, 0x43600000UL
1755   mulsd(xmm3, xmm0);
1756   subsd(xmm3, xmm0);
1757   mulsd(xmm3, ExternalAddress(TWO_POW_M55));    //0x00000000UL, 0x3c800000UL
1758   jmp(B1_4);
1759 
1760   bind(L_2TAG_PACKET_1_0_1);
1761   pextrw(eax, xmm0, 3);
1762   andl(eax, 32752);
1763   cmpl(eax, 32752);
1764   jcc(Assembler::equal, L_2TAG_PACKET_3_0_1);
1765   pextrw(ecx, xmm0, 3);
1766   andl(ecx, 32752);
1767   subl(ecx, 16224);
1768   shrl(ecx, 7);
1769   andl(ecx, 65532);
1770   lea(r11, ExternalAddress(PI_INV_TABLE));
1771   addq(rcx, r11);
1772   movdq(rax, xmm0);
1773   movl(r10, Address(rcx, 20));
1774   movl(r8, Address(rcx, 24));
1775   movl(edx, eax);
1776   shrq(rax, 21);
1777   orl(eax, INT_MIN);
1778   shrl(eax, 11);
1779   movl(r9, r10);
1780   imulq(r10, rdx);
1781   imulq(r9, rax);
1782   imulq(r8, rax);
1783   movl(rsi, Address(rcx, 16));
1784   movl(rdi, Address(rcx, 12));
1785   movl(r11, r10);
1786   shrq(r10, 32);
1787   addq(r9, r10);
1788   addq(r11, r8);
1789   movl(r8, r11);
1790   shrq(r11, 32);
1791   addq(r9, r11);
1792   movl(r10, rsi);
1793   imulq(rsi, rdx);
1794   imulq(r10, rax);
1795   movl(r11, rdi);
1796   imulq(rdi, rdx);
1797   movl(ebx, rsi);
1798   shrq(rsi, 32);
1799   addq(r9, rbx);
1800   movl(ebx, r9);
1801   shrq(r9, 32);
1802   addq(r10, rsi);
1803   addq(r10, r9);
1804   shlq(rbx, 32);
1805   orq(r8, rbx);
1806   imulq(r11, rax);
1807   movl(r9, Address(rcx, 8));
1808   movl(rsi, Address(rcx, 4));
1809   movl(ebx, rdi);
1810   shrq(rdi, 32);
1811   addq(r10, rbx);
1812   movl(ebx, r10);
1813   shrq(r10, 32);
1814   addq(r11, rdi);
1815   addq(r11, r10);
1816   movq(rdi, r9);
1817   imulq(r9, rdx);
1818   imulq(rdi, rax);
1819   movl(r10, r9);
1820   shrq(r9, 32);
1821   addq(r11, r10);
1822   movl(r10, r11);
1823   shrq(r11, 32);
1824   addq(rdi, r9);
1825   addq(rdi, r11);
1826   movq(r9, rsi);
1827   imulq(rsi, rdx);
1828   imulq(r9, rax);
1829   shlq(r10, 32);
1830   orq(r10, rbx);
1831   movl(eax, Address(rcx, 0));
1832   movl(r11, rsi);
1833   shrq(rsi, 32);
1834   addq(rdi, r11);
1835   movl(r11, rdi);
1836   shrq(rdi, 32);
1837   addq(r9, rsi);
1838   addq(r9, rdi);
1839   imulq(rdx, rax);
1840   pextrw(ebx, xmm0, 3);
1841   lea(rdi, ExternalAddress(PI_INV_TABLE));
1842   subq(rcx, rdi);
1843   addl(ecx, ecx);
1844   addl(ecx, ecx);
1845   addl(ecx, ecx);
1846   addl(ecx, 19);
1847   movl(rsi, 32768);
1848   andl(rsi, ebx);
1849   shrl(ebx, 4);
1850   andl(ebx, 2047);
1851   subl(ebx, 1023);
1852   subl(ecx, ebx);
1853   addq(r9, rdx);
1854   movl(edx, ecx);
1855   addl(edx, 32);
1856   cmpl(ecx, 1);
1857   jcc(Assembler::less, L_2TAG_PACKET_4_0_1);
1858   negl(ecx);
1859   addl(ecx, 29);
1860   shll(r9);
1861   movl(rdi, r9);
1862   andl(r9, 536870911);
1863   testl(r9, 268435456);
1864   jcc(Assembler::notEqual, L_2TAG_PACKET_5_0_1);
1865   shrl(r9);
1866   movl(ebx, 0);
1867   shlq(r9, 32);
1868   orq(r9, r11);
1869 
1870   bind(L_2TAG_PACKET_6_0_1);
1871 
1872   bind(L_2TAG_PACKET_7_0_1);
1873 
1874   cmpq(r9, 0);
1875   jcc(Assembler::equal, L_2TAG_PACKET_8_0_1);
1876 
1877   bind(L_2TAG_PACKET_9_0_1);
1878   bsrq(r11, r9);
1879   movl(ecx, 29);
1880   subl(ecx, r11);
1881   jcc(Assembler::lessEqual, L_2TAG_PACKET_10_0_1);
1882   shlq(r9);
1883   movq(rax, r10);
1884   shlq(r10);
1885   addl(edx, ecx);
1886   negl(ecx);
1887   addl(ecx, 64);
1888   shrq(rax);
1889   shrq(r8);
1890   orq(r9, rax);
1891   orq(r10, r8);
1892 
1893   bind(L_2TAG_PACKET_11_0_1);
1894   cvtsi2sdq(xmm0, r9);
1895   shrq(r10, 1);
1896   cvtsi2sdq(xmm3, r10);
1897   xorpd(xmm4, xmm4);
1898   shll(edx, 4);
1899   negl(edx);
1900   addl(edx, 16368);
1901   orl(edx, rsi);
1902   xorl(edx, ebx);
1903   pinsrw(xmm4, edx, 3);
1904   movq(xmm2, ExternalAddress(PI_4));    //0x40000000UL, 0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL
1905   movq(xmm6, ExternalAddress(8 + PI_4));    //0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL
1906   xorpd(xmm5, xmm5);
1907   subl(edx, 1008);
1908   pinsrw(xmm5, edx, 3);
1909   mulsd(xmm0, xmm4);
1910   shll(rsi, 16);
1911   sarl(rsi, 31);
1912   mulsd(xmm3, xmm5);
1913   movdqu(xmm1, xmm0);
1914   mulsd(xmm0, xmm2);
1915   shrl(rdi, 29);
1916   addsd(xmm1, xmm3);
1917   mulsd(xmm3, xmm2);
1918   addl(rdi, rsi);
1919   xorl(rdi, rsi);
1920   mulsd(xmm6, xmm1);
1921   movl(eax, rdi);
1922   addsd(xmm6, xmm3);
1923   movdqu(xmm2, xmm0);
1924   addsd(xmm0, xmm6);
1925   subsd(xmm2, xmm0);
1926   addsd(xmm6, xmm2);
1927 
1928   bind(L_2TAG_PACKET_12_0_1);
1929   movq(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x40245f30UL
1930   mulsd(xmm1, xmm0);
1931   movq(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
1932   movq(xmm4, ExternalAddress(SIGN_MASK));    //0x00000000UL, 0x80000000UL
1933   pand(xmm4, xmm0);
1934   por(xmm5, xmm4);
1935   addpd(xmm1, xmm5);
1936   cvttsd2sil(edx, xmm1);
1937   cvtsi2sdl(xmm1, edx);
1938   movq(xmm3, ExternalAddress(P_1));    //0x54400000UL, 0x3fb921fbUL
1939   movdqu(xmm2, ExternalAddress(P_2));    //0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL
1940   mulsd(xmm3, xmm1);
1941   unpcklpd(xmm1, xmm1);
1942   shll(eax, 3);
1943   addl(edx, 1865216);
1944   movdqu(xmm4, xmm0);
1945   addl(edx, eax);
1946   andl(edx, 63);
1947   movdqu(xmm5, ExternalAddress(SC_4));    //0x54400000UL, 0x3fb921fbUL
1948   lea(rax, ExternalAddress(Ctable));
1949   shll(edx, 5);
1950   addq(rax, rdx);
1951   mulpd(xmm2, xmm1);
1952   subsd(xmm0, xmm3);
1953   mulsd(xmm1, ExternalAddress(P_3));    //0x2e037073UL, 0x3b63198aUL
1954   subsd(xmm4, xmm3);
1955   movq(xmm7, Address(rax, 8));
1956   unpcklpd(xmm0, xmm0);
1957   movdqu(xmm3, xmm4);
1958   subsd(xmm4, xmm2);
1959   mulpd(xmm5, xmm0);
1960   subpd(xmm0, xmm2);
1961   mulsd(xmm7, xmm4);
1962   subsd(xmm3, xmm4);
1963   mulpd(xmm5, xmm0);
1964   mulpd(xmm0, xmm0);
1965   subsd(xmm3, xmm2);
1966   movdqu(xmm2, Address(rax, 0));
1967   subsd(xmm1, xmm3);
1968   movq(xmm3, Address(rax, 24));
1969   addsd(xmm2, xmm3);
1970   subsd(xmm7, xmm2);
1971   subsd(xmm1, xmm6);
1972   movdqu(xmm6, ExternalAddress(SC_2));    //0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL
1973   mulsd(xmm2, xmm4);
1974   mulpd(xmm6, xmm0);
1975   mulsd(xmm3, xmm4);
1976   mulpd(xmm2, xmm0);
1977   mulpd(xmm0, xmm0);
1978   addpd(xmm5, ExternalAddress(SC_3));    //0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL
1979   mulsd(xmm4, Address(rax, 0));
1980   addpd(xmm6, ExternalAddress(SC_1));    //0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL
1981   mulpd(xmm5, xmm0);
1982   movdqu(xmm0, xmm3);
1983   addsd(xmm3, Address(rax, 8));
1984   mulpd(xmm1, xmm7);
1985   movdqu(xmm7, xmm4);
1986   addsd(xmm4, xmm3);
1987   addpd(xmm6, xmm5);
1988   movq(xmm5, Address(rax, 8));
1989   subsd(xmm5, xmm3);
1990   subsd(xmm3, xmm4);
1991   addsd(xmm1, Address(rax, 16));
1992   mulpd(xmm6, xmm2);
1993   addsd(xmm5, xmm0);
1994   addsd(xmm3, xmm7);
1995   addsd(xmm1, xmm5);
1996   addsd(xmm1, xmm3);
1997   addsd(xmm1, xmm6);
1998   unpckhpd(xmm6, xmm6);
1999   movdqu(xmm0, xmm4);
2000   addsd(xmm1, xmm6);
2001   addsd(xmm0, xmm1);
2002   jmp(B1_4);
2003 
2004   bind(L_2TAG_PACKET_8_0_1);
2005   addl(edx, 64);
2006   movq(r9, r10);
2007   movq(r10, r8);
2008   movl(r8, 0);
2009   cmpq(r9, 0);
2010   jcc(Assembler::notEqual, L_2TAG_PACKET_9_0_1);
2011   addl(edx, 64);
2012   movq(r9, r10);
2013   movq(r10, r8);
2014   cmpq(r9, 0);
2015   jcc(Assembler::notEqual, L_2TAG_PACKET_9_0_1);
2016   xorpd(xmm0, xmm0);
2017   xorpd(xmm6, xmm6);
2018   jmp(L_2TAG_PACKET_12_0_1);
2019 
2020   bind(L_2TAG_PACKET_10_0_1);
2021   jcc(Assembler::equal, L_2TAG_PACKET_11_0_1);
2022   negl(ecx);
2023   shrq(r10);
2024   movq(rax, r9);
2025   shrq(r9);
2026   subl(edx, ecx);
2027   negl(ecx);
2028   addl(ecx, 64);
2029   shlq(rax);
2030   orq(r10, rax);
2031   jmp(L_2TAG_PACKET_11_0_1);
2032 
2033   bind(L_2TAG_PACKET_4_0_1);
2034   negl(ecx);
2035   shlq(r9, 32);
2036   orq(r9, r11);
2037   shlq(r9);
2038   movq(rdi, r9);
2039   testl(r9, INT_MIN);
2040   jcc(Assembler::notEqual, L_2TAG_PACKET_13_0_1);
2041   shrl(r9);
2042   movl(ebx, 0);
2043   shrq(rdi, 3);
2044   jmp(L_2TAG_PACKET_7_0_1);
2045 
2046   bind(L_2TAG_PACKET_5_0_1);
2047   shrl(r9);
2048   movl(ebx, 536870912);
2049   shrl(ebx);
2050   shlq(r9, 32);
2051   orq(r9, r11);
2052   shlq(rbx, 32);
2053   addl(rdi, 536870912);
2054   movl(rcx, 0);
2055   movl(r11, 0);
2056   subq(rcx, r8);
2057   sbbq(r11, r10);
2058   sbbq(rbx, r9);
2059   movq(r8, rcx);
2060   movq(r10, r11);
2061   movq(r9, rbx);
2062   movl(ebx, 32768);
2063   jmp(L_2TAG_PACKET_6_0_1);
2064 
2065   bind(L_2TAG_PACKET_13_0_1);
2066   shrl(r9);
2067   mov64(rbx, 0x100000000);
2068   shrq(rbx);
2069   movl(rcx, 0);
2070   movl(r11, 0);
2071   subq(rcx, r8);
2072   sbbq(r11, r10);
2073   sbbq(rbx, r9);
2074   movq(r8, rcx);
2075   movq(r10, r11);
2076   movq(r9, rbx);
2077   movl(ebx, 32768);
2078   shrq(rdi, 3);
2079   addl(rdi, 536870912);
2080   jmp(L_2TAG_PACKET_7_0_1);
2081 
2082   bind(L_2TAG_PACKET_3_0_1);
2083   movq(xmm0, Address(rsp, 8));
2084   mulsd(xmm0, ExternalAddress(NEG_ZERO));    //0x00000000UL, 0x80000000UL
2085   movq(Address(rsp, 0), xmm0);
2086 
2087   bind(L_2TAG_PACKET_14_0_1);
2088 
2089   bind(B1_4);
2090   addq(rsp, 16);
2091   pop(rbx);
2092 }
2093 
2094 #endif
2095 
2096 #ifndef _LP64
2097 
2098 ALIGNED_(8) juint _zero_none[] =
2099 {
2100     0x00000000UL, 0x00000000UL, 0x00000000UL, 0xbff00000UL
2101 };
2102 
2103 ALIGNED_(4) juint __4onpi_d[] =
2104 {
2105     0x6dc9c883UL, 0x3ff45f30UL
2106 };
2107 
2108 ALIGNED_(4) juint _TWO_32H[] =
2109 {
2110     0x00000000UL, 0x41f80000UL
2111 };
2112 
2113 ALIGNED_(4) juint _pi04_3d[] =
2114 {
2115     0x54442d00UL, 0x3fe921fbUL, 0x98cc5180UL, 0x3ce84698UL, 0xcbb5bf6cUL,
2116     0xb9dfc8f8UL
2117 };
2118 
2119 ALIGNED_(4) juint _pi04_5d[] =
2120 {
2121     0x54400000UL, 0x3fe921fbUL, 0x1a600000UL, 0x3dc0b461UL, 0x2e000000UL,
2122     0x3b93198aUL, 0x25200000UL, 0x396b839aUL, 0x533e63a0UL, 0x37027044UL
2123 };
2124 
2125 ALIGNED_(4) juint _SCALE[] =
2126 {
2127     0x00000000UL, 0x32600000UL
2128 };
2129 
2130 ALIGNED_(4) juint _zeros[] =
2131 {
2132     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x80000000UL
2133 };
2134 
2135 ALIGNED_(4) juint _pi04_2d[] =
2136 {
2137     0x54400000UL, 0x3fe921fbUL, 0x1a626331UL, 0x3dc0b461UL
2138 };
2139 
2140 ALIGNED_(4) juint _TWO_12H[] =
2141 {
2142     0x00000000UL, 0x40b80000UL
2143 };
2144 
2145 ALIGNED_(2) jushort __4onpi_31l[] =
2146 {
2147     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x836e, 0xa2f9,
2148     0x40d8, 0x0000, 0x0000, 0x0000, 0x2a50, 0x9c88, 0x40b7, 0x0000, 0x0000, 0x0000,
2149     0xabe8, 0xfe13, 0x4099, 0x0000, 0x0000, 0x0000, 0x6ee0, 0xfa9a, 0x4079, 0x0000,
2150     0x0000, 0x0000, 0x9580, 0xdb62, 0x4058, 0x0000, 0x0000, 0x0000, 0x1c82, 0xc9e2,
2151     0x403d, 0x0000, 0x0000, 0x0000, 0xb1c0, 0xff28, 0x4019, 0x0000, 0x0000, 0x0000,
2152     0xef14, 0xaf7a, 0x3ffe, 0x0000, 0x0000, 0x0000, 0x48dc, 0xc36e, 0x3fdf, 0x0000,
2153     0x0000, 0x0000, 0x3740, 0xe909, 0x3fbe, 0x0000, 0x0000, 0x0000, 0x924a, 0xb801,
2154     0x3fa2, 0x0000, 0x0000, 0x0000, 0x3a32, 0xdd41, 0x3f83, 0x0000, 0x0000, 0x0000,
2155     0x8778, 0x873f, 0x3f62, 0x0000, 0x0000, 0x0000, 0x1298, 0xb1cb, 0x3f44, 0x0000,
2156     0x0000, 0x0000, 0xa208, 0x9cfb, 0x3f26, 0x0000, 0x0000, 0x0000, 0xbaec, 0xd7d4,
2157     0x3f06, 0x0000, 0x0000, 0x0000, 0xd338, 0x8909, 0x3ee7, 0x0000, 0x0000, 0x0000,
2158     0x68b8, 0xe04d, 0x3ec7, 0x0000, 0x0000, 0x0000, 0x4e64, 0xdf90, 0x3eaa, 0x0000,
2159     0x0000, 0x0000, 0xc1a8, 0xeb1c, 0x3e89, 0x0000, 0x0000, 0x0000, 0x2720, 0xce7d,
2160     0x3e6a, 0x0000, 0x0000, 0x0000, 0x77b8, 0x8bf1, 0x3e4b, 0x0000, 0x0000, 0x0000,
2161     0xec7e, 0xe4a0, 0x3e2e, 0x0000, 0x0000, 0x0000, 0xffbc, 0xf12f, 0x3e0f, 0x0000,
2162     0x0000, 0x0000, 0xfdc0, 0xb301, 0x3deb, 0x0000, 0x0000, 0x0000, 0xc5ac, 0x9788,
2163     0x3dd1, 0x0000, 0x0000, 0x0000, 0x47da, 0x829b, 0x3db2, 0x0000, 0x0000, 0x0000,
2164     0xd9e4, 0xa6cf, 0x3d93, 0x0000, 0x0000, 0x0000, 0x36e8, 0xf961, 0x3d73, 0x0000,
2165     0x0000, 0x0000, 0xf668, 0xf463, 0x3d54, 0x0000, 0x0000, 0x0000, 0x5168, 0xf2ff,
2166     0x3d35, 0x0000, 0x0000, 0x0000, 0x758e, 0xea4f, 0x3d17, 0x0000, 0x0000, 0x0000,
2167     0xf17a, 0xebe5, 0x3cf8, 0x0000, 0x0000, 0x0000, 0x9cfa, 0x9e83, 0x3cd9, 0x0000,
2168     0x0000, 0x0000, 0xa4ba, 0xe294, 0x3cba, 0x0000, 0x0000, 0x0000, 0xd7ec, 0x9afe,
2169     0x3c9a, 0x0000, 0x0000, 0x0000, 0xae80, 0x8fc6, 0x3c79, 0x0000, 0x0000, 0x0000,
2170     0x3304, 0x8560, 0x3c5c, 0x0000, 0x0000, 0x0000, 0x6d70, 0xdf8f, 0x3c3b, 0x0000,
2171     0x0000, 0x0000, 0x3ef0, 0xafc3, 0x3c1e, 0x0000, 0x0000, 0x0000, 0xd0d8, 0x826b,
2172     0x3bfe, 0x0000, 0x0000, 0x0000, 0x1c80, 0xed4f, 0x3bdd, 0x0000, 0x0000, 0x0000,
2173     0x730c, 0xb0af, 0x3bc1, 0x0000, 0x0000, 0x0000, 0x6660, 0xc219, 0x3ba2, 0x0000,
2174     0x0000, 0x0000, 0x940c, 0xabe2, 0x3b83, 0x0000, 0x0000, 0x0000, 0xdffc, 0x8408,
2175     0x3b64, 0x0000, 0x0000, 0x0000, 0x6b98, 0xc402, 0x3b45, 0x0000, 0x0000, 0x0000,
2176     0x1818, 0x9cc4, 0x3b26, 0x0000, 0x0000, 0x0000, 0x5390, 0xaab6, 0x3b05, 0x0000,
2177     0x0000, 0x0000, 0xb070, 0xd464, 0x3ae9, 0x0000, 0x0000, 0x0000, 0x231a, 0x9ef0,
2178     0x3aca, 0x0000, 0x0000, 0x0000, 0x0670, 0xd1f1, 0x3aaa, 0x0000, 0x0000, 0x0000,
2179     0x7738, 0xd9f3, 0x3a8a, 0x0000, 0x0000, 0x0000, 0xa834, 0x8092, 0x3a6c, 0x0000,
2180     0x0000, 0x0000, 0xb45c, 0xce23, 0x3a4d, 0x0000, 0x0000, 0x0000, 0x36e8, 0xb0e5,
2181     0x3a2d, 0x0000, 0x0000, 0x0000, 0xd156, 0xaf44, 0x3a10, 0x0000, 0x0000, 0x0000,
2182     0x9f52, 0x8c82, 0x39f1, 0x0000, 0x0000, 0x0000, 0x829c, 0xff83, 0x39d1, 0x0000,
2183     0x0000, 0x0000, 0x7d06, 0xefc6, 0x39b3, 0x0000, 0x0000, 0x0000, 0x93e0, 0xb0b7,
2184     0x3992, 0x0000, 0x0000, 0x0000, 0xedde, 0xc193, 0x3975, 0x0000, 0x0000, 0x0000,
2185     0xbbc0, 0xcf49, 0x3952, 0x0000, 0x0000, 0x0000, 0xbdf0, 0xd63c, 0x3937, 0x0000,
2186     0x0000, 0x0000, 0x1f34, 0x9f3a, 0x3918, 0x0000, 0x0000, 0x0000, 0x3f8e, 0xe579,
2187     0x38f9, 0x0000, 0x0000, 0x0000, 0x90c8, 0xc3f8, 0x38d9, 0x0000, 0x0000, 0x0000,
2188     0x48c0, 0xf8f8, 0x38b7, 0x0000, 0x0000, 0x0000, 0xed56, 0xafa6, 0x389c, 0x0000,
2189     0x0000, 0x0000, 0x8218, 0xb969, 0x387d, 0x0000, 0x0000, 0x0000, 0x1852, 0xec57,
2190     0x385e, 0x0000, 0x0000, 0x0000, 0x670c, 0xd674, 0x383e, 0x0000, 0x0000, 0x0000,
2191     0xad40, 0xc2c4, 0x3820, 0x0000, 0x0000, 0x0000, 0x2e80, 0xa696, 0x3801, 0x0000,
2192     0x0000, 0x0000, 0xd800, 0xc467, 0x37dc, 0x0000, 0x0000, 0x0000, 0x3c72, 0xc5ae,
2193     0x37c3, 0x0000, 0x0000, 0x0000, 0xb006, 0xac69, 0x37a4, 0x0000, 0x0000, 0x0000,
2194     0x34a0, 0x8cdf, 0x3782, 0x0000, 0x0000, 0x0000, 0x9ed2, 0xd25e, 0x3766, 0x0000,
2195     0x0000, 0x0000, 0x6fec, 0xaaaa, 0x3747, 0x0000, 0x0000, 0x0000, 0x6040, 0xfb5c,
2196     0x3726, 0x0000, 0x0000, 0x0000, 0x764c, 0xa3fc, 0x3708, 0x0000, 0x0000, 0x0000,
2197     0xb254, 0x954e, 0x36e9, 0x0000, 0x0000, 0x0000, 0x3e1c, 0xf5dc, 0x36ca, 0x0000,
2198     0x0000, 0x0000, 0x7b06, 0xc635, 0x36ac, 0x0000, 0x0000, 0x0000, 0xa8ba, 0xd738,
2199     0x368d, 0x0000, 0x0000, 0x0000, 0x06cc, 0xb24e, 0x366d, 0x0000, 0x0000, 0x0000,
2200     0x7108, 0xac76, 0x364f, 0x0000, 0x0000, 0x0000, 0x2324, 0xa7cb, 0x3630, 0x0000,
2201     0x0000, 0x0000, 0xac40, 0xef15, 0x360f, 0x0000, 0x0000, 0x0000, 0xae46, 0xd516,
2202     0x35f2, 0x0000, 0x0000, 0x0000, 0x615e, 0xe003, 0x35d3, 0x0000, 0x0000, 0x0000,
2203     0x0cf0, 0xefe7, 0x35b1, 0x0000, 0x0000, 0x0000, 0xfb50, 0xf98c, 0x3595, 0x0000,
2204     0x0000, 0x0000, 0x0abc, 0xf333, 0x3575, 0x0000, 0x0000, 0x0000, 0xdd60, 0xca3f,
2205     0x3555, 0x0000, 0x0000, 0x0000, 0x7eb6, 0xd87f, 0x3538, 0x0000, 0x0000, 0x0000,
2206     0x44f4, 0xb291, 0x3519, 0x0000, 0x0000, 0x0000, 0xff80, 0xc982, 0x34f6, 0x0000,
2207     0x0000, 0x0000, 0x9de0, 0xd9b8, 0x34db, 0x0000, 0x0000, 0x0000, 0xcd42, 0x9366,
2208     0x34bc, 0x0000, 0x0000, 0x0000, 0xbef0, 0xfaee, 0x349d, 0x0000, 0x0000, 0x0000,
2209     0xdac4, 0xb6f1, 0x347d, 0x0000, 0x0000, 0x0000, 0xf140, 0x94de, 0x345d, 0x0000,
2210     0x0000, 0x0000, 0xa218, 0x8b4b, 0x343e, 0x0000, 0x0000, 0x0000, 0x6380, 0xa135,
2211     0x341e, 0x0000, 0x0000, 0x0000, 0xb184, 0x8cb2, 0x3402, 0x0000, 0x0000, 0x0000,
2212     0x196e, 0xdc61, 0x33e3, 0x0000, 0x0000, 0x0000, 0x0c00, 0xde05, 0x33c4, 0x0000,
2213     0x0000, 0x0000, 0xef9a, 0xbd38, 0x33a5, 0x0000, 0x0000, 0x0000, 0xc1a0, 0xdf00,
2214     0x3385, 0x0000, 0x0000, 0x0000, 0x1090, 0x9973, 0x3365, 0x0000, 0x0000, 0x0000,
2215     0x4882, 0x8301, 0x3348, 0x0000, 0x0000, 0x0000, 0x7abe, 0xadc7, 0x3329, 0x0000,
2216     0x0000, 0x0000, 0x7cba, 0xec2b, 0x330a, 0x0000, 0x0000, 0x0000, 0xa520, 0x8f21,
2217     0x32e9, 0x0000, 0x0000, 0x0000, 0x710c, 0x8d36, 0x32cc, 0x0000, 0x0000, 0x0000,
2218     0x5212, 0xc6ed, 0x32ad, 0x0000, 0x0000, 0x0000, 0x7308, 0xfd76, 0x328d, 0x0000,
2219     0x0000, 0x0000, 0x5014, 0xd548, 0x326f, 0x0000, 0x0000, 0x0000, 0xd3f2, 0xb499,
2220     0x3250, 0x0000, 0x0000, 0x0000, 0x7f74, 0xa606, 0x3230, 0x0000, 0x0000, 0x0000,
2221     0xf0a8, 0xd720, 0x3212, 0x0000, 0x0000, 0x0000, 0x185c, 0xe20f, 0x31f2, 0x0000,
2222     0x0000, 0x0000, 0xa5a8, 0x8738, 0x31d4, 0x0000, 0x0000, 0x0000, 0xdd74, 0xcafb,
2223     0x31b4, 0x0000, 0x0000, 0x0000, 0x98b6, 0xbd8e, 0x3196, 0x0000, 0x0000, 0x0000,
2224     0xe9de, 0x977f, 0x3177, 0x0000, 0x0000, 0x0000, 0x67c0, 0x818d, 0x3158, 0x0000,
2225     0x0000, 0x0000, 0xe52a, 0x9322, 0x3139, 0x0000, 0x0000, 0x0000, 0xe568, 0x9b6c,
2226     0x3119, 0x0000, 0x0000, 0x0000, 0x2358, 0xaa0a, 0x30fa, 0x0000, 0x0000, 0x0000,
2227     0xe480, 0xe13b, 0x30d9, 0x0000, 0x0000, 0x0000, 0x3024, 0x90a1, 0x30bd, 0x0000,
2228     0x0000, 0x0000, 0x9620, 0xda30, 0x309d, 0x0000, 0x0000, 0x0000, 0x898a, 0xb388,
2229     0x307f, 0x0000, 0x0000, 0x0000, 0xb24c, 0xc891, 0x3060, 0x0000, 0x0000, 0x0000,
2230     0x8056, 0xf98b, 0x3041, 0x0000, 0x0000, 0x0000, 0x72a4, 0xa1ea, 0x3021, 0x0000,
2231     0x0000, 0x0000, 0x6af8, 0x9488, 0x3001, 0x0000, 0x0000, 0x0000, 0xe00c, 0xdfcb,
2232     0x2fe4, 0x0000, 0x0000, 0x0000, 0xeeec, 0xc941, 0x2fc4, 0x0000, 0x0000, 0x0000,
2233     0x53e0, 0xe70f, 0x2fa4, 0x0000, 0x0000, 0x0000, 0x8f60, 0x9c07, 0x2f85, 0x0000,
2234     0x0000, 0x0000, 0xb328, 0xc3e7, 0x2f68, 0x0000, 0x0000, 0x0000, 0x9404, 0xf8c7,
2235     0x2f48, 0x0000, 0x0000, 0x0000, 0x38e0, 0xc99f, 0x2f29, 0x0000, 0x0000, 0x0000,
2236     0x9778, 0xd984, 0x2f09, 0x0000, 0x0000, 0x0000, 0xe700, 0xd142, 0x2eea, 0x0000,
2237     0x0000, 0x0000, 0xd904, 0x9443, 0x2ecd, 0x0000, 0x0000, 0x0000, 0xd4ba, 0xae7e,
2238     0x2eae, 0x0000, 0x0000, 0x0000, 0x8e5e, 0x8524, 0x2e8f, 0x0000, 0x0000, 0x0000,
2239     0xb550, 0xc9ed, 0x2e6e, 0x0000, 0x0000, 0x0000, 0x53b8, 0x8648, 0x2e51, 0x0000,
2240     0x0000, 0x0000, 0xdae4, 0x87f9, 0x2e32, 0x0000, 0x0000, 0x0000, 0x2942, 0xd966,
2241     0x2e13, 0x0000, 0x0000, 0x0000, 0x4f28, 0xcf3c, 0x2df3, 0x0000, 0x0000, 0x0000,
2242     0xfa40, 0xc4ef, 0x2dd1, 0x0000, 0x0000, 0x0000, 0x4424, 0xbca7, 0x2db5, 0x0000,
2243     0x0000, 0x0000, 0x2e62, 0xcdc5, 0x2d97, 0x0000, 0x0000, 0x0000, 0xed88, 0x996b,
2244     0x2d78, 0x0000, 0x0000, 0x0000, 0x7c30, 0xd97d, 0x2d56, 0x0000, 0x0000, 0x0000,
2245     0xed26, 0xbf6e, 0x2d3a, 0x0000, 0x0000, 0x0000, 0x2918, 0x921b, 0x2d1a, 0x0000,
2246     0x0000, 0x0000, 0x4e24, 0xe84e, 0x2cfb, 0x0000, 0x0000, 0x0000, 0x6dc0, 0x92ec,
2247     0x2cdd, 0x0000, 0x0000, 0x0000, 0x4f2c, 0xacf8, 0x2cbd, 0x0000, 0x0000, 0x0000,
2248     0xc634, 0xf094, 0x2c9e, 0x0000, 0x0000, 0x0000, 0xdc70, 0xe5d3, 0x2c7e, 0x0000,
2249     0x0000, 0x0000, 0x2180, 0xa600, 0x2c5b, 0x0000, 0x0000, 0x0000, 0x8480, 0xd680,
2250     0x2c3c, 0x0000, 0x0000, 0x0000, 0x8b24, 0xd63b, 0x2c22, 0x0000, 0x0000, 0x0000,
2251     0x02e0, 0xaa47, 0x2c00, 0x0000, 0x0000, 0x0000, 0x9ad0, 0xee84, 0x2be3, 0x0000,
2252     0x0000, 0x0000, 0xf7dc, 0xf699, 0x2bc6, 0x0000, 0x0000, 0x0000, 0xddde, 0xe490,
2253     0x2ba7, 0x0000, 0x0000, 0x0000, 0x34a0, 0xb4fd, 0x2b85, 0x0000, 0x0000, 0x0000,
2254     0x91b4, 0x8ef6, 0x2b68, 0x0000, 0x0000, 0x0000, 0xa3e0, 0xa2a7, 0x2b47, 0x0000,
2255     0x0000, 0x0000, 0xcce4, 0x82b3, 0x2b2a, 0x0000, 0x0000, 0x0000, 0xe4be, 0x8207,
2256     0x2b0c, 0x0000, 0x0000, 0x0000, 0x1d92, 0xab43, 0x2aed, 0x0000, 0x0000, 0x0000,
2257     0xe818, 0xf9f6, 0x2acd, 0x0000, 0x0000, 0x0000, 0xff12, 0xba80, 0x2aaf, 0x0000,
2258     0x0000, 0x0000, 0x5254, 0x8529, 0x2a90, 0x0000, 0x0000, 0x0000, 0x1b88, 0xe032,
2259     0x2a71, 0x0000, 0x0000, 0x0000, 0x3248, 0xd86d, 0x2a50, 0x0000, 0x0000, 0x0000,
2260     0x3140, 0xc9d5, 0x2a2e, 0x0000, 0x0000, 0x0000, 0x14e6, 0xbd47, 0x2a14, 0x0000,
2261     0x0000, 0x0000, 0x5c10, 0xe544, 0x29f4, 0x0000, 0x0000, 0x0000, 0x9f50, 0x90b6,
2262     0x29d4, 0x0000, 0x0000, 0x0000, 0x9850, 0xab55, 0x29b6, 0x0000, 0x0000, 0x0000,
2263     0x2750, 0x9d07, 0x2998, 0x0000, 0x0000, 0x0000, 0x6700, 0x8bbb, 0x2973, 0x0000,
2264     0x0000, 0x0000, 0x5dba, 0xed31, 0x295a, 0x0000, 0x0000, 0x0000, 0x61dc, 0x85fe,
2265     0x293a, 0x0000, 0x0000, 0x0000, 0x9ba2, 0xd6b4, 0x291c, 0x0000, 0x0000, 0x0000,
2266     0x2d30, 0xe3a5, 0x28fb, 0x0000, 0x0000, 0x0000, 0x6630, 0xb566, 0x28dd, 0x0000,
2267     0x0000, 0x0000, 0x5ad4, 0xa829, 0x28bf, 0x0000, 0x0000, 0x0000, 0x89d8, 0xe290,
2268     0x28a0, 0x0000, 0x0000, 0x0000, 0x3916, 0xc428, 0x2881, 0x0000, 0x0000, 0x0000,
2269     0x0490, 0xbea4, 0x2860, 0x0000, 0x0000, 0x0000, 0xee06, 0x80ee, 0x2843, 0x0000,
2270     0x0000, 0x0000, 0xfc00, 0xf327, 0x2820, 0x0000, 0x0000, 0x0000, 0xea40, 0xa871,
2271     0x2800, 0x0000, 0x0000, 0x0000, 0x63d8, 0x9c26, 0x27e4, 0x0000, 0x0000, 0x0000,
2272     0x07ba, 0xc0c9, 0x27c7, 0x0000, 0x0000, 0x0000, 0x3fa2, 0x9797, 0x27a8, 0x0000,
2273     0x0000, 0x0000, 0x21c6, 0xfeca, 0x2789, 0x0000, 0x0000, 0x0000, 0xde40, 0x860d,
2274     0x2768, 0x0000, 0x0000, 0x0000, 0x9cc8, 0x98ce, 0x2749, 0x0000, 0x0000, 0x0000,
2275     0x3778, 0xa31c, 0x272a, 0x0000, 0x0000, 0x0000, 0xe778, 0xf6e2, 0x270b, 0x0000,
2276     0x0000, 0x0000, 0x59b8, 0xf841, 0x26ed, 0x0000, 0x0000, 0x0000, 0x02e0, 0xad04,
2277     0x26cd, 0x0000, 0x0000, 0x0000, 0x5a92, 0x9380, 0x26b0, 0x0000, 0x0000, 0x0000,
2278     0xc740, 0x8886, 0x268d, 0x0000, 0x0000, 0x0000, 0x0680, 0xfaf8, 0x266c, 0x0000,
2279     0x0000, 0x0000, 0xfb60, 0x897f, 0x2653, 0x0000, 0x0000, 0x0000, 0x8760, 0xf903,
2280     0x2634, 0x0000, 0x0000, 0x0000, 0xad2a, 0xc2c8, 0x2615, 0x0000, 0x0000, 0x0000,
2281     0x2d86, 0x8aef, 0x25f6, 0x0000, 0x0000, 0x0000, 0x1ef4, 0xe627, 0x25d6, 0x0000,
2282     0x0000, 0x0000, 0x09e4, 0x8020, 0x25b7, 0x0000, 0x0000, 0x0000, 0x7548, 0xd227,
2283     0x2598, 0x0000, 0x0000, 0x0000, 0x75dc, 0xfb5b, 0x2579, 0x0000, 0x0000, 0x0000,
2284     0xea84, 0xc8b6, 0x255a, 0x0000, 0x0000, 0x0000, 0xe4d0, 0x8145, 0x253b, 0x0000,
2285     0x0000, 0x0000, 0x3640, 0x9768, 0x251c, 0x0000, 0x0000, 0x0000, 0x246a, 0xccec,
2286     0x24fe, 0x0000, 0x0000, 0x0000, 0x51d0, 0xa075, 0x24dd, 0x0000, 0x0000, 0x0000,
2287     0x4638, 0xa385, 0x24bf, 0x0000, 0x0000, 0x0000, 0xd788, 0xd776, 0x24a1, 0x0000,
2288     0x0000, 0x0000, 0x1370, 0x8997, 0x2482, 0x0000, 0x0000, 0x0000, 0x1e88, 0x9b67,
2289     0x2462, 0x0000, 0x0000, 0x0000, 0x6c08, 0xd975, 0x2444, 0x0000, 0x0000, 0x0000,
2290     0xfdb0, 0xcfc0, 0x2422, 0x0000, 0x0000, 0x0000, 0x3100, 0xc026, 0x2406, 0x0000,
2291     0x0000, 0x0000, 0xc5b4, 0xae64, 0x23e6, 0x0000, 0x0000, 0x0000, 0x2280, 0xf687,
2292     0x23c3, 0x0000, 0x0000, 0x0000, 0x2de0, 0x9006, 0x23a9, 0x0000, 0x0000, 0x0000,
2293     0x24bc, 0xf631, 0x238a, 0x0000, 0x0000, 0x0000, 0xb8d4, 0xa975, 0x236b, 0x0000,
2294     0x0000, 0x0000, 0xd9a4, 0xb949, 0x234b, 0x0000, 0x0000, 0x0000, 0xb54e, 0xbd39,
2295     0x232d, 0x0000, 0x0000, 0x0000, 0x4aac, 0x9a52, 0x230e, 0x0000, 0x0000, 0x0000,
2296     0xbbbc, 0xd085, 0x22ef, 0x0000, 0x0000, 0x0000, 0xdf18, 0xc633, 0x22cf, 0x0000,
2297     0x0000, 0x0000, 0x16d0, 0xeca5, 0x22af, 0x0000, 0x0000, 0x0000, 0xf2a0, 0xdf6f,
2298     0x228e, 0x0000, 0x0000, 0x0000, 0x8c44, 0xe86b, 0x2272, 0x0000, 0x0000, 0x0000,
2299     0x35c0, 0xbbf4, 0x2253, 0x0000, 0x0000, 0x0000, 0x0c40, 0xdafb, 0x2230, 0x0000,
2300     0x0000, 0x0000, 0x92dc, 0x9935, 0x2216, 0x0000, 0x0000, 0x0000, 0x0ca0, 0xbda6,
2301     0x21f3, 0x0000, 0x0000, 0x0000, 0x5958, 0xa6fd, 0x21d6, 0x0000, 0x0000, 0x0000,
2302     0xa3dc, 0x9d7f, 0x21b9, 0x0000, 0x0000, 0x0000, 0x79dc, 0xfcb5, 0x2199, 0x0000,
2303     0x0000, 0x0000, 0xf264, 0xcebb, 0x217b, 0x0000, 0x0000, 0x0000, 0x0abe, 0x8308,
2304     0x215c, 0x0000, 0x0000, 0x0000, 0x30ae, 0xb463, 0x213d, 0x0000, 0x0000, 0x0000,
2305     0x6228, 0xb040, 0x211c, 0x0000, 0x0000, 0x0000, 0xc9b2, 0xf43b, 0x20ff, 0x0000,
2306     0x0000, 0x0000, 0x3d8e, 0xa4b3, 0x20e0, 0x0000, 0x0000, 0x0000, 0x84e6, 0x8dab,
2307     0x20c1, 0x0000, 0x0000, 0x0000, 0xa124, 0x9b74, 0x20a1, 0x0000, 0x0000, 0x0000,
2308     0xc276, 0xd497, 0x2083, 0x0000, 0x0000, 0x0000, 0x6354, 0xa466, 0x2063, 0x0000,
2309     0x0000, 0x0000, 0x8654, 0xaf0a, 0x2044, 0x0000, 0x0000, 0x0000, 0x1d20, 0xfa5c,
2310     0x2024, 0x0000, 0x0000, 0x0000, 0xbcd0, 0xf3f0, 0x2004, 0x0000, 0x0000, 0x0000,
2311     0xedf0, 0xf0b6, 0x1fe7, 0x0000, 0x0000, 0x0000, 0x45bc, 0x9182, 0x1fc9, 0x0000,
2312     0x0000, 0x0000, 0xe254, 0xdc85, 0x1faa, 0x0000, 0x0000, 0x0000, 0xb898, 0xe9b1,
2313     0x1f8a, 0x0000, 0x0000, 0x0000, 0x0ebe, 0xe6f0, 0x1f6c, 0x0000, 0x0000, 0x0000,
2314     0xa9b8, 0xf584, 0x1f4c, 0x0000, 0x0000, 0x0000, 0x12e8, 0xdf6b, 0x1f2e, 0x0000,
2315     0x0000, 0x0000, 0x9f9e, 0xcd55, 0x1f0f, 0x0000, 0x0000, 0x0000, 0x05a0, 0xec3a,
2316     0x1eef, 0x0000, 0x0000, 0x0000, 0xd8e0, 0x96f8, 0x1ed1, 0x0000, 0x0000, 0x0000,
2317     0x3bd4, 0xccc6, 0x1eb1, 0x0000, 0x0000, 0x0000, 0x4910, 0xb87b, 0x1e93, 0x0000,
2318     0x0000, 0x0000, 0xbefc, 0xd40b, 0x1e73, 0x0000, 0x0000, 0x0000, 0x317e, 0xa406,
2319     0x1e55, 0x0000, 0x0000, 0x0000, 0x6bb2, 0xc2b2, 0x1e36, 0x0000, 0x0000, 0x0000,
2320     0xb87e, 0xbb78, 0x1e17, 0x0000, 0x0000, 0x0000, 0xa03c, 0xdbbd, 0x1df7, 0x0000,
2321     0x0000, 0x0000, 0x5b6c, 0xe3c8, 0x1dd9, 0x0000, 0x0000, 0x0000, 0x8968, 0xca8e,
2322     0x1dba, 0x0000, 0x0000, 0x0000, 0xc024, 0xe6ab, 0x1d9a, 0x0000, 0x0000, 0x0000,
2323     0x4110, 0xd4eb, 0x1d7a, 0x0000, 0x0000, 0x0000, 0xa168, 0xbdb5, 0x1d5d, 0x0000,
2324     0x0000, 0x0000, 0x012e, 0xa5fa, 0x1d3e, 0x0000, 0x0000, 0x0000, 0x6838, 0x9c1f,
2325     0x1d1e, 0x0000, 0x0000, 0x0000, 0xa158, 0xaa76, 0x1d00, 0x0000, 0x0000, 0x0000,
2326     0x090a, 0xbd95, 0x1ce1, 0x0000, 0x0000, 0x0000, 0xf73e, 0x8b6d, 0x1cc2, 0x0000,
2327     0x0000, 0x0000, 0x5fda, 0xbcbf, 0x1ca3, 0x0000, 0x0000, 0x0000, 0xdbe8, 0xb89f,
2328     0x1c84, 0x0000, 0x0000, 0x0000, 0x6e4c, 0x96c7, 0x1c64, 0x0000, 0x0000, 0x0000,
2329     0x19c2, 0xf2a4, 0x1c46, 0x0000, 0x0000, 0x0000, 0xb800, 0xf855, 0x1c1e, 0x0000,
2330     0x0000, 0x0000, 0x87fc, 0x85ff, 0x1c08, 0x0000, 0x0000, 0x0000, 0x1418, 0x839f,
2331     0x1be9, 0x0000, 0x0000, 0x0000, 0x6186, 0xd9d8, 0x1bca, 0x0000, 0x0000, 0x0000,
2332     0xf500, 0xabaa, 0x1ba6, 0x0000, 0x0000, 0x0000, 0x7b36, 0xdafe, 0x1b8c, 0x0000,
2333     0x0000, 0x0000, 0xf394, 0xe6d8, 0x1b6c, 0x0000, 0x0000, 0x0000, 0x6efc, 0x9e55,
2334     0x1b4e, 0x0000, 0x0000, 0x0000, 0x5e10, 0xc523, 0x1b2e, 0x0000, 0x0000, 0x0000,
2335     0x8210, 0xb6f9, 0x1b0d, 0x0000, 0x0000, 0x0000, 0x9ab0, 0x96e3, 0x1af1, 0x0000,
2336     0x0000, 0x0000, 0x3864, 0x92e7, 0x1ad1, 0x0000, 0x0000, 0x0000, 0x9878, 0xdc65,
2337     0x1ab1, 0x0000, 0x0000, 0x0000, 0xfa20, 0xd6cb, 0x1a94, 0x0000, 0x0000, 0x0000,
2338     0x6c00, 0xa4e4, 0x1a70, 0x0000, 0x0000, 0x0000, 0xab40, 0xb41b, 0x1a53, 0x0000,
2339     0x0000, 0x0000, 0x43a4, 0x8ede, 0x1a37, 0x0000, 0x0000, 0x0000, 0x22e0, 0x9314,
2340     0x1a15, 0x0000, 0x0000, 0x0000, 0x6170, 0xb949, 0x19f8, 0x0000, 0x0000, 0x0000,
2341     0x6b00, 0xe056, 0x19d8, 0x0000, 0x0000, 0x0000, 0x9ba8, 0xa94c, 0x19b9, 0x0000,
2342     0x0000, 0x0000, 0xfaa0, 0xaa16, 0x199b, 0x0000, 0x0000, 0x0000, 0x899a, 0xf627,
2343     0x197d, 0x0000, 0x0000, 0x0000, 0x9f20, 0xfb70, 0x195d, 0x0000, 0x0000, 0x0000,
2344     0xa4b8, 0xc176, 0x193e, 0x0000, 0x0000, 0x0000, 0xb21c, 0x85c3, 0x1920, 0x0000,
2345     0x0000, 0x0000, 0x50d2, 0x9b19, 0x1901, 0x0000, 0x0000, 0x0000, 0xd4b0, 0xb708,
2346     0x18e0, 0x0000, 0x0000, 0x0000, 0xfb88, 0xf510, 0x18c1, 0x0000, 0x0000, 0x0000,
2347     0x31ec, 0xdc8d, 0x18a3, 0x0000, 0x0000, 0x0000, 0x3c00, 0xbff9, 0x1885, 0x0000,
2348     0x0000, 0x0000, 0x5020, 0xc30b, 0x1862, 0x0000, 0x0000, 0x0000, 0xd4f0, 0xda0c,
2349     0x1844, 0x0000, 0x0000, 0x0000, 0x20d2, 0x99a5, 0x1828, 0x0000, 0x0000, 0x0000,
2350     0x852e, 0xd159, 0x1809, 0x0000, 0x0000, 0x0000, 0x7cd8, 0x97a1, 0x17e9, 0x0000,
2351     0x0000, 0x0000, 0x423a, 0x997b, 0x17cb, 0x0000, 0x0000, 0x0000, 0xc1c0, 0xbe7d,
2352     0x17a8, 0x0000, 0x0000, 0x0000, 0xe8bc, 0xdcdd, 0x178d, 0x0000, 0x0000, 0x0000,
2353     0x8b28, 0xae06, 0x176e, 0x0000, 0x0000, 0x0000, 0x102e, 0xb8d4, 0x174f, 0x0000,
2354     0x0000, 0x0000, 0xaa00, 0xaa5c, 0x172f, 0x0000, 0x0000, 0x0000, 0x51f0, 0x9fc0,
2355     0x170e, 0x0000, 0x0000, 0x0000, 0xf858, 0xe181, 0x16f2, 0x0000, 0x0000, 0x0000,
2356     0x91a8, 0x8162, 0x16d3, 0x0000, 0x0000, 0x0000, 0x5f40, 0xcb6f, 0x16b1, 0x0000,
2357     0x0000, 0x0000, 0xbb50, 0xe55f, 0x1693, 0x0000, 0x0000, 0x0000, 0xacd2, 0xd895,
2358     0x1676, 0x0000, 0x0000, 0x0000, 0xef30, 0x97bf, 0x1654, 0x0000, 0x0000, 0x0000,
2359     0xf700, 0xb3d7, 0x1633, 0x0000, 0x0000, 0x0000, 0x3454, 0xa7b5, 0x1619, 0x0000,
2360     0x0000, 0x0000, 0x6b00, 0xa929, 0x15f6, 0x0000, 0x0000, 0x0000, 0x9f04, 0x89f7,
2361     0x15db, 0x0000, 0x0000, 0x0000, 0xad78, 0xd985, 0x15bc, 0x0000, 0x0000, 0x0000,
2362     0xa46a, 0xae3f, 0x159d, 0x0000, 0x0000, 0x0000, 0x63a0, 0xd0da, 0x157c, 0x0000,
2363     0x0000, 0x0000, 0x5e90, 0x817d, 0x155e, 0x0000, 0x0000, 0x0000, 0x1494, 0xb13f,
2364     0x1540, 0x0000, 0x0000, 0x0000, 0x0090, 0x9c40, 0x1521, 0x0000, 0x0000, 0x0000,
2365     0xdd70, 0xcc86, 0x1500, 0x0000, 0x0000, 0x0000, 0x64f8, 0xdb6f, 0x14e1, 0x0000,
2366     0x0000, 0x0000, 0xe22c, 0xac17, 0x14c3, 0x0000, 0x0000, 0x0000, 0x60e0, 0xa9ad,
2367     0x14a3, 0x0000, 0x0000, 0x0000, 0x4640, 0xd658, 0x1481, 0x0000, 0x0000, 0x0000,
2368     0x6490, 0xa181, 0x1467, 0x0000, 0x0000, 0x0000, 0x1df4, 0xaaa2, 0x1447, 0x0000,
2369     0x0000, 0x0000, 0xb94a, 0x8f61, 0x1429, 0x0000, 0x0000, 0x0000, 0x5198, 0x9d83,
2370     0x1409, 0x0000, 0x0000, 0x0000, 0x0f7a, 0xa818, 0x13eb, 0x0000, 0x0000, 0x0000,
2371     0xc45e, 0xc06c, 0x13cc, 0x0000, 0x0000, 0x0000, 0x4ec0, 0xfa29, 0x13a8, 0x0000,
2372     0x0000, 0x0000, 0x6418, 0x8cad, 0x138c, 0x0000, 0x0000, 0x0000, 0xbcc8, 0xe7d1,
2373     0x136f, 0x0000, 0x0000, 0x0000, 0xc934, 0xf9b0, 0x134f, 0x0000, 0x0000, 0x0000,
2374     0x6ce0, 0x98df, 0x1331, 0x0000, 0x0000, 0x0000, 0x3516, 0xe5e9, 0x1312, 0x0000,
2375     0x0000, 0x0000, 0xc6c0, 0xef8b, 0x12ef, 0x0000, 0x0000, 0x0000, 0xaf02, 0x913d,
2376     0x12d4, 0x0000, 0x0000, 0x0000, 0xd230, 0xe1d5, 0x12b5, 0x0000, 0x0000, 0x0000,
2377     0xfba8, 0xc232, 0x1295, 0x0000, 0x0000, 0x0000, 0x7ba4, 0xabeb, 0x1277, 0x0000,
2378     0x0000, 0x0000, 0x6e5c, 0xc692, 0x1258, 0x0000, 0x0000, 0x0000, 0x76a2, 0x9756,
2379     0x1239, 0x0000, 0x0000, 0x0000, 0xe180, 0xe423, 0x1214, 0x0000, 0x0000, 0x0000,
2380     0x8c3c, 0x90f8, 0x11fb, 0x0000, 0x0000, 0x0000, 0x9f3c, 0x9fd2, 0x11dc, 0x0000,
2381     0x0000, 0x0000, 0x53e0, 0xb73e, 0x11bd, 0x0000, 0x0000, 0x0000, 0x45be, 0x88d6,
2382     0x119e, 0x0000, 0x0000, 0x0000, 0x111a, 0x8bc0, 0x117f, 0x0000, 0x0000, 0x0000,
2383     0xe26a, 0xd7ff, 0x1160, 0x0000, 0x0000, 0x0000, 0xfb60, 0xdd8d, 0x113f, 0x0000,
2384     0x0000, 0x0000, 0x9370, 0xc108, 0x1120, 0x0000, 0x0000, 0x0000, 0x9654, 0x8baf,
2385     0x1103, 0x0000, 0x0000, 0x0000, 0xd6ec, 0xd6b9, 0x10e4, 0x0000, 0x0000, 0x0000,
2386     0x23e4, 0xd7b7, 0x10c4, 0x0000, 0x0000, 0x0000, 0x1aa6, 0xa847, 0x10a6, 0x0000,
2387     0x0000, 0x0000, 0xbee6, 0x9fef, 0x1087, 0x0000, 0x0000, 0x0000, 0x26d0, 0xa6eb,
2388     0x1066, 0x0000, 0x0000, 0x0000, 0x5b86, 0xa880, 0x1049, 0x0000, 0x0000, 0x0000,
2389     0x125c, 0xd971, 0x1029, 0x0000, 0x0000, 0x0000, 0x1f78, 0x9d18, 0x100a, 0x0000,
2390     0x0000, 0x0000, 0x0e84, 0xb15b, 0x0feb, 0x0000, 0x0000, 0x0000, 0xd0c0, 0xc150,
2391     0x0fcc, 0x0000, 0x0000, 0x0000, 0xa330, 0xc40c, 0x0fad, 0x0000, 0x0000, 0x0000,
2392     0x5202, 0xfc2c, 0x0f8f, 0x0000, 0x0000, 0x0000, 0x3f7c, 0xecf5, 0x0f6f, 0x0000,
2393     0x0000, 0x0000, 0xef44, 0xfdfd, 0x0f50, 0x0000, 0x0000, 0x0000, 0x3f6c, 0xab1b,
2394     0x0f31, 0x0000, 0x0000, 0x0000, 0xf658, 0x89ec, 0x0f11, 0x0000, 0x0000, 0x0000,
2395     0xbfc8, 0x9ba8, 0x0ef4, 0x0000, 0x0000, 0x0000, 0x3d40, 0xbe21, 0x0ed5, 0x0000,
2396     0x0000, 0x0000, 0xbbc4, 0xc70d, 0x0eb6, 0x0000, 0x0000, 0x0000, 0x5158, 0xdb16,
2397     0x0e96, 0x0000, 0x0000, 0x0000, 0xb5a8, 0xa8d8, 0x0e78, 0x0000, 0x0000, 0x0000,
2398     0xcccc, 0xb40e, 0x0e58, 0x0000, 0x0000, 0x0000, 0x448c, 0xcb62, 0x0e3a, 0x0000,
2399     0x0000, 0x0000, 0xf12a, 0x8aed, 0x0e1b, 0x0000, 0x0000, 0x0000, 0x79d0, 0xc59c,
2400     0x0dfb, 0x0000, 0x0000, 0x0000, 0x06b4, 0xcdc9, 0x0ddd, 0x0000, 0x0000, 0x0000,
2401     0xae70, 0xa979, 0x0dbe, 0x0000, 0x0000, 0x0000, 0x317c, 0xa8fb, 0x0d9e, 0x0000,
2402     0x0000, 0x0000, 0x5fe0, 0x8a50, 0x0d7d, 0x0000, 0x0000, 0x0000, 0x70b6, 0xfdfa,
2403     0x0d61, 0x0000, 0x0000, 0x0000, 0x1640, 0x9dc7, 0x0d41, 0x0000, 0x0000, 0x0000,
2404     0x9a9c, 0xdc50, 0x0d23, 0x0000, 0x0000, 0x0000, 0x4fcc, 0x9a9b, 0x0d04, 0x0000,
2405     0x0000, 0x0000, 0x7e48, 0x8f77, 0x0ce5, 0x0000, 0x0000, 0x0000, 0x84e4, 0xd4b9,
2406     0x0cc6, 0x0000, 0x0000, 0x0000, 0x84e0, 0xbd10, 0x0ca6, 0x0000, 0x0000, 0x0000,
2407     0x1b0a, 0xc8d9, 0x0c88, 0x0000, 0x0000, 0x0000, 0x6a48, 0xfc81, 0x0c68, 0x0000,
2408     0x0000, 0x0000, 0x070a, 0xbef6, 0x0c4a, 0x0000, 0x0000, 0x0000, 0x8a70, 0xf096,
2409     0x0c2b, 0x0000, 0x0000, 0x0000, 0xecc2, 0xc994, 0x0c0c, 0x0000, 0x0000, 0x0000,
2410     0x1540, 0x9537, 0x0bea, 0x0000, 0x0000, 0x0000, 0x1b02, 0xab5b, 0x0bce, 0x0000,
2411     0x0000, 0x0000, 0x5dc0, 0xb0c8, 0x0bad, 0x0000, 0x0000, 0x0000, 0xc928, 0xe034,
2412     0x0b8f, 0x0000, 0x0000, 0x0000, 0x2d12, 0xb4b0, 0x0b71, 0x0000, 0x0000, 0x0000,
2413     0x8fc2, 0xbb94, 0x0b52, 0x0000, 0x0000, 0x0000, 0xe236, 0xe22f, 0x0b33, 0x0000,
2414     0x0000, 0x0000, 0xb97c, 0xbe9e, 0x0b13, 0x0000, 0x0000, 0x0000, 0xe1a6, 0xe16d,
2415     0x0af5, 0x0000, 0x0000, 0x0000, 0xd330, 0xbaf0, 0x0ad6, 0x0000, 0x0000, 0x0000,
2416     0xc0bc, 0xbbd0, 0x0ab7, 0x0000, 0x0000, 0x0000, 0x8e66, 0xdd9b, 0x0a98, 0x0000,
2417     0x0000, 0x0000, 0xc95c, 0xf799, 0x0a79, 0x0000, 0x0000, 0x0000, 0xdac0, 0xbe4c,
2418     0x0a55, 0x0000, 0x0000, 0x0000, 0xafc0, 0xc378, 0x0a37, 0x0000, 0x0000, 0x0000,
2419     0xa880, 0xe341, 0x0a19, 0x0000, 0x0000, 0x0000, 0xc242, 0x81f6, 0x09fd, 0x0000,
2420     0x0000, 0x0000, 0x7470, 0xc777, 0x09de, 0x0000, 0x0000, 0x0000, 0x62bc, 0xb684,
2421     0x09be, 0x0000, 0x0000, 0x0000, 0x43ac, 0x8c58, 0x099f, 0x0000, 0x0000, 0x0000,
2422     0xcc3c, 0xf9ac, 0x0981, 0x0000, 0x0000, 0x0000, 0x1526, 0xb670, 0x0962, 0x0000,
2423     0x0000, 0x0000, 0xc9fe, 0xdf50, 0x0943, 0x0000, 0x0000, 0x0000, 0x6ae6, 0xc065,
2424     0x0924, 0x0000, 0x0000, 0x0000, 0xb114, 0xcf29, 0x0905, 0x0000, 0x0000, 0x0000,
2425     0xd388, 0x922a, 0x08e4, 0x0000, 0x0000, 0x0000, 0xcf54, 0xb926, 0x08c7, 0x0000,
2426     0x0000, 0x0000, 0x3826, 0xe855, 0x08a8, 0x0000, 0x0000, 0x0000, 0xe7c8, 0x829b,
2427     0x0888, 0x0000, 0x0000, 0x0000, 0x546c, 0xa903, 0x086a, 0x0000, 0x0000, 0x0000,
2428     0x8768, 0x99cc, 0x0849, 0x0000, 0x0000, 0x0000, 0x00ac, 0xf529, 0x082b, 0x0000,
2429     0x0000, 0x0000, 0x2658, 0x9f0b, 0x080c, 0x0000, 0x0000, 0x0000, 0xfe5c, 0x9e21,
2430     0x07ee, 0x0000, 0x0000, 0x0000, 0x6da2, 0x9910, 0x07cf, 0x0000, 0x0000, 0x0000,
2431     0x9220, 0xf9b3, 0x07b0, 0x0000, 0x0000, 0x0000, 0x3d90, 0xa541, 0x0791, 0x0000,
2432     0x0000, 0x0000, 0x6e4c, 0xe7cc, 0x0771, 0x0000, 0x0000, 0x0000, 0xa8fa, 0xe80a,
2433     0x0753, 0x0000, 0x0000, 0x0000, 0x4e14, 0xc3a7, 0x0734, 0x0000, 0x0000, 0x0000,
2434     0xf7e0, 0xbad9, 0x0712, 0x0000, 0x0000, 0x0000, 0xfea0, 0xeff2, 0x06f5, 0x0000,
2435     0x0000, 0x0000, 0xcef6, 0xbd48, 0x06d7, 0x0000, 0x0000, 0x0000, 0x7544, 0xf559,
2436     0x06b7, 0x0000, 0x0000, 0x0000, 0x2388, 0xf655, 0x0698, 0x0000, 0x0000, 0x0000,
2437     0xe900, 0xad56, 0x0676, 0x0000, 0x0000, 0x0000, 0x2cc0, 0x8437, 0x0659, 0x0000,
2438     0x0000, 0x0000, 0x3068, 0xc544, 0x063b, 0x0000, 0x0000, 0x0000, 0xdc70, 0xe73c,
2439     0x061b, 0x0000, 0x0000, 0x0000, 0xee50, 0x9d49, 0x05fc, 0x0000, 0x0000, 0x0000,
2440     0x93d2, 0x81f6, 0x05df, 0x0000, 0x0000, 0x0000, 0x941c, 0xadff, 0x05bf, 0x0000,
2441     0x0000, 0x0000, 0x2ce2, 0x8e45, 0x05a1, 0x0000, 0x0000, 0x0000, 0x4a60, 0x95fd,
2442     0x0581, 0x0000, 0x0000, 0x0000, 0x79f8, 0xb83a, 0x0563, 0x0000, 0x0000, 0x0000,
2443     0xcb58, 0xa1f5, 0x0543, 0x0000, 0x0000, 0x0000, 0x2a3a, 0xdc36, 0x0525, 0x0000,
2444     0x0000, 0x0000, 0x14ee, 0x890e, 0x0506, 0x0000, 0x0000, 0x0000, 0x8f20, 0xc432,
2445     0x04e3, 0x0000, 0x0000, 0x0000, 0x8440, 0xb21d, 0x04c6, 0x0000, 0x0000, 0x0000,
2446     0x5430, 0xf698, 0x04a7, 0x0000, 0x0000, 0x0000, 0x04ae, 0x8b20, 0x048a, 0x0000,
2447     0x0000, 0x0000, 0x04d0, 0xe872, 0x046b, 0x0000, 0x0000, 0x0000, 0xc78e, 0x8893,
2448     0x044c, 0x0000, 0x0000, 0x0000, 0x0f78, 0x9895, 0x042b, 0x0000, 0x0000, 0x0000,
2449     0x11d4, 0xdf2e, 0x040d, 0x0000, 0x0000, 0x0000, 0xe84c, 0x89d5, 0x03ef, 0x0000,
2450     0x0000, 0x0000, 0xf7be, 0x8a67, 0x03d0, 0x0000, 0x0000, 0x0000, 0x95d0, 0xc906,
2451     0x03b1, 0x0000, 0x0000, 0x0000, 0x64ce, 0xd96c, 0x0392, 0x0000, 0x0000, 0x0000,
2452     0x97ba, 0xa16f, 0x0373, 0x0000, 0x0000, 0x0000, 0x463c, 0xc51a, 0x0354, 0x0000,
2453     0x0000, 0x0000, 0xef0a, 0xe93e, 0x0335, 0x0000, 0x0000, 0x0000, 0x526a, 0xa466,
2454     0x0316, 0x0000, 0x0000, 0x0000, 0x4140, 0xa94d, 0x02f5, 0x0000, 0x0000, 0x0000,
2455     0xb4ec, 0xce68, 0x02d8, 0x0000, 0x0000, 0x0000, 0x4fa2, 0x8490, 0x02b9, 0x0000,
2456     0x0000, 0x0000, 0x4e60, 0xca98, 0x0298, 0x0000, 0x0000, 0x0000, 0x08dc, 0xe09c,
2457     0x027a, 0x0000, 0x0000, 0x0000, 0x2b90, 0xc7e3, 0x025c, 0x0000, 0x0000, 0x0000,
2458     0x5a7c, 0xf8ef, 0x023c, 0x0000, 0x0000, 0x0000, 0x5022, 0x9d58, 0x021e, 0x0000,
2459     0x0000, 0x0000, 0x553a, 0xe242, 0x01ff, 0x0000, 0x0000, 0x0000, 0x7e6e, 0xb54d,
2460     0x01e0, 0x0000, 0x0000, 0x0000, 0xd2d4, 0xa88c, 0x01c1, 0x0000, 0x0000, 0x0000,
2461     0x75b6, 0xfe6d, 0x01a2, 0x0000, 0x0000, 0x0000, 0x3bb2, 0xf04c, 0x0183, 0x0000,
2462     0x0000, 0x0000, 0xc2d0, 0xc046, 0x0163, 0x0000, 0x0000, 0x0000, 0x250c, 0xf9d6,
2463     0x0145, 0x0000, 0x0000, 0x0000, 0xb7b4, 0x8a0d, 0x0126, 0x0000, 0x0000, 0x0000,
2464     0x1a72, 0xe4f5, 0x0107, 0x0000, 0x0000, 0x0000, 0x825c, 0xa9b8, 0x00e8, 0x0000,
2465     0x0000, 0x0000, 0x6c90, 0xc9ad, 0x00c6, 0x0000, 0x0000, 0x0000, 0x4d00, 0xd1bb,
2466     0x00aa, 0x0000, 0x0000, 0x0000, 0xa4a0, 0xee01, 0x0087, 0x0000, 0x0000, 0x0000,
2467     0x89a8, 0xbe9f, 0x006b, 0x0000, 0x0000, 0x0000, 0x038e, 0xc80c, 0x004d, 0x0000,
2468     0x0000, 0x0000, 0xfe26, 0x8384, 0x002e, 0x0000, 0x0000, 0x0000, 0xcd90, 0xca57,
2469     0x000e, 0x0000
2470 };
2471 
2472 void MacroAssembler::libm_reduce_pi04l(Register eax, Register ecx, Register edx, Register ebx, Register esi, Register edi, Register ebp, Register esp) {
2473   Label B1_1, B1_2, B1_3, B1_4, B1_5, B1_6, B1_7, B1_8, B1_9, B1_10, B1_11, B1_12;
2474   Label B1_13, B1_14, B1_15;
2475 
2476   assert_different_registers(ebx, eax, ecx, edx, esi, edi, ebp, esp);
2477 
2478   address zero_none = (address)_zero_none;
2479   address _4onpi_d = (address)__4onpi_d;
2480   address TWO_32H = (address)_TWO_32H;
2481   address pi04_3d = (address)_pi04_3d;
2482   address pi04_5d = (address)_pi04_5d;
2483   address SCALE = (address)_SCALE;
2484   address zeros = (address)_zeros;
2485   address pi04_2d = (address)_pi04_2d;
2486   address TWO_12H = (address)_TWO_12H;
2487   address _4onpi_31l = (address)__4onpi_31l;
2488 
2489   bind(B1_1);
2490   push(ebp);
2491   movl(ebp, esp);
2492   andl(esp, -16);
2493   push(esi);
2494   push(edi);
2495   push(ebx);
2496   subl(esp, 20);
2497   movzwl(ebx, Address(ebp, 16));
2498   andl(ebx, 32767);
2499   movl(eax, Address(ebp, 20));
2500   cmpl(ebx, 16413);
2501   movl(esi, Address(ebp, 24));
2502   movl(Address(esp, 4), eax);
2503   jcc(Assembler::greaterEqual, B1_8);
2504 
2505   bind(B1_2);
2506   fld_x(Address(ebp, 8));
2507   fld_d(ExternalAddress(_4onpi_d));    //0x6dc9c883UL, 0x3ff45f30UL
2508   fmul(1);
2509   fstp_x(Address(esp, 8));
2510   movzwl(ecx, Address(esp, 16));
2511   negl(ecx);
2512   addl(ecx, 30);
2513   movl(eax, Address(esp, 12));
2514   shrl(eax);
2515   cmpl(Address(esp, 4), 0);
2516   jcc(Assembler::notEqual, B1_4);
2517 
2518   bind(B1_3);
2519   lea(ecx, Address(eax, 1));
2520   andl(ecx, -2);
2521   jmp(B1_5);
2522 
2523   bind(B1_4);
2524   movl(ecx, eax);
2525   addl(eax, Address(esp, 4));
2526   movl(edx, eax);
2527   andl(edx, 1);
2528   addl(ecx, edx);
2529 
2530   bind(B1_5);
2531   fld_d(ExternalAddress(TWO_32H));    //0x00000000UL, 0x41f80000UL
2532   cmpl(ebx, 16400);
2533   movl(Address(esp, 0), ecx);
2534   fild_s(Address(esp, 0));
2535   jcc(Assembler::greaterEqual, B1_7);
2536 
2537   bind(B1_6);
2538   fld_d(ExternalAddress(pi04_3d));    //0x54442d00UL, 0x3fe921fbUL
2539   fmul(1);
2540   fsubp(3);
2541   fxch(1);
2542   fmul(2);
2543   fld_s(2);
2544   fadd(1);
2545   fsubrp(1);
2546   fld_s(0);
2547   fxch(1);
2548   fsuba(3);
2549   fld_d(ExternalAddress(8 + pi04_3d));    //0x98cc5180UL, 0x3ce84698UL
2550   fmul(3);
2551   fsuba(2);
2552   fxch(1);
2553   fsub(2);
2554   fsubrp(1);
2555   faddp(3);
2556   fld_d(ExternalAddress(16 + pi04_3d));    //0xcbb5bf6cUL, 0xb9dfc8f8UL
2557   fmulp(2);
2558   fld_s(1);
2559   fsubr(1);
2560   fsuba(1);
2561   fxch(2);
2562   fsubp(1);
2563   faddp(2);
2564   fxch(1);
2565   jmp(B1_15);
2566 
2567   bind(B1_7);
2568   fld_d(ExternalAddress(pi04_5d));    //0x54400000UL, 0x3fe921fbUL
2569   fmul(1);
2570   fsubp(3);
2571   fxch(1);
2572   fmul(2);
2573   fld_s(2);
2574   fadd(1);
2575   fsubrp(1);
2576   fld_s(0);
2577   fxch(1);
2578   fsuba(3);
2579   fld_d(ExternalAddress(8 + pi04_5d));    //0x1a600000UL, 0x3dc0b461UL
2580   fmul(3);
2581   fsuba(2);
2582   fxch(1);
2583   fsub(2);
2584   fsubrp(1);
2585   faddp(3);
2586   fld_d(ExternalAddress(16 + pi04_5d));    //0x2e000000UL, 0x3b93198aUL
2587   fmul(2);
2588   fld_s(0);
2589   fsubr(2);
2590   fsuba(2);
2591   fxch(1);
2592   fsubp(2);
2593   fxch(1);
2594   faddp(3);
2595   fld_d(ExternalAddress(24 + pi04_5d));    //0x25200000UL, 0x396b839aUL
2596   fmul(2);
2597   fld_s(0);
2598   fsubr(2);
2599   fsuba(2);
2600   fxch(1);
2601   fsubp(2);
2602   fxch(1);
2603   faddp(3);
2604   fld_d(ExternalAddress(32 + pi04_5d));    //0x533e63a0UL, 0x37027044UL
2605   fmulp(2);
2606   fld_s(1);
2607   fsubr(1);
2608   fsuba(1);
2609   fxch(2);
2610   fsubp(1);
2611   faddp(2);
2612   fxch(1);
2613   jmp(B1_15);
2614 
2615   bind(B1_8);
2616   fld_x(Address(ebp, 8));
2617   addl(ebx, -16417);
2618   fmul_d(as_Address(ExternalAddress(SCALE)));    //0x00000000UL, 0x32600000UL
2619   movl(eax, -2078209981);
2620   imull(ebx);
2621   addl(edx, ebx);
2622   movl(ecx, ebx);
2623   sarl(edx, 4);
2624   sarl(ecx, 31);
2625   subl(edx, ecx);
2626   movl(eax, edx);
2627   shll(eax, 5);
2628   fstp_x(Address(ebp, 8));
2629   fld_x(Address(ebp, 8));
2630   subl(eax, edx);
2631   movl(Address(ebp, 8), 0);
2632   subl(ebx, eax);
2633   fld_x(Address(ebp, 8));
2634   cmpl(ebx, 17);
2635   fsuba(1);
2636   jcc(Assembler::less, B1_10);
2637 
2638   bind(B1_9);
2639   lea(eax, Address(noreg, edx, Address::times_8));
2640   lea(ecx, Address(eax, edx, Address::times_4));
2641   incl(edx);
2642   fld_x(Address(_4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
2643   fmul(2);
2644   fld_x(Address(12 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
2645   fmul(2);
2646   fld_s(0);
2647   fadd(2);
2648   fsuba(2);
2649   fxch(1);
2650   faddp(2);
2651   fld_s(1);
2652   fadd(1);
2653   fstp_x(Address(esp, 8));
2654   andl(Address(esp, 8), -16777216);
2655   fld_x(Address(esp, 8));
2656   fsubp(1);
2657   jmp(B1_11);
2658 
2659   bind(B1_10);
2660   fld_d(ExternalAddress(zeros));    //0x00000000UL, 0x00000000UL
2661   fld_s(0);
2662 
2663   bind(B1_11);
2664   fld_s(0);
2665   lea(eax, Address(noreg, edx, Address::times_8));
2666   fld_s(3);
2667   lea(edx, Address(eax, edx, Address::times_4));
2668   fld_x(Address(_4onpi_31l, RelocationHolder::none).plus_disp(edx, Address::times_1));
2669   fmul(6);
2670   movl(Address(esp, 0), edx);
2671   fadda(2);
2672   fxch(2);
2673   fsuba(3);
2674   fxch(2);
2675   faddp(3);
2676   fxch(2);
2677   faddp(3);
2678   fld_x(Address(12 + _4onpi_31l, RelocationHolder::none).plus_disp(edx, Address::times_1));
2679   fmula(2);
2680   fld_s(2);
2681   fadd(2);
2682   fld_s(0);
2683   fxch(1);
2684   fsubra(3);
2685   fxch(3);
2686   fchs();
2687   faddp(4);
2688   fxch(3);
2689   faddp(4);
2690   fxch(2);
2691   fadd(3);
2692   fxch(2);
2693   fmul(5);
2694   fadda(2);
2695   fld_s(4);
2696   fld_x(Address(24 + _4onpi_31l, RelocationHolder::none).plus_disp(edx, Address::times_1));
2697   fmula(1);
2698   fxch(1);
2699   fadda(4);
2700   fxch(4);
2701   fstp_x(Address(esp, 8));
2702   movzwl(ebx, Address(esp, 16));
2703   andl(ebx, 32767);
2704   cmpl(ebx, 16415);
2705   jcc(Assembler::greaterEqual, B1_13);
2706 
2707   bind(B1_12);
2708   negl(ebx);
2709   addl(ebx, 30);
2710   movl(ecx, ebx);
2711   movl(eax, Address(esp, 12));
2712   shrl(eax);
2713   shll(eax);
2714   movl(Address(esp, 12), eax);
2715   movl(Address(esp, 8), 0);
2716   shrl(eax);
2717   jmp(B1_14);
2718 
2719   bind(B1_13);
2720   negl(ebx);
2721   addl(ebx, 30);
2722   movl(ecx, ebx);
2723   movl(edx, Address(esp, 8));
2724   shrl(edx);
2725   shll(edx);
2726   negl(ecx);
2727   movl(eax, Address(esp, 12));
2728   shll(eax);
2729   movl(ecx, ebx);
2730   movl(Address(esp, 8), edx);
2731   shrl(edx);
2732   orl(eax, edx);
2733 
2734   bind(B1_14);
2735   fld_x(Address(esp, 8));
2736   addl(eax, Address(esp, 4));
2737   fsubp(3);
2738   fmul(6);
2739   fld_s(4);
2740   movl(edx, eax);
2741   andl(edx, 1);
2742   fadd(3);
2743   movl(ecx, Address(esp, 0));
2744   fsuba(3);
2745   fxch(3);
2746   faddp(5);
2747   fld_s(1);
2748   fxch(3);
2749   fadd_d(Address(zero_none, RelocationHolder::none).plus_disp(edx, Address::times_8));
2750   fadda(3);
2751   fsub(3);
2752   faddp(2);
2753   fxch(1);
2754   faddp(4);
2755   fld_s(2);
2756   fadd(2);
2757   fsuba(2);
2758   fxch(3);
2759   faddp(2);
2760   fxch(1);
2761   faddp(3);
2762   fld_s(0);
2763   fadd(2);
2764   fsuba(2);
2765   fxch(1);
2766   faddp(2);
2767   fxch(1);
2768   faddp(2);
2769   fld_s(2);
2770   fld_x(Address(36 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
2771   fmula(1);
2772   fld_s(1);
2773   fadd(3);
2774   fsuba(3);
2775   fxch(2);
2776   faddp(3);
2777   fxch(2);
2778   faddp(3);
2779   fxch(1);
2780   fmul(4);
2781   fld_s(0);
2782   fadd(2);
2783   fsuba(2);
2784   fxch(1);
2785   faddp(2);
2786   fxch(1);
2787   faddp(2);
2788   fld_s(2);
2789   fld_x(Address(48 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
2790   fmula(1);
2791   fld_s(1);
2792   fadd(3);
2793   fsuba(3);
2794   fxch(2);
2795   faddp(3);
2796   fxch(2);
2797   faddp(3);
2798   fld_s(3);
2799   fxch(2);
2800   fmul(5);
2801   fld_x(Address(60 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
2802   fmula(3);
2803   fxch(3);
2804   faddp(1);
2805   fld_s(0);
2806   fadd(2);
2807   fsuba(2);
2808   fxch(1);
2809   faddp(2);
2810   fxch(1);
2811   faddp(3);
2812   fld_s(3);
2813   fxch(2);
2814   fmul(5);
2815   fld_x(Address(72 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
2816   fmula(3);
2817   fxch(3);
2818   faddp(1);
2819   fld_s(0);
2820   fadd(2);
2821   fsuba(2);
2822   fxch(1);
2823   faddp(2);
2824   fxch(1);
2825   faddp(3);
2826   fxch(1);
2827   fmulp(4);
2828   fld_x(Address(84 + _4onpi_31l, RelocationHolder::none).plus_disp(ecx, Address::times_1));
2829   fmulp(3);
2830   fxch(2);
2831   faddp(3);
2832   fld_s(2);
2833   fadd(2);
2834   fld_d(ExternalAddress(TWO_32H));    //0x00000000UL, 0x41f80000UL
2835   fmul(1);
2836   fadda(1);
2837   fsubp(1);
2838   fsuba(2);
2839   fxch(3);
2840   faddp(2);
2841   faddp(1);
2842   fld_d(ExternalAddress(pi04_2d));    //0x54400000UL, 0x3fe921fbUL
2843   fld_s(0);
2844   fmul(2);
2845   fxch(2);
2846   fadd(3);
2847   fxch(1);
2848   fmulp(3);
2849   fmul_d(as_Address(ExternalAddress(8 + pi04_2d)));    //0x1a626331UL, 0x3dc0b461UL
2850   faddp(1);
2851 
2852   bind(B1_15);
2853   fld_d(ExternalAddress(TWO_12H));    //0x00000000UL, 0x40b80000UL
2854   fld_s(2);
2855   fadd(2);
2856   fmula(1);
2857   fstp_x(Address(esp, 8));
2858   fld_x(Address(esp, 8));
2859   fadd(1);
2860   fsubrp(1);
2861   fst_d(Address(esi, 0));
2862   fsubp(2);
2863   faddp(1);
2864   fstp_d(Address(esi, 8));
2865   addl(esp, 20);
2866   pop(ebx);
2867   pop(edi);
2868   pop(esi);
2869   movl(esp, ebp);
2870   pop(ebp);
2871   ret(0);
2872 }
2873 
2874 ALIGNED_(16) juint _L_2il0floatpacket_0[] =
2875 {
2876     0xffffffffUL, 0x7fffffffUL, 0x00000000UL, 0x00000000UL
2877 };
2878 
2879 ALIGNED_(16) juint _Pi4Inv[] =
2880 {
2881     0x6dc9c883UL, 0x3ff45f30UL
2882 };
2883 
2884 ALIGNED_(16) juint _Pi4x3[] =
2885 {
2886     0x54443000UL, 0xbfe921fbUL, 0x3b39a000UL, 0x3d373dcbUL, 0xe0e68948UL,
2887     0xba845c06UL
2888 };
2889 
2890 ALIGNED_(16) juint _Pi4x4[] =
2891 {
2892     0x54400000UL, 0xbfe921fbUL, 0x1a600000UL, 0xbdc0b461UL, 0x2e000000UL,
2893     0xbb93198aUL, 0x252049c1UL, 0xb96b839aUL
2894 };
2895 
2896 ALIGNED_(16) jushort _SP[] =
2897 {
2898     0xaaab, 0xaaaa, 0xaaaa, 0xaaaa, 0xbffc, 0x0000, 0x8887, 0x8888, 0x8888, 0x8888,
2899     0x3ff8, 0x0000, 0xc527, 0x0d00, 0x00d0, 0xd00d, 0xbff2, 0x0000, 0x45f6, 0xb616,
2900     0x1d2a, 0xb8ef, 0x3fec, 0x0000, 0x825b, 0x3997, 0x2b3f, 0xd732, 0xbfe5, 0x0000,
2901     0xbf33, 0x8bb4, 0x2fda, 0xb092, 0x3fde, 0x0000, 0x44a6, 0xed1a, 0x29ef, 0xd73e,
2902     0xbfd6, 0x0000, 0x8610, 0x307f, 0x62a1, 0xc921, 0x3fce, 0x0000
2903 };
2904 
2905 ALIGNED_(16) jushort _CP[] =
2906 {
2907     0x0000, 0x0000, 0x0000, 0x8000, 0xbffe, 0x0000, 0xaaa5, 0xaaaa, 0xaaaa, 0xaaaa,
2908     0x3ffa, 0x0000, 0x9c2f, 0x0b60, 0x60b6, 0xb60b, 0xbff5, 0x0000, 0xf024, 0x0cac,
2909     0x00d0, 0xd00d, 0x3fef, 0x0000, 0x03fe, 0x3f65, 0x7dbb, 0x93f2, 0xbfe9, 0x0000,
2910     0xd84d, 0xadee, 0xc698, 0x8f76, 0x3fe2, 0x0000, 0xdaba, 0xfe79, 0xea36, 0xc9c9,
2911     0xbfda, 0x0000, 0x3ac6, 0x0ba0, 0x07ce, 0xd585, 0x3fd2, 0x0000
2912 };
2913 
2914 ALIGNED_(16) juint _ones[] =
2915 {
2916     0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xbff00000UL
2917 };
2918 
2919 void MacroAssembler::libm_sincos_huge(XMMRegister xmm0, XMMRegister xmm1, Register eax, Register ecx, Register edx, Register ebx, Register esi, Register edi, Register ebp, Register esp) {
2920   Label B1_1, B1_2, B1_3, B1_4, B1_5, B1_6, B1_7, B1_8, B1_9, B1_10, B1_11, B1_12;
2921   Label B1_13, B1_14, B1_15, B1_16, B1_17, B1_18, B1_19, B1_20, B1_21, B1_22, B1_23;
2922   Label B1_24, B1_25, B1_26, B1_27, B1_28, B1_29, B1_30, B1_31, B1_32, B1_33, B1_34;
2923   Label B1_35, B1_36, B1_37, B1_38, B1_39, B1_40, B1_41, B1_42, B1_43, B1_44, B1_45, B1_46;
2924 
2925   assert_different_registers(ebx, eax, ecx, edx, esi, edi, ebp, esp);
2926 
2927   address L_2il0floatpacket_0 = (address)_L_2il0floatpacket_0;
2928   address Pi4Inv = (address)_Pi4Inv;
2929   address Pi4x3 = (address)_Pi4x3;
2930   address Pi4x4 = (address)_Pi4x4;
2931   address ones = (address)_ones;
2932   address CP = (address)_CP;
2933   address SP = (address)_SP;
2934 
2935   bind(B1_1);
2936   push(ebp);
2937   movl(ebp, esp);
2938   andl(esp, -64);
2939   push(esi);
2940   push(edi);
2941   push(ebx);
2942   subl(esp, 52);
2943   movl(eax, Address(ebp, 16));
2944   movl(edx, Address(ebp, 20));
2945   movl(Address(esp, 32), eax);
2946   movl(Address(esp, 36), edx);
2947 
2948   bind(B1_2);
2949   fnstcw(Address(esp, 30));
2950 
2951   bind(B1_3);
2952   movsd(xmm1, Address(ebp, 8));
2953   movl(esi, Address(ebp, 12));
2954   movl(eax, esi);
2955   andl(eax, 2147483647);
2956   andps(xmm1, ExternalAddress(L_2il0floatpacket_0));    //0xffffffffUL, 0x7fffffffUL, 0x00000000UL, 0x00000000UL
2957   shrl(esi, 31);
2958   movl(Address(esp, 40), eax);
2959   cmpl(eax, 1104150528);
2960   movsd(Address(ebp, 8), xmm1);
2961   jcc(Assembler::aboveEqual, B1_11);
2962 
2963   bind(B1_4);
2964   movsd(xmm0, ExternalAddress(Pi4Inv));    //0x6dc9c883UL, 0x3ff45f30UL
2965   mulsd(xmm0, xmm1);
2966   movzwl(edx, Address(esp, 30));
2967   movl(eax, edx);
2968   andl(eax, 768);
2969   movsd(Address(esp, 0), xmm0);
2970   cmpl(eax, 768);
2971   jcc(Assembler::equal, B1_42);
2972 
2973   bind(B1_5);
2974   orl(edx, -64768);
2975   movw(Address(esp, 28), edx);
2976 
2977   bind(B1_6);
2978   fldcw(Address(esp, 28));
2979 
2980   bind(B1_7);
2981   movsd(xmm1, Address(ebp, 8));
2982   movl(ebx, 1);
2983 
2984   bind(B1_8);
2985   movl(Address(esp, 12), ebx);
2986   movl(ebx, Address(esp, 4));
2987   movl(eax, ebx);
2988   movl(Address(esp, 8), esi);
2989   movl(esi, ebx);
2990   shrl(esi, 20);
2991   andl(eax, 1048575);
2992   movl(ecx, esi);
2993   orl(eax, 1048576);
2994   negl(ecx);
2995   movl(edx, eax);
2996   addl(ecx, 19);
2997   addl(esi, 13);
2998   movl(Address(esp, 24), ecx);
2999   shrl(edx);
3000   movl(ecx, esi);
3001   shll(eax);
3002   movl(ecx, Address(esp, 24));
3003   movl(esi, Address(esp, 0));
3004   shrl(esi);
3005   orl(eax, esi);
3006   cmpl(ebx, 1094713344);
3007   movsd(Address(esp, 16), xmm1);
3008   fld_d(Address(esp, 16));
3009   cmov32(Assembler::below, eax, edx);
3010   movl(esi, Address(esp, 8));
3011   lea(edx, Address(eax, 1));
3012   movl(ebx, edx);
3013   andl(ebx, -2);
3014   movl(Address(esp, 16), ebx);
3015   fild_s(Address(esp, 16));
3016   movl(ebx, Address(esp, 12));
3017   cmpl(Address(esp, 40), 1094713344);
3018   jcc(Assembler::aboveEqual, B1_10);
3019 
3020   bind(B1_9);
3021   fld_d(ExternalAddress(Pi4x3));    //0x54443000UL, 0xbfe921fbUL
3022   fmul(1);
3023   faddp(2);
3024   fld_d(ExternalAddress(8 + Pi4x3));    //0x3b39a000UL, 0x3d373dcbUL
3025   fmul(1);
3026   faddp(2);
3027   fld_d(ExternalAddress(16 + Pi4x3));    //0xe0e68948UL, 0xba845c06UL
3028   fmulp(1);
3029   faddp(1);
3030   jmp(B1_17);
3031 
3032   bind(B1_10);
3033   fld_d(ExternalAddress(Pi4x4));    //0x54400000UL, 0xbfe921fbUL
3034   fmul(1);
3035   faddp(2);
3036   fld_d(ExternalAddress(8 + Pi4x4));    //0x1a600000UL, 0xbdc0b461UL
3037   fmul(1);
3038   faddp(2);
3039   fld_d(ExternalAddress(16 + Pi4x4));    //0x2e000000UL, 0xbb93198aUL
3040   fmul(1);
3041   faddp(2);
3042   fld_d(ExternalAddress(24 + Pi4x4));    //0x252049c1UL, 0xb96b839aUL
3043   fmulp(1);
3044   faddp(1);
3045   jmp(B1_17);
3046 
3047   bind(B1_11);
3048   movzwl(edx, Address(esp, 30));
3049   movl(eax, edx);
3050   andl(eax, 768);
3051   cmpl(eax, 768);
3052   jcc(Assembler::equal, B1_43);
3053   bind(B1_12);
3054   orl(edx, -64768);
3055   movw(Address(esp, 28), edx);
3056 
3057   bind(B1_13);
3058   fldcw(Address(esp, 28));
3059 
3060   bind(B1_14);
3061   movsd(xmm1, Address(ebp, 8));
3062   movl(ebx, 1);
3063 
3064   bind(B1_15);
3065   movsd(Address(esp, 16), xmm1);
3066   fld_d(Address(esp, 16));
3067   addl(esp, -32);
3068   lea(eax, Address(esp, 32));
3069   fstp_x(Address(esp, 0));
3070   movl(Address(esp, 12), 0);
3071   movl(Address(esp, 16), eax);
3072   call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlibm_reduce_pi04l())));
3073 
3074   bind(B1_46);
3075   addl(esp, 32);
3076 
3077   bind(B1_16);
3078   fld_d(Address(esp, 0));
3079   lea(edx, Address(eax, 1));
3080   fld_d(Address(esp, 8));
3081   faddp(1);
3082 
3083   bind(B1_17);
3084   movl(ecx, edx);
3085   addl(eax, 3);
3086   shrl(ecx, 2);
3087   andl(ecx, 1);
3088   shrl(eax, 2);
3089   xorl(esi, ecx);
3090   movl(ecx, Address(esp, 36));
3091   andl(eax, 1);
3092   andl(ecx, 3);
3093   cmpl(ecx, 3);
3094   jcc(Assembler::notEqual, B1_25);
3095 
3096   bind(B1_18);
3097   fld_x(ExternalAddress(84 + SP));    //0x8610, 0x307f, 0x62
3098   fld_s(1);
3099   fmul((2));
3100   testb(edx, 2);
3101   fmula((1));
3102   fld_x(ExternalAddress(72 + SP));    //0x44a6, 0xed1a, 0x29
3103   faddp(2);
3104   fmula(1);
3105   fld_x(ExternalAddress(60 + SP));    //0xbf33, 0x8bb4, 0x2f
3106   faddp(2);
3107   fmula(1);
3108   fld_x(ExternalAddress(48 + SP));    //0x825b, 0x3997, 0x2b
3109   faddp(2);
3110   fmula(1);
3111   fld_x(ExternalAddress(36 + SP));    //0x45f6, 0xb616, 0x1d
3112   faddp(2);
3113   fmula(1);
3114   fld_x(ExternalAddress(24 + SP));    //0xc527, 0x0d00, 0x00
3115   faddp(2);
3116   fmula(1);
3117   fld_x(ExternalAddress(12 + SP));    //0x8887, 0x8888, 0x88
3118   faddp(2);
3119   fmula(1);
3120   fld_x(ExternalAddress(SP));    //0xaaab, 0xaaaa, 0xaa
3121   faddp(2);
3122   fmula(1);
3123   fld_x(ExternalAddress(84 + CP));    //0x3ac6, 0x0ba0, 0x07
3124   fmul(1);
3125   fld_x(ExternalAddress(72 + CP));    //0xdaba, 0xfe79, 0xea
3126   faddp(1);
3127   fmul(1);
3128   fld_x(ExternalAddress(62 + CP));    //0xd84d, 0xadee, 0xc6
3129   faddp(1);
3130   fmul(1);
3131   fld_x(ExternalAddress(48 + CP));    //0x03fe, 0x3f65, 0x7d
3132   faddp(1);
3133   fmul(1);
3134   fld_x(ExternalAddress(36 + CP));    //0xf024, 0x0cac, 0x00
3135   faddp(1);
3136   fmul(1);
3137   fld_x(ExternalAddress(24 + CP));    //0x9c2f, 0x0b60, 0x60
3138   faddp(1);
3139   fmul(1);
3140   fld_x(ExternalAddress(12 + CP));    //0xaaa5, 0xaaaa, 0xaa
3141   faddp(1);
3142   fmul(1);
3143   fld_x(ExternalAddress(CP));    //0x0000, 0x0000, 0x00
3144   faddp(1);
3145   fmulp(1);
3146   fld_d(Address(ones, RelocationHolder::none).plus_disp(esi, Address::times_8));
3147   fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
3148   jcc(Assembler::equal, B1_22);
3149 
3150   bind(B1_19);
3151   fmulp(4);
3152   testl(ebx, ebx);
3153   fxch(2);
3154   fmul(3);
3155   movl(eax, Address(esp, 2));
3156   faddp(3);
3157   fxch(2);
3158   fstp_d(Address(eax, 0));
3159   fmula(1);
3160   faddp(1);
3161   fstp_d(Address(eax, 8));
3162   jcc(Assembler::equal, B1_21);
3163 
3164   bind(B1_20);
3165   fldcw(Address(esp, 30));
3166 
3167   bind(B1_21);
3168   addl(esp, 52);
3169   pop(ebx);
3170   pop(edi);
3171   pop(esi);
3172   movl(esp, ebp);
3173   pop(ebp);
3174   ret(0);
3175 
3176   bind(B1_22);
3177   fxch(1);
3178   fmulp(4);
3179   testl(ebx, ebx);
3180   fxch(2);
3181   fmul(3);
3182   movl(eax, Address(esp, 32));
3183   faddp(3);
3184   fxch(2);
3185   fstp_d(Address(eax, 8));
3186   fmula(1);
3187   faddp(1);
3188   fstp_d(Address(eax, 0));
3189   jcc(Assembler::equal, B1_24);
3190 
3191   bind(B1_23);
3192   fldcw(Address(esp, 30));
3193 
3194   bind(B1_24);
3195   addl(esp, 52);
3196   pop(ebx);
3197   pop(edi);
3198   pop(esi);
3199   movl(esp, ebp);
3200   pop(ebp);
3201   ret(0);
3202 
3203   bind(B1_25);
3204   testb(Address(esp, 36), 2);
3205   jcc(Assembler::equal, B1_33);
3206 
3207   bind(B1_26);
3208   fld_s(0);
3209   testb(edx, 2);
3210   fmul(1);
3211   fld_s(0);
3212   fmul(1);
3213   jcc(Assembler::equal, B1_30);
3214 
3215   bind(B1_27);
3216   fstp_d(2);
3217   fld_x(ExternalAddress(84 + CP));    //0x3ac6, 0x0ba0, 0x07
3218   testl(ebx, ebx);
3219   fmul(2);
3220   fld_x(ExternalAddress(72 + CP));    //0xdaba, 0xfe79, 0xea
3221   fmul(3);
3222   fld_x(ExternalAddress(60 + CP));    //0xd84d, 0xadee, 0xc6
3223   movl(eax, Address(rsp, 32));
3224   faddp(2);
3225   fxch(1);
3226   fmul(3);
3227   fld_x(ExternalAddress(48 + CP));    //0x03fe, 0x3f65, 0x7d
3228   faddp(2);
3229   fxch(1);
3230   fmul(3);
3231   fld_x(ExternalAddress(36 + CP));    //0xf024, 0x0cac, 0x00
3232   faddp(2);
3233   fxch(1);
3234   fmul(3);
3235   fld_x(ExternalAddress(24 + CP));    //0x9c2f, 0x0b60, 0x60
3236   faddp(2);
3237   fxch(1);
3238   fmul(3);
3239   fld_x(ExternalAddress(12 + CP));    //0xaaa5, 0xaaaa, 0xaa
3240   faddp(2);
3241   fxch(1);
3242   fmulp(3);
3243   fld_x(ExternalAddress(CP));    //0x0000, 0x0000, 0x00
3244   faddp(1);
3245   fmulp(1);
3246   faddp(1);
3247   fld_d(Address(ones, RelocationHolder::none).plus_disp(rsi, Address::times_8));
3248   fmula(1);
3249   faddp(1);
3250   fstp_d(Address(eax, 8));
3251   jcc(Assembler::equal, B1_29);
3252 
3253   bind(B1_28);
3254   fldcw(Address(esp, 30));
3255 
3256   bind(B1_29);
3257   addl(esp, 52);
3258   pop(ebx);
3259   pop(edi);
3260   pop(esi);
3261   movl(esp, ebp);
3262   pop(ebp);
3263   ret(0);
3264 
3265   bind(B1_30);
3266   fld_x(ExternalAddress(84 + SP));    //0x8610, 0x307f, 0x62
3267   testl(ebx, ebx);
3268   fmul(1);
3269   fld_x(ExternalAddress(72 + SP));    //0x44a6, 0xed1a, 0x29
3270   fmul(2);
3271   fld_x(ExternalAddress(60 + SP));    //0xbf33, 0x8bb4, 0x2f
3272   movl(eax, Address(rsp, 32));
3273   faddp(2);
3274   fxch(1);
3275   fmul(2);
3276   fld_x(ExternalAddress(48 + SP));    //0x825b, 0x3997, 0x2b
3277   faddp(2);
3278   fxch(1);
3279   fmul(2);
3280   fld_x(ExternalAddress(36 + SP));    //0x45f6, 0xb616, 0x1d
3281   faddp(2);
3282   fxch(1);
3283   fmul(2);
3284   fld_x(ExternalAddress(24 + SP));    //0xc527, 0x0d00, 0x00
3285   faddp(2);
3286   fxch(1);
3287   fmul(2);
3288   fld_x(ExternalAddress(12 + SP));    //0x8887, 0x8888, 0x88
3289   faddp(2);
3290   fxch(1);
3291   fmulp(2);
3292   fld_x(ExternalAddress(SP));    //0xaaab, 0xaaaa, 0xaa
3293   faddp(1);
3294   fmulp(2);
3295   faddp(1);
3296   fld_d(Address(ones, RelocationHolder::none).plus_disp(rsi, Address::times_8));
3297   fmulp(2);
3298   fmul(1);
3299   faddp(1);
3300   fstp_d(Address(eax, 8));
3301   jcc(Assembler::equal, B1_32);
3302 
3303   bind(B1_31);
3304   fldcw(Address(esp, 30));
3305 
3306   bind(B1_32);
3307   addl(esp, 52);
3308   pop(ebx);
3309   pop(edi);
3310   pop(esi);
3311   movl(esp, ebp);
3312   pop(ebp);
3313   ret(0);
3314 
3315   bind(B1_33);
3316   testb(Address(esp, 36), 1);
3317   jcc(Assembler::equal, B1_41);
3318 
3319   bind(B1_34);
3320   fld_s(0);
3321   testb(edx, 2);
3322   fmul(1);
3323   fld_s(0);
3324   fmul(1);
3325   jcc(Assembler::equal, B1_38);
3326 
3327   bind(B1_35);
3328   fld_x(ExternalAddress(84 + SP));    //0x8610, 0x307f, 0x62
3329   testl(ebx, ebx);
3330   fmul(1);
3331   fld_x(ExternalAddress(72 + SP));    //0x44a6, 0xed1a, 0x29
3332   fmul(2);
3333   fld_x(ExternalAddress(60 + SP));    //0xbf33, 0x8bb4, 0x2f
3334   faddp(2);
3335   fxch(1);
3336   fmul(2);
3337   fld_x(ExternalAddress(48 + SP));    //0x825b, 0x3997, 0x2b
3338   faddp(2);
3339   fxch(1);
3340   fmul(2);
3341   fld_x(ExternalAddress(36 + SP));    //0x45f6, 0xb616, 0x1d
3342   faddp(2);
3343   fxch(1);
3344   fmul(2);
3345   fld_x(ExternalAddress(24 + SP));    //0xc527, 0x0d00, 0x00
3346   faddp(2);
3347   fxch(1);
3348   fmul(2);
3349   fld_x(ExternalAddress(12 + SP));    //0x8887, 0x8888, 0x88
3350   faddp(2);
3351   fxch(1);
3352   fmulp(2);
3353   fld_x(ExternalAddress(SP));    //0xaaab, 0xaaaa, 0xaa
3354   faddp(1);
3355   fmulp(2);
3356   faddp(1);
3357   fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
3358   fmulp(2);
3359   fmul(1);
3360   movl(eax, Address(esp, 32));
3361   faddp(1);
3362   fstp_d(Address(eax, 0));
3363   jcc(Assembler::equal, B1_37);
3364 
3365   bind(B1_36);
3366   fldcw(Address(esp, 30));
3367 
3368   bind(B1_37);
3369   addl(esp, 52);
3370   pop(ebx);
3371   pop(edi);
3372   pop(esi);
3373   movl(esp, ebp);
3374   pop(ebp);
3375   ret(0);
3376 
3377   bind(B1_38);
3378   fstp_d(2);
3379   fld_x(ExternalAddress(84 + CP));    //0x3ac6, 0x0ba0, 0x07
3380   testl(ebx, ebx);
3381   fmul(2);
3382   fld_x(ExternalAddress(72 + CP));    //0xdaba, 0xfe79, 0xea
3383   fmul(3);
3384   fld_x(ExternalAddress(60 + CP));    //0xd84d, 0xadee, 0xc6
3385   faddp(2);
3386   fxch(1);
3387   fmul(3);
3388   fld_x(ExternalAddress(48 + CP));    //0x03fe, 0x3f65, 0x7d
3389   faddp(2);
3390   fxch(1);
3391   fmul(3);
3392   fld_x(ExternalAddress(36 + CP));    //0xf024, 0x0cac, 0x00
3393   faddp(2);
3394   fxch(1);
3395   fmul(3);
3396   fld_x(ExternalAddress(24 + CP));    //0x9c2f, 0x0b60, 0x60
3397   faddp(2);
3398   fxch(1);
3399   fmul(3);
3400   fld_x(ExternalAddress(12 + CP));    //0xaaa5, 0xaaaa, 0xaa
3401   faddp(2);
3402   fxch(1);
3403   fmulp(3);
3404   fld_x(ExternalAddress(CP));    //0x0000, 0x0000, 0x00
3405   faddp(1);
3406   fmulp(1);
3407   faddp(1);
3408   fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
3409   fmula(1);
3410   movl(eax, Address(esp, 32));
3411   faddp(1);
3412   fstp_d(Address(eax, 0));
3413   jcc(Assembler::equal, B1_40);
3414 
3415   bind(B1_39);
3416   fldcw(Address(esp, 30));
3417   bind(B1_40);
3418   addl(esp, 52);
3419   pop(ebx);
3420   pop(edi);
3421   pop(esi);
3422   movl(esp, ebp);
3423   pop(ebp);
3424   ret(0);
3425   bind(B1_41);
3426   fstp_d(0);
3427   addl(esp, 52);
3428   pop(ebx);
3429   pop(edi);
3430   pop(esi);
3431   movl(esp, ebp);
3432   pop(ebp);
3433   ret(0);
3434   bind(B1_42);
3435   xorl(ebx, ebx);
3436   jmp(B1_8);
3437   bind(B1_43);
3438   xorl(ebx, ebx);
3439   jmp(B1_15);
3440 }
3441 
3442 ALIGNED_(16) juint _static_const_table_sin[] =
3443 {
3444     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
3445     0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL, 0xbf73b92eUL,
3446     0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
3447     0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL,
3448     0xc0000000UL, 0xbc626d19UL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL,
3449     0xbfa60beaUL, 0x2ed59f06UL, 0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL,
3450     0x00000000UL, 0x3ff00000UL, 0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL,
3451     0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL, 0x00000000UL, 0x3ff00000UL,
3452     0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL, 0x20000000UL,
3453     0x3c5e0d89UL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL, 0xbfc59267UL,
3454     0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
3455     0x3ff00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL,
3456     0x20000000UL, 0x3c68076aUL, 0x00000000UL, 0x3ff00000UL, 0x99fcef32UL,
3457     0x3fca8279UL, 0x667f3bcdUL, 0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL,
3458     0x00000000UL, 0x3fe00000UL, 0x94247758UL, 0x3fc133ccUL, 0x6b151741UL,
3459     0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL, 0x00000000UL, 0x3fe00000UL,
3460     0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL, 0xe0000000UL,
3461     0x3c39f630UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL, 0xbf9d4a2cUL,
3462     0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
3463     0x3fe00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0x3fed906bUL,
3464     0x20000000UL, 0x3c7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x76acf82dUL,
3465     0x3fa4a031UL, 0x56c62ddaUL, 0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL,
3466     0x00000000UL, 0x3fd00000UL, 0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL,
3467     0x3fef6297UL, 0x20000000UL, 0x3c756217UL, 0x00000000UL, 0x3fd00000UL,
3468     0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL, 0x3fefd88dUL, 0x40000000UL,
3469     0xbc887df6UL, 0x00000000UL, 0x3fc00000UL, 0x00000000UL, 0x00000000UL,
3470     0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
3471     0x00000000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0x3fefd88dUL,
3472     0x40000000UL, 0xbc887df6UL, 0x00000000UL, 0xbfc00000UL, 0x0e5967d5UL,
3473     0x3fac1d1fUL, 0xcff75cb0UL, 0x3fef6297UL, 0x20000000UL, 0x3c756217UL,
3474     0x00000000UL, 0xbfd00000UL, 0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL,
3475     0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL, 0x00000000UL, 0xbfd00000UL,
3476     0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL, 0x3fed906bUL, 0x20000000UL,
3477     0x3c7457e6UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL, 0x3f9d4a2cUL,
3478     0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
3479     0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL,
3480     0xe0000000UL, 0x3c39f630UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL,
3481     0xbfc133ccUL, 0x6b151741UL, 0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL,
3482     0x00000000UL, 0xbfe00000UL, 0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL,
3483     0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL, 0x00000000UL, 0xbfe00000UL,
3484     0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL, 0x20000000UL,
3485     0x3c68076aUL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL, 0x3fc59267UL,
3486     0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
3487     0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL,
3488     0x20000000UL, 0x3c5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL,
3489     0x3fb37ca1UL, 0xa6aea963UL, 0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL,
3490     0x00000000UL, 0xbff00000UL, 0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL,
3491     0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL, 0x00000000UL, 0xbff00000UL,
3492     0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL, 0xc0000000UL,
3493     0xbc626d19UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL, 0x3f73b92eUL,
3494     0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
3495     0xbff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
3496     0x00000000UL, 0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL,
3497     0x3f73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
3498     0x00000000UL, 0xbff00000UL, 0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL,
3499     0xbfc8f8b8UL, 0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0xbff00000UL,
3500     0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL,
3501     0x3c75d28dUL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL, 0x3fb37ca1UL,
3502     0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL, 0x3c672cedUL, 0x00000000UL,
3503     0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0xbfde2b5dUL,
3504     0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL,
3505     0x3fc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
3506     0x00000000UL, 0xbff00000UL, 0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL,
3507     0xbfe44cf3UL, 0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0xbff00000UL,
3508     0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL,
3509     0x3c8bdd34UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL, 0xbfc133ccUL,
3510     0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL, 0x3c82c5e1UL, 0x00000000UL,
3511     0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0xbfea9b66UL,
3512     0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL,
3513     0x3f9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
3514     0x00000000UL, 0xbfe00000UL, 0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL,
3515     0xbfed906bUL, 0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0xbfe00000UL,
3516     0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL,
3517     0xbc8760b1UL, 0x00000000UL, 0xbfd00000UL, 0x0e5967d5UL, 0x3fac1d1fUL,
3518     0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL, 0xbc756217UL, 0x00000000UL,
3519     0xbfd00000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0xbfefd88dUL,
3520     0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0xbfc00000UL, 0x00000000UL,
3521     0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x00000000UL, 0x00000000UL,
3522     0x00000000UL, 0x00000000UL, 0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL,
3523     0xbfefd88dUL, 0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0x3fc00000UL,
3524     0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL,
3525     0xbc756217UL, 0x00000000UL, 0x3fd00000UL, 0x76acf82dUL, 0x3fa4a031UL,
3526     0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL, 0xbc8760b1UL, 0x00000000UL,
3527     0x3fd00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0xbfed906bUL,
3528     0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL,
3529     0xbf9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
3530     0x00000000UL, 0x3fe00000UL, 0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL,
3531     0xbfea9b66UL, 0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0x3fe00000UL,
3532     0x94247758UL, 0x3fc133ccUL, 0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL,
3533     0x3c82c5e1UL, 0x00000000UL, 0x3fe00000UL, 0x99fcef32UL, 0x3fca8279UL,
3534     0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL, 0x3c8bdd34UL, 0x00000000UL,
3535     0x3fe00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0xbfe44cf3UL,
3536     0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL,
3537     0xbfc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
3538     0x00000000UL, 0x3ff00000UL, 0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL,
3539     0xbfde2b5dUL, 0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0x3ff00000UL,
3540     0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL,
3541     0x3c672cedUL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL, 0xbfa60beaUL,
3542     0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL, 0x3c75d28dUL, 0x00000000UL,
3543     0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0xbfc8f8b8UL,
3544     0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL,
3545     0xbf73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
3546     0x00000000UL, 0x3ff00000UL, 0x55555555UL, 0xbfc55555UL, 0x00000000UL,
3547     0xbfe00000UL, 0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL,
3548     0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL, 0xa556c734UL,
3549     0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL, 0x1a600000UL, 0x3d90b461UL,
3550     0x1a600000UL, 0x3d90b461UL, 0x54400000UL, 0x3fb921fbUL, 0x00000000UL,
3551     0x00000000UL, 0x2e037073UL, 0x3b63198aUL, 0x00000000UL, 0x00000000UL,
3552     0x6dc9c883UL, 0x40245f30UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
3553     0x43380000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x43600000UL,
3554     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x3c800000UL, 0x00000000UL,
3555     0x00000000UL, 0xffffffffUL, 0x3fefffffUL, 0x00000000UL, 0x00000000UL,
3556     0x00000000UL, 0x80000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
3557     0x80000000UL, 0x00000000UL, 0x80000000UL, 0x00000000UL, 0x3fe00000UL,
3558     0x00000000UL, 0x3fe00000UL
3559 };
3560 
3561 void MacroAssembler::fast_sin(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ebx, Register edx) {
3562 
3563   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;
3564   Label L_2TAG_PACKET_4_0_2, start;
3565   assert_different_registers(eax, ebx, edx);
3566   address static_const_table_sin = (address)_static_const_table_sin;
3567 
3568   bind(start);
3569   subl(rsp, 120);
3570   movl(Address(rsp, 56), ebx);
3571   lea(ebx, ExternalAddress(static_const_table_sin));
3572   movsd(xmm0, Address(rsp, 128));
3573   pextrw(eax, xmm0, 3);
3574   andl(eax, 32767);
3575   subl(eax, 12336);
3576   cmpl(eax, 4293);
3577   jcc(Assembler::above, L_2TAG_PACKET_0_0_2);
3578   movsd(xmm1, Address(ebx, 2160));
3579   mulsd(xmm1, xmm0);
3580   movsd(xmm5, Address(ebx, 2272));
3581   movdqu(xmm4, Address(ebx, 2256));
3582   pand(xmm4, xmm0);
3583   por(xmm5, xmm4);
3584   movsd(xmm3, Address(ebx, 2128));
3585   movdqu(xmm2, Address(ebx, 2112));
3586   addpd(xmm1, xmm5);
3587   cvttsd2sil(edx, xmm1);
3588   cvtsi2sdl(xmm1, edx);
3589   mulsd(xmm3, xmm1);
3590   unpcklpd(xmm1, xmm1);
3591   addl(edx, 1865216);
3592   movdqu(xmm4, xmm0);
3593   andl(edx, 63);
3594   movdqu(xmm5, Address(ebx, 2096));
3595   lea(eax, Address(ebx, 0));
3596   shll(edx, 5);
3597   addl(eax, edx);
3598   mulpd(xmm2, xmm1);
3599   subsd(xmm0, xmm3);
3600   mulsd(xmm1, Address(ebx, 2144));
3601   subsd(xmm4, xmm3);
3602   movsd(xmm7, Address(eax, 8));
3603   unpcklpd(xmm0, xmm0);
3604   movapd(xmm3, xmm4);
3605   subsd(xmm4, xmm2);
3606   mulpd(xmm5, xmm0);
3607   subpd(xmm0, xmm2);
3608   movdqu(xmm6, Address(ebx, 2064));
3609   mulsd(xmm7, xmm4);
3610   subsd(xmm3, xmm4);
3611   mulpd(xmm5, xmm0);
3612   mulpd(xmm0, xmm0);
3613   subsd(xmm3, xmm2);
3614   movdqu(xmm2, Address(eax, 0));
3615   subsd(xmm1, xmm3);
3616   movsd(xmm3, Address(eax, 24));
3617   addsd(xmm2, xmm3);
3618   subsd(xmm7, xmm2);
3619   mulsd(xmm2, xmm4);
3620   mulpd(xmm6, xmm0);
3621   mulsd(xmm3, xmm4);
3622   mulpd(xmm2, xmm0);
3623   mulpd(xmm0, xmm0);
3624   addpd(xmm5, Address(ebx, 2080));
3625   mulsd(xmm4, Address(eax, 0));
3626   addpd(xmm6, Address(ebx, 2048));
3627   mulpd(xmm5, xmm0);
3628   movapd(xmm0, xmm3);
3629   addsd(xmm3, Address(eax, 8));
3630   mulpd(xmm1, xmm7);
3631   movapd(xmm7, xmm4);
3632   addsd(xmm4, xmm3);
3633   addpd(xmm6, xmm5);
3634   movsd(xmm5, Address(eax, 8));
3635   subsd(xmm5, xmm3);
3636   subsd(xmm3, xmm4);
3637   addsd(xmm1, Address(eax, 16));
3638   mulpd(xmm6, xmm2);
3639   addsd(xmm5, xmm0);
3640   addsd(xmm3, xmm7);
3641   addsd(xmm1, xmm5);
3642   addsd(xmm1, xmm3);
3643   addsd(xmm1, xmm6);
3644   unpckhpd(xmm6, xmm6);
3645   addsd(xmm1, xmm6);
3646   addsd(xmm4, xmm1);
3647   movsd(Address(rsp, 0), xmm4);
3648   fld_d(Address(rsp, 0));
3649   jmp(L_2TAG_PACKET_1_0_2);
3650 
3651   bind(L_2TAG_PACKET_0_0_2);
3652   jcc(Assembler::greater, L_2TAG_PACKET_2_0_2);
3653   shrl(eax, 4);
3654   cmpl(eax, 268434685);
3655   jcc(Assembler::notEqual, L_2TAG_PACKET_3_0_2);
3656   movsd(Address(rsp, 0), xmm0);
3657   fld_d(Address(rsp, 0));
3658   jmp(L_2TAG_PACKET_1_0_2);
3659 
3660   bind(L_2TAG_PACKET_3_0_2);
3661   movsd(xmm3, Address(ebx, 2192));
3662   mulsd(xmm3, xmm0);
3663   subsd(xmm3, xmm0);
3664   mulsd(xmm3, Address(ebx, 2208));
3665   movsd(Address(rsp, 0), xmm0);
3666   fld_d(Address(rsp, 0));
3667   jmp(L_2TAG_PACKET_1_0_2);
3668 
3669   bind(L_2TAG_PACKET_2_0_2);
3670   movl(eax, Address(rsp, 132));
3671   andl(eax, 2146435072);
3672   cmpl(eax, 2146435072);
3673   jcc(Assembler::equal, L_2TAG_PACKET_4_0_2);
3674   subl(rsp, 32);
3675   movsd(Address(rsp, 0), xmm0);
3676   lea(eax, Address(rsp, 40));
3677   movl(Address(rsp, 8), eax);
3678   movl(eax, 2);
3679   movl(Address(rsp, 12), eax);
3680   call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlibm_sin_cos_huge())));
3681   addl(rsp, 32);
3682   fld_d(Address(rsp, 16));
3683   jmp(L_2TAG_PACKET_1_0_2);
3684   bind(L_2TAG_PACKET_4_0_2);
3685   fld_d(Address(rsp, 128));
3686   fmul_d(Address(ebx, 2240));
3687   bind(L_2TAG_PACKET_1_0_2);
3688   movl(ebx, Address(rsp, 56));
3689 }
3690 
3691 #endif
3692 
3693 /******************************************************************************/
3694 //                     ALGORITHM DESCRIPTION - COS()
3695 //                     ---------------------
3696 //
3697 //     1. RANGE REDUCTION
3698 //
3699 //     We perform an initial range reduction from X to r with
3700 //
3701 //          X =~= N * pi/32 + r
3702 //
3703 //     so that |r| <= pi/64 + epsilon. We restrict inputs to those
3704 //     where |N| <= 932560. Beyond this, the range reduction is
3705 //     insufficiently accurate. For extremely small inputs,
3706 //     denormalization can occur internally, impacting performance.
3707 //     This means that the main path is actually only taken for
3708 //     2^-252 <= |X| < 90112.
3709 //
3710 //     To avoid branches, we perform the range reduction to full
3711 //     accuracy each time.
3712 //
3713 //          X - N * (P_1 + P_2 + P_3)
3714 //
3715 //     where P_1 and P_2 are 32-bit numbers (so multiplication by N
3716 //     is exact) and P_3 is a 53-bit number. Together, these
3717 //     approximate pi well enough for all cases in the restricted
3718 //     range.
3719 //
3720 //     The main reduction sequence is:
3721 //
3722 //             y = 32/pi * x
3723 //             N = integer(y)
3724 //     (computed by adding and subtracting off SHIFTER)
3725 //
3726 //             m_1 = N * P_1
3727 //             m_2 = N * P_2
3728 //             r_1 = x - m_1
3729 //             r = r_1 - m_2
3730 //     (this r can be used for most of the calculation)
3731 //
3732 //             c_1 = r_1 - r
3733 //             m_3 = N * P_3
3734 //             c_2 = c_1 - m_2
3735 //             c = c_2 - m_3
3736 //
3737 //     2. MAIN ALGORITHM
3738 //
3739 //     The algorithm uses a table lookup based on B = M * pi / 32
3740 //     where M = N mod 64. The stored values are:
3741 //       sigma             closest power of 2 to cos(B)
3742 //       C_hl              53-bit cos(B) - sigma
3743 //       S_hi + S_lo       2 * 53-bit sin(B)
3744 //
3745 //     The computation is organized as follows:
3746 //
3747 //          sin(B + r + c) = [sin(B) + sigma * r] +
3748 //                           r * (cos(B) - sigma) +
3749 //                           sin(B) * [cos(r + c) - 1] +
3750 //                           cos(B) * [sin(r + c) - r]
3751 //
3752 //     which is approximately:
3753 //
3754 //          [S_hi + sigma * r] +
3755 //          C_hl * r +
3756 //          S_lo + S_hi * [(cos(r) - 1) - r * c] +
3757 //          (C_hl + sigma) * [(sin(r) - r) + c]
3758 //
3759 //     and this is what is actually computed. We separate this sum
3760 //     into four parts:
3761 //
3762 //          hi + med + pols + corr
3763 //
3764 //     where
3765 //
3766 //          hi       = S_hi + sigma r
3767 //          med      = C_hl * r
3768 //          pols     = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r)
3769 //          corr     = S_lo + c * ((C_hl + sigma) - S_hi * r)
3770 //
3771 //     3. POLYNOMIAL
3772 //
3773 //     The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) *
3774 //     (sin(r) - r) can be rearranged freely, since it is quite
3775 //     small, so we exploit parallelism to the fullest.
3776 //
3777 //          psc4       =   SC_4 * r_1
3778 //          msc4       =   psc4 * r
3779 //          r2         =   r * r
3780 //          msc2       =   SC_2 * r2
3781 //          r4         =   r2 * r2
3782 //          psc3       =   SC_3 + msc4
3783 //          psc1       =   SC_1 + msc2
3784 //          msc3       =   r4 * psc3
3785 //          sincospols =   psc1 + msc3
3786 //          pols       =   sincospols *
3787 //                         <S_hi * r^2 | (C_hl + sigma) * r^3>
3788 //
3789 //     4. CORRECTION TERM
3790 //
3791 //     This is where the "c" component of the range reduction is
3792 //     taken into account; recall that just "r" is used for most of
3793 //     the calculation.
3794 //
3795 //          -c   = m_3 - c_2
3796 //          -d   = S_hi * r - (C_hl + sigma)
3797 //          corr = -c * -d + S_lo
3798 //
3799 //     5. COMPENSATED SUMMATIONS
3800 //
3801 //     The two successive compensated summations add up the high
3802 //     and medium parts, leaving just the low parts to add up at
3803 //     the end.
3804 //
3805 //          rs        =  sigma * r
3806 //          res_int   =  S_hi + rs
3807 //          k_0       =  S_hi - res_int
3808 //          k_2       =  k_0 + rs
3809 //          med       =  C_hl * r
3810 //          res_hi    =  res_int + med
3811 //          k_1       =  res_int - res_hi
3812 //          k_3       =  k_1 + med
3813 //
3814 //     6. FINAL SUMMATION
3815 //
3816 //     We now add up all the small parts:
3817 //
3818 //          res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3
3819 //
3820 //     Now the overall result is just:
3821 //
3822 //          res_hi + res_lo
3823 //
3824 //     7. SMALL ARGUMENTS
3825 //
3826 //     Inputs with |X| < 2^-252 are treated specially as
3827 //     1 - |x|.
3828 //
3829 // Special cases:
3830 //  cos(NaN) = quiet NaN, and raise invalid exception
3831 //  cos(INF) = NaN and raise invalid exception
3832 //  cos(0) = 1
3833 //
3834 /******************************************************************************/
3835 
3836 #ifdef _LP64
3837 
3838 ALIGNED_(8) juint _ONE[] =
3839 {
3840     0x00000000UL, 0x3ff00000UL
3841 };
3842 
3843 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) {
3844   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;
3845   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;
3846   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;
3847   Label L_2TAG_PACKET_12_0_1, L_2TAG_PACKET_13_0_1, B1_2, B1_3, B1_4, B1_5, start;
3848 
3849   assert_different_registers(r8, r9, r10, r11, eax, ecx, edx);
3850 
3851   address ONEHALF = (address)_ONEHALF;
3852   address P_2 = (address)_P_2;
3853   address SC_4 = (address)_SC_4;
3854   address Ctable = (address)_Ctable;
3855   address SC_2 = (address)_SC_2;
3856   address SC_3 = (address)_SC_3;
3857   address SC_1 = (address)_SC_1;
3858   address PI_INV_TABLE = (address)_PI_INV_TABLE;
3859   address PI_4 = (address)_PI_4;
3860   address PI32INV = (address)_PI32INV;
3861   address SIGN_MASK = (address)_SIGN_MASK;
3862   address P_1 = (address)_P_1;
3863   address P_3 = (address)_P_3;
3864   address ONE = (address)_ONE;
3865   address NEG_ZERO = (address)_NEG_ZERO;
3866 
3867   bind(start);
3868   push(rbx);
3869   subq(rsp, 16);
3870   movsd(Address(rsp, 8), xmm0);
3871 
3872   bind(B1_2);
3873   movl(eax, Address(rsp, 12));
3874   movq(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x40245f30UL
3875   andl(eax, 2147418112);
3876   subl(eax, 808452096);
3877   cmpl(eax, 281346048);
3878   jcc(Assembler::above, L_2TAG_PACKET_0_0_1);
3879   mulsd(xmm1, xmm0);
3880   movdqu(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
3881   movq(xmm4, ExternalAddress(SIGN_MASK));    //0x00000000UL, 0x80000000UL
3882   pand(xmm4, xmm0);
3883   por(xmm5, xmm4);
3884   addpd(xmm1, xmm5);
3885   cvttsd2sil(edx, xmm1);
3886   cvtsi2sdl(xmm1, edx);
3887   movdqu(xmm2, ExternalAddress(P_2));    //0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL
3888   movq(xmm3, ExternalAddress(P_1));    //0x54400000UL, 0x3fb921fbUL
3889   mulsd(xmm3, xmm1);
3890   unpcklpd(xmm1, xmm1);
3891   addq(rdx, 1865232);
3892   movdqu(xmm4, xmm0);
3893   andq(rdx, 63);
3894   movdqu(xmm5, ExternalAddress(SC_4));    //0xa556c734UL, 0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL
3895   lea(rax, ExternalAddress(Ctable));
3896   shlq(rdx, 5);
3897   addq(rax, rdx);
3898   mulpd(xmm2, xmm1);
3899   subsd(xmm0, xmm3);
3900   mulsd(xmm1, ExternalAddress(P_3));    //0x2e037073UL, 0x3b63198aUL
3901   subsd(xmm4, xmm3);
3902   movq(xmm7, Address(rax, 8));
3903   unpcklpd(xmm0, xmm0);
3904   movdqu(xmm3, xmm4);
3905   subsd(xmm4, xmm2);
3906   mulpd(xmm5, xmm0);
3907   subpd(xmm0, xmm2);
3908   movdqu(xmm6, ExternalAddress(SC_2));    //0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL
3909   mulsd(xmm7, xmm4);
3910   subsd(xmm3, xmm4);
3911   mulpd(xmm5, xmm0);
3912   mulpd(xmm0, xmm0);
3913   subsd(xmm3, xmm2);
3914   movdqu(xmm2, Address(rax, 0));
3915   subsd(xmm1, xmm3);
3916   movq(xmm3, Address(rax, 24));
3917   addsd(xmm2, xmm3);
3918   subsd(xmm7, xmm2);
3919   mulsd(xmm2, xmm4);
3920   mulpd(xmm6, xmm0);
3921   mulsd(xmm3, xmm4);
3922   mulpd(xmm2, xmm0);
3923   mulpd(xmm0, xmm0);
3924   addpd(xmm5, ExternalAddress(SC_3));    //0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL
3925   mulsd(xmm4, Address(rax, 0));
3926   addpd(xmm6, ExternalAddress(SC_1));    //0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL
3927   mulpd(xmm5, xmm0);
3928   movdqu(xmm0, xmm3);
3929   addsd(xmm3, Address(rax, 8));
3930   mulpd(xmm1, xmm7);
3931   movdqu(xmm7, xmm4);
3932   addsd(xmm4, xmm3);
3933   addpd(xmm6, xmm5);
3934   movq(xmm5, Address(rax, 8));
3935   subsd(xmm5, xmm3);
3936   subsd(xmm3, xmm4);
3937   addsd(xmm1, Address(rax, 16));
3938   mulpd(xmm6, xmm2);
3939   addsd(xmm0, xmm5);
3940   addsd(xmm3, xmm7);
3941   addsd(xmm0, xmm1);
3942   addsd(xmm0, xmm3);
3943   addsd(xmm0, xmm6);
3944   unpckhpd(xmm6, xmm6);
3945   addsd(xmm0, xmm6);
3946   addsd(xmm0, xmm4);
3947   jmp(B1_4);
3948 
3949   bind(L_2TAG_PACKET_0_0_1);
3950   jcc(Assembler::greater, L_2TAG_PACKET_1_0_1);
3951   pextrw(eax, xmm0, 3);
3952   andl(eax, 32767);
3953   pinsrw(xmm0, eax, 3);
3954   movq(xmm1, ExternalAddress(ONE));    //0x00000000UL, 0x3ff00000UL
3955   subsd(xmm1, xmm0);
3956   movdqu(xmm0, xmm1);
3957   jmp(B1_4);
3958 
3959   bind(L_2TAG_PACKET_1_0_1);
3960   pextrw(eax, xmm0, 3);
3961   andl(eax, 32752);
3962   cmpl(eax, 32752);
3963   jcc(Assembler::equal, L_2TAG_PACKET_2_0_1);
3964   pextrw(ecx, xmm0, 3);
3965   andl(ecx, 32752);
3966   subl(ecx, 16224);
3967   shrl(ecx, 7);
3968   andl(ecx, 65532);
3969   lea(r11, ExternalAddress(PI_INV_TABLE));
3970   addq(rcx, r11);
3971   movdq(rax, xmm0);
3972   movl(r10, Address(rcx, 20));
3973   movl(r8, Address(rcx, 24));
3974   movl(edx, eax);
3975   shrq(rax, 21);
3976   orl(eax, INT_MIN);
3977   shrl(eax, 11);
3978   movl(r9, r10);
3979   imulq(r10, rdx);
3980   imulq(r9, rax);
3981   imulq(r8, rax);
3982   movl(rsi, Address(rcx, 16));
3983   movl(rdi, Address(rcx, 12));
3984   movl(r11, r10);
3985   shrq(r10, 32);
3986   addq(r9, r10);
3987   addq(r11, r8);
3988   movl(r8, r11);
3989   shrq(r11, 32);
3990   addq(r9, r11);
3991   movl(r10, rsi);
3992   imulq(rsi, rdx);
3993   imulq(r10, rax);
3994   movl(r11, rdi);
3995   imulq(rdi, rdx);
3996   movl(rbx, rsi);
3997   shrq(rsi, 32);
3998   addq(r9, rbx);
3999   movl(rbx, r9);
4000   shrq(r9, 32);
4001   addq(r10, rsi);
4002   addq(r10, r9);
4003   shlq(rbx, 32);
4004   orq(r8, rbx);
4005   imulq(r11, rax);
4006   movl(r9, Address(rcx, 8));
4007   movl(rsi, Address(rcx, 4));
4008   movl(rbx, rdi);
4009   shrq(rdi, 32);
4010   addq(r10, rbx);
4011   movl(rbx, r10);
4012   shrq(r10, 32);
4013   addq(r11, rdi);
4014   addq(r11, r10);
4015   movq(rdi, r9);
4016   imulq(r9, rdx);
4017   imulq(rdi, rax);
4018   movl(r10, r9);
4019   shrq(r9, 32);
4020   addq(r11, r10);
4021   movl(r10, r11);
4022   shrq(r11, 32);
4023   addq(rdi, r9);
4024   addq(rdi, r11);
4025   movq(r9, rsi);
4026   imulq(rsi, rdx);
4027   imulq(r9, rax);
4028   shlq(r10, 32);
4029   orq(r10, rbx);
4030   movl(eax, Address(rcx, 0));
4031   movl(r11, rsi);
4032   shrq(rsi, 32);
4033   addq(rdi, r11);
4034   movl(r11, rdi);
4035   shrq(rdi, 32);
4036   addq(r9, rsi);
4037   addq(r9, rdi);
4038   imulq(rdx, rax);
4039   pextrw(rbx, xmm0, 3);
4040   lea(rdi, ExternalAddress(PI_INV_TABLE));
4041   subq(rcx, rdi);
4042   addl(ecx, ecx);
4043   addl(ecx, ecx);
4044   addl(ecx, ecx);
4045   addl(ecx, 19);
4046   movl(rsi, 32768);
4047   andl(rsi, rbx);
4048   shrl(rbx, 4);
4049   andl(rbx, 2047);
4050   subl(rbx, 1023);
4051   subl(ecx, rbx);
4052   addq(r9, rdx);
4053   movl(edx, ecx);
4054   addl(edx, 32);
4055   cmpl(ecx, 1);
4056   jcc(Assembler::less, L_2TAG_PACKET_3_0_1);
4057   negl(ecx);
4058   addl(ecx, 29);
4059   shll(r9);
4060   movl(rdi, r9);
4061   andl(r9, 536870911);
4062   testl(r9, 268435456);
4063   jcc(Assembler::notEqual, L_2TAG_PACKET_4_0_1);
4064   shrl(r9);
4065   movl(rbx, 0);
4066   shlq(r9, 32);
4067   orq(r9, r11);
4068 
4069   bind(L_2TAG_PACKET_5_0_1);
4070 
4071   bind(L_2TAG_PACKET_6_0_1);
4072   cmpq(r9, 0);
4073   jcc(Assembler::equal, L_2TAG_PACKET_7_0_1);
4074 
4075   bind(L_2TAG_PACKET_8_0_1);
4076   bsrq(r11, r9);
4077   movl(ecx, 29);
4078   subl(ecx, r11);
4079   jcc(Assembler::lessEqual, L_2TAG_PACKET_9_0_1);
4080   shlq(r9);
4081   movq(rax, r10);
4082   shlq(r10);
4083   addl(edx, ecx);
4084   negl(ecx);
4085   addl(ecx, 64);
4086   shrq(rax);
4087   shrq(r8);
4088   orq(r9, rax);
4089   orq(r10, r8);
4090 
4091   bind(L_2TAG_PACKET_10_0_1);
4092   cvtsi2sdq(xmm0, r9);
4093   shrq(r10, 1);
4094   cvtsi2sdq(xmm3, r10);
4095   xorpd(xmm4, xmm4);
4096   shll(edx, 4);
4097   negl(edx);
4098   addl(edx, 16368);
4099   orl(edx, rsi);
4100   xorl(edx, rbx);
4101   pinsrw(xmm4, edx, 3);
4102   movq(xmm2, ExternalAddress(PI_4));    //0x40000000UL, 0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL
4103   movq(xmm6, ExternalAddress(8 + PI_4));    //0x3fe921fbUL, 0x18469899UL, 0x3e64442dUL
4104   xorpd(xmm5, xmm5);
4105   subl(edx, 1008);
4106   pinsrw(xmm5, edx, 3);
4107   mulsd(xmm0, xmm4);
4108   shll(rsi, 16);
4109   sarl(rsi, 31);
4110   mulsd(xmm3, xmm5);
4111   movdqu(xmm1, xmm0);
4112   mulsd(xmm0, xmm2);
4113   shrl(rdi, 29);
4114   addsd(xmm1, xmm3);
4115   mulsd(xmm3, xmm2);
4116   addl(rdi, rsi);
4117   xorl(rdi, rsi);
4118   mulsd(xmm6, xmm1);
4119   movl(eax, rdi);
4120   addsd(xmm6, xmm3);
4121   movdqu(xmm2, xmm0);
4122   addsd(xmm0, xmm6);
4123   subsd(xmm2, xmm0);
4124   addsd(xmm6, xmm2);
4125 
4126   bind(L_2TAG_PACKET_11_0_1);
4127   movq(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x40245f30UL
4128   mulsd(xmm1, xmm0);
4129   movq(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
4130   movq(xmm4, ExternalAddress(SIGN_MASK));    //0x00000000UL, 0x80000000UL
4131   pand(xmm4, xmm0);
4132   por(xmm5, xmm4);
4133   addpd(xmm1, xmm5);
4134   cvttsd2siq(rdx, xmm1);
4135   cvtsi2sdq(xmm1, rdx);
4136   movq(xmm3, ExternalAddress(P_1));    //0x54400000UL, 0x3fb921fbUL
4137   movdqu(xmm2, ExternalAddress(P_2));    //0x1a600000UL, 0x3d90b461UL, 0x1a600000UL, 0x3d90b461UL
4138   mulsd(xmm3, xmm1);
4139   unpcklpd(xmm1, xmm1);
4140   shll(eax, 3);
4141   addl(edx, 1865232);
4142   movdqu(xmm4, xmm0);
4143   addl(edx, eax);
4144   andl(edx, 63);
4145   movdqu(xmm5, ExternalAddress(SC_4));    //0xa556c734UL, 0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL
4146   lea(rax, ExternalAddress(Ctable));
4147   shll(edx, 5);
4148   addq(rax, rdx);
4149   mulpd(xmm2, xmm1);
4150   subsd(xmm0, xmm3);
4151   mulsd(xmm1, ExternalAddress(P_3));    //0x2e037073UL, 0x3b63198aUL
4152   subsd(xmm4, xmm3);
4153   movq(xmm7, Address(rax, 8));
4154   unpcklpd(xmm0, xmm0);
4155   movdqu(xmm3, xmm4);
4156   subsd(xmm4, xmm2);
4157   mulpd(xmm5, xmm0);
4158   subpd(xmm0, xmm2);
4159   mulsd(xmm7, xmm4);
4160   subsd(xmm3, xmm4);
4161   mulpd(xmm5, xmm0);
4162   mulpd(xmm0, xmm0);
4163   subsd(xmm3, xmm2);
4164   movdqu(xmm2, Address(rax, 0));
4165   subsd(xmm1, xmm3);
4166   movq(xmm3, Address(rax, 24));
4167   addsd(xmm2, xmm3);
4168   subsd(xmm7, xmm2);
4169   subsd(xmm1, xmm6);
4170   movdqu(xmm6, ExternalAddress(SC_2));    //0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL
4171   mulsd(xmm2, xmm4);
4172   mulpd(xmm6, xmm0);
4173   mulsd(xmm3, xmm4);
4174   mulpd(xmm2, xmm0);
4175   mulpd(xmm0, xmm0);
4176   addpd(xmm5, ExternalAddress(SC_3));    //0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL
4177   mulsd(xmm4, Address(rax, 0));
4178   addpd(xmm6, ExternalAddress(SC_1));    //0x55555555UL, 0xbfc55555UL, 0x00000000UL, 0xbfe00000UL
4179   mulpd(xmm5, xmm0);
4180   movdqu(xmm0, xmm3);
4181   addsd(xmm3, Address(rax, 8));
4182   mulpd(xmm1, xmm7);
4183   movdqu(xmm7, xmm4);
4184   addsd(xmm4, xmm3);
4185   addpd(xmm6, xmm5);
4186   movq(xmm5, Address(rax, 8));
4187   subsd(xmm5, xmm3);
4188   subsd(xmm3, xmm4);
4189   addsd(xmm1, Address(rax, 16));
4190   mulpd(xmm6, xmm2);
4191   addsd(xmm5, xmm0);
4192   addsd(xmm3, xmm7);
4193   addsd(xmm1, xmm5);
4194   addsd(xmm1, xmm3);
4195   addsd(xmm1, xmm6);
4196   unpckhpd(xmm6, xmm6);
4197   movdqu(xmm0, xmm4);
4198   addsd(xmm1, xmm6);
4199   addsd(xmm0, xmm1);
4200   jmp(B1_4);
4201 
4202   bind(L_2TAG_PACKET_7_0_1);
4203   addl(edx, 64);
4204   movq(r9, r10);
4205   movq(r10, r8);
4206   movl(r8, 0);
4207   cmpq(r9, 0);
4208   jcc(Assembler::notEqual, L_2TAG_PACKET_8_0_1);
4209   addl(edx, 64);
4210   movq(r9, r10);
4211   movq(r10, r8);
4212   cmpq(r9, 0);
4213   jcc(Assembler::notEqual, L_2TAG_PACKET_8_0_1);
4214   xorpd(xmm0, xmm0);
4215   xorpd(xmm6, xmm6);
4216   jmp(L_2TAG_PACKET_11_0_1);
4217 
4218   bind(L_2TAG_PACKET_9_0_1);
4219   jcc(Assembler::equal, L_2TAG_PACKET_10_0_1);
4220   negl(ecx);
4221   shrq(r10);
4222   movq(rax, r9);
4223   shrq(r9);
4224   subl(edx, ecx);
4225   negl(ecx);
4226   addl(ecx, 64);
4227   shlq(rax);
4228   orq(r10, rax);
4229   jmp(L_2TAG_PACKET_10_0_1);
4230   bind(L_2TAG_PACKET_3_0_1);
4231   negl(ecx);
4232   shlq(r9, 32);
4233   orq(r9, r11);
4234   shlq(r9);
4235   movq(rdi, r9);
4236   testl(r9, INT_MIN);
4237   jcc(Assembler::notEqual, L_2TAG_PACKET_12_0_1);
4238   shrl(r9);
4239   movl(rbx, 0);
4240   shrq(rdi, 3);
4241   jmp(L_2TAG_PACKET_6_0_1);
4242 
4243   bind(L_2TAG_PACKET_4_0_1);
4244   shrl(r9);
4245   movl(rbx, 536870912);
4246   shrl(rbx);
4247   shlq(r9, 32);
4248   orq(r9, r11);
4249   shlq(rbx, 32);
4250   addl(rdi, 536870912);
4251   movl(rcx, 0);
4252   movl(r11, 0);
4253   subq(rcx, r8);
4254   sbbq(r11, r10);
4255   sbbq(rbx, r9);
4256   movq(r8, rcx);
4257   movq(r10, r11);
4258   movq(r9, rbx);
4259   movl(rbx, 32768);
4260   jmp(L_2TAG_PACKET_5_0_1);
4261 
4262   bind(L_2TAG_PACKET_12_0_1);
4263   shrl(r9);
4264   mov64(rbx, 0x100000000);
4265   shrq(rbx);
4266   movl(rcx, 0);
4267   movl(r11, 0);
4268   subq(rcx, r8);
4269   sbbq(r11, r10);
4270   sbbq(rbx, r9);
4271   movq(r8, rcx);
4272   movq(r10, r11);
4273   movq(r9, rbx);
4274   movl(rbx, 32768);
4275   shrq(rdi, 3);
4276   addl(rdi, 536870912);
4277   jmp(L_2TAG_PACKET_6_0_1);
4278 
4279   bind(L_2TAG_PACKET_2_0_1);
4280   movsd(xmm0, Address(rsp, 8));
4281   mulsd(xmm0, ExternalAddress(NEG_ZERO));    //0x00000000UL, 0x80000000UL
4282   movq(Address(rsp, 0), xmm0);
4283 
4284   bind(L_2TAG_PACKET_13_0_1);
4285 
4286   bind(B1_4);
4287   addq(rsp, 16);
4288   pop(rbx);
4289 }
4290 
4291 #endif
4292 
4293 #ifndef _LP64
4294 
4295 ALIGNED_(16) juint _static_const_table_cos[] =
4296 {
4297     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
4298     0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL, 0xbf73b92eUL,
4299     0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
4300     0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL,
4301     0xc0000000UL, 0xbc626d19UL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL,
4302     0xbfa60beaUL, 0x2ed59f06UL, 0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL,
4303     0x00000000UL, 0x3ff00000UL, 0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL,
4304     0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL, 0x00000000UL, 0x3ff00000UL,
4305     0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL, 0x20000000UL,
4306     0x3c5e0d89UL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL, 0xbfc59267UL,
4307     0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
4308     0x3ff00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL,
4309     0x20000000UL, 0x3c68076aUL, 0x00000000UL, 0x3ff00000UL, 0x99fcef32UL,
4310     0x3fca8279UL, 0x667f3bcdUL, 0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL,
4311     0x00000000UL, 0x3fe00000UL, 0x94247758UL, 0x3fc133ccUL, 0x6b151741UL,
4312     0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL, 0x00000000UL, 0x3fe00000UL,
4313     0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL, 0xe0000000UL,
4314     0x3c39f630UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL, 0xbf9d4a2cUL,
4315     0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
4316     0x3fe00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0x3fed906bUL,
4317     0x20000000UL, 0x3c7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x76acf82dUL,
4318     0x3fa4a031UL, 0x56c62ddaUL, 0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL,
4319     0x00000000UL, 0x3fd00000UL, 0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL,
4320     0x3fef6297UL, 0x20000000UL, 0x3c756217UL, 0x00000000UL, 0x3fd00000UL,
4321     0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL, 0x3fefd88dUL, 0x40000000UL,
4322     0xbc887df6UL, 0x00000000UL, 0x3fc00000UL, 0x00000000UL, 0x00000000UL,
4323     0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
4324     0x00000000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0x3fefd88dUL,
4325     0x40000000UL, 0xbc887df6UL, 0x00000000UL, 0xbfc00000UL, 0x0e5967d5UL,
4326     0x3fac1d1fUL, 0xcff75cb0UL, 0x3fef6297UL, 0x20000000UL, 0x3c756217UL,
4327     0x00000000UL, 0xbfd00000UL, 0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL,
4328     0x3fee9f41UL, 0xe0000000UL, 0x3c8760b1UL, 0x00000000UL, 0xbfd00000UL,
4329     0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL, 0x3fed906bUL, 0x20000000UL,
4330     0x3c7457e6UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL, 0x3f9d4a2cUL,
4331     0xf180bdb1UL, 0x3fec38b2UL, 0x80000000UL, 0xbc76e0b1UL, 0x00000000UL,
4332     0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0x3fea9b66UL,
4333     0xe0000000UL, 0x3c39f630UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL,
4334     0xbfc133ccUL, 0x6b151741UL, 0x3fe8bc80UL, 0x20000000UL, 0xbc82c5e1UL,
4335     0x00000000UL, 0xbfe00000UL, 0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL,
4336     0x3fe6a09eUL, 0x20000000UL, 0xbc8bdd34UL, 0x00000000UL, 0xbfe00000UL,
4337     0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL, 0x3fe44cf3UL, 0x20000000UL,
4338     0x3c68076aUL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL, 0x3fc59267UL,
4339     0x39ae68c8UL, 0x3fe1c73bUL, 0x20000000UL, 0x3c8b25ddUL, 0x00000000UL,
4340     0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0x3fde2b5dUL,
4341     0x20000000UL, 0x3c5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL,
4342     0x3fb37ca1UL, 0xa6aea963UL, 0x3fd87de2UL, 0xe0000000UL, 0xbc672cedUL,
4343     0x00000000UL, 0xbff00000UL, 0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL,
4344     0x3fd29406UL, 0xa0000000UL, 0xbc75d28dUL, 0x00000000UL, 0xbff00000UL,
4345     0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL, 0x3fc8f8b8UL, 0xc0000000UL,
4346     0xbc626d19UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL, 0x3f73b92eUL,
4347     0xbc29b42cUL, 0x3fb917a6UL, 0xe0000000UL, 0xbc3e2718UL, 0x00000000UL,
4348     0xbff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
4349     0x00000000UL, 0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x176d6d31UL,
4350     0x3f73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
4351     0x00000000UL, 0xbff00000UL, 0x011469fbUL, 0x3f93ad06UL, 0x3c69a60bUL,
4352     0xbfc8f8b8UL, 0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0xbff00000UL,
4353     0x939d225aUL, 0x3fa60beaUL, 0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL,
4354     0x3c75d28dUL, 0x00000000UL, 0xbff00000UL, 0x866b95cfUL, 0x3fb37ca1UL,
4355     0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL, 0x3c672cedUL, 0x00000000UL,
4356     0xbff00000UL, 0x73fa1279UL, 0x3fbe3a68UL, 0x3806f63bUL, 0xbfde2b5dUL,
4357     0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0xbff00000UL, 0x5bc57974UL,
4358     0x3fc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
4359     0x00000000UL, 0xbff00000UL, 0x53aba2fdUL, 0x3fcd0dfeUL, 0x25091dd6UL,
4360     0xbfe44cf3UL, 0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0xbff00000UL,
4361     0x99fcef32UL, 0xbfca8279UL, 0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL,
4362     0x3c8bdd34UL, 0x00000000UL, 0xbfe00000UL, 0x94247758UL, 0xbfc133ccUL,
4363     0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL, 0x3c82c5e1UL, 0x00000000UL,
4364     0xbfe00000UL, 0x9ae68c87UL, 0xbfac73b3UL, 0x290ea1a3UL, 0xbfea9b66UL,
4365     0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0xbfe00000UL, 0x7f909c4eUL,
4366     0x3f9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
4367     0x00000000UL, 0xbfe00000UL, 0x65455a75UL, 0x3fbe0875UL, 0xcf328d46UL,
4368     0xbfed906bUL, 0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0xbfe00000UL,
4369     0x76acf82dUL, 0xbfa4a031UL, 0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL,
4370     0xbc8760b1UL, 0x00000000UL, 0xbfd00000UL, 0x0e5967d5UL, 0x3fac1d1fUL,
4371     0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL, 0xbc756217UL, 0x00000000UL,
4372     0xbfd00000UL, 0x0f592f50UL, 0x3f9ba165UL, 0xa3d12526UL, 0xbfefd88dUL,
4373     0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0xbfc00000UL, 0x00000000UL,
4374     0x00000000UL, 0x00000000UL, 0xbff00000UL, 0x00000000UL, 0x00000000UL,
4375     0x00000000UL, 0x00000000UL, 0x0f592f50UL, 0xbf9ba165UL, 0xa3d12526UL,
4376     0xbfefd88dUL, 0x40000000UL, 0x3c887df6UL, 0x00000000UL, 0x3fc00000UL,
4377     0x0e5967d5UL, 0xbfac1d1fUL, 0xcff75cb0UL, 0xbfef6297UL, 0x20000000UL,
4378     0xbc756217UL, 0x00000000UL, 0x3fd00000UL, 0x76acf82dUL, 0x3fa4a031UL,
4379     0x56c62ddaUL, 0xbfee9f41UL, 0xe0000000UL, 0xbc8760b1UL, 0x00000000UL,
4380     0x3fd00000UL, 0x65455a75UL, 0xbfbe0875UL, 0xcf328d46UL, 0xbfed906bUL,
4381     0x20000000UL, 0xbc7457e6UL, 0x00000000UL, 0x3fe00000UL, 0x7f909c4eUL,
4382     0xbf9d4a2cUL, 0xf180bdb1UL, 0xbfec38b2UL, 0x80000000UL, 0x3c76e0b1UL,
4383     0x00000000UL, 0x3fe00000UL, 0x9ae68c87UL, 0x3fac73b3UL, 0x290ea1a3UL,
4384     0xbfea9b66UL, 0xe0000000UL, 0xbc39f630UL, 0x00000000UL, 0x3fe00000UL,
4385     0x94247758UL, 0x3fc133ccUL, 0x6b151741UL, 0xbfe8bc80UL, 0x20000000UL,
4386     0x3c82c5e1UL, 0x00000000UL, 0x3fe00000UL, 0x99fcef32UL, 0x3fca8279UL,
4387     0x667f3bcdUL, 0xbfe6a09eUL, 0x20000000UL, 0x3c8bdd34UL, 0x00000000UL,
4388     0x3fe00000UL, 0x53aba2fdUL, 0xbfcd0dfeUL, 0x25091dd6UL, 0xbfe44cf3UL,
4389     0x20000000UL, 0xbc68076aUL, 0x00000000UL, 0x3ff00000UL, 0x5bc57974UL,
4390     0xbfc59267UL, 0x39ae68c8UL, 0xbfe1c73bUL, 0x20000000UL, 0xbc8b25ddUL,
4391     0x00000000UL, 0x3ff00000UL, 0x73fa1279UL, 0xbfbe3a68UL, 0x3806f63bUL,
4392     0xbfde2b5dUL, 0x20000000UL, 0xbc5e0d89UL, 0x00000000UL, 0x3ff00000UL,
4393     0x866b95cfUL, 0xbfb37ca1UL, 0xa6aea963UL, 0xbfd87de2UL, 0xe0000000UL,
4394     0x3c672cedUL, 0x00000000UL, 0x3ff00000UL, 0x939d225aUL, 0xbfa60beaUL,
4395     0x2ed59f06UL, 0xbfd29406UL, 0xa0000000UL, 0x3c75d28dUL, 0x00000000UL,
4396     0x3ff00000UL, 0x011469fbUL, 0xbf93ad06UL, 0x3c69a60bUL, 0xbfc8f8b8UL,
4397     0xc0000000UL, 0x3c626d19UL, 0x00000000UL, 0x3ff00000UL, 0x176d6d31UL,
4398     0xbf73b92eUL, 0xbc29b42cUL, 0xbfb917a6UL, 0xe0000000UL, 0x3c3e2718UL,
4399     0x00000000UL, 0x3ff00000UL, 0x55555555UL, 0xbfc55555UL, 0x00000000UL,
4400     0xbfe00000UL, 0x11111111UL, 0x3f811111UL, 0x55555555UL, 0x3fa55555UL,
4401     0x1a01a01aUL, 0xbf2a01a0UL, 0x16c16c17UL, 0xbf56c16cUL, 0xa556c734UL,
4402     0x3ec71de3UL, 0x1a01a01aUL, 0x3efa01a0UL, 0x1a600000UL, 0x3d90b461UL,
4403     0x1a600000UL, 0x3d90b461UL, 0x54400000UL, 0x3fb921fbUL, 0x00000000UL,
4404     0x00000000UL, 0x2e037073UL, 0x3b63198aUL, 0x00000000UL, 0x00000000UL,
4405     0x6dc9c883UL, 0x40245f30UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
4406     0x43380000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x3ff00000UL,
4407     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x80000000UL, 0x00000000UL,
4408     0x00000000UL, 0x00000000UL, 0x80000000UL, 0x00000000UL, 0x00000000UL,
4409     0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
4410 };
4411 
4412 //registers,
4413 // input: (rbp + 8)
4414 // scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7
4415 //          rax, rdx, rcx, rbx (tmp)
4416 
4417 // Code generated by Intel C compiler for LIBM library
4418 
4419 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) {
4420   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;
4421   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;
4422   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;
4423   Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start;
4424 
4425   assert_different_registers(tmp, eax, ecx, edx);
4426 
4427   address static_const_table_cos = (address)_static_const_table_cos;
4428 
4429   bind(start);
4430   subl(rsp, 120);
4431   movl(Address(rsp, 56), tmp);
4432   lea(tmp, ExternalAddress(static_const_table_cos));
4433   movsd(xmm0, Address(rsp, 128));
4434   pextrw(eax, xmm0, 3);
4435   andl(eax, 32767);
4436   subl(eax, 12336);
4437   cmpl(eax, 4293);
4438   jcc(Assembler::above, L_2TAG_PACKET_0_0_2);
4439   movsd(xmm1, Address(tmp, 2160));
4440   mulsd(xmm1, xmm0);
4441   movdqu(xmm5, Address(tmp, 2240));
4442   movsd(xmm4, Address(tmp, 2224));
4443   pand(xmm4, xmm0);
4444   por(xmm5, xmm4);
4445   movsd(xmm3, Address(tmp, 2128));
4446   movdqu(xmm2, Address(tmp, 2112));
4447   addpd(xmm1, xmm5);
4448   cvttsd2sil(edx, xmm1);
4449   cvtsi2sdl(xmm1, edx);
4450   mulsd(xmm3, xmm1);
4451   unpcklpd(xmm1, xmm1);
4452   addl(edx, 1865232);
4453   movdqu(xmm4, xmm0);
4454   andl(edx, 63);
4455   movdqu(xmm5, Address(tmp, 2096));
4456   lea(eax, Address(tmp, 0));
4457   shll(edx, 5);
4458   addl(eax, edx);
4459   mulpd(xmm2, xmm1);
4460   subsd(xmm0, xmm3);
4461   mulsd(xmm1, Address(tmp, 2144));
4462   subsd(xmm4, xmm3);
4463   movsd(xmm7, Address(eax, 8));
4464   unpcklpd(xmm0, xmm0);
4465   movapd(xmm3, xmm4);
4466   subsd(xmm4, xmm2);
4467   mulpd(xmm5, xmm0);
4468   subpd(xmm0, xmm2);
4469   movdqu(xmm6, Address(tmp, 2064));
4470   mulsd(xmm7, xmm4);
4471   subsd(xmm3, xmm4);
4472   mulpd(xmm5, xmm0);
4473   mulpd(xmm0, xmm0);
4474   subsd(xmm3, xmm2);
4475   movdqu(xmm2, Address(eax, 0));
4476   subsd(xmm1, xmm3);
4477   movsd(xmm3, Address(eax, 24));
4478   addsd(xmm2, xmm3);
4479   subsd(xmm7, xmm2);
4480   mulsd(xmm2, xmm4);
4481   mulpd(xmm6, xmm0);
4482   mulsd(xmm3, xmm4);
4483   mulpd(xmm2, xmm0);
4484   mulpd(xmm0, xmm0);
4485   addpd(xmm5, Address(tmp, 2080));
4486   mulsd(xmm4, Address(eax, 0));
4487   addpd(xmm6, Address(tmp, 2048));
4488   mulpd(xmm5, xmm0);
4489   movapd(xmm0, xmm3);
4490   addsd(xmm3, Address(eax, 8));
4491   mulpd(xmm1, xmm7);
4492   movapd(xmm7, xmm4);
4493   addsd(xmm4, xmm3);
4494   addpd(xmm6, xmm5);
4495   movsd(xmm5, Address(eax, 8));
4496   subsd(xmm5, xmm3);
4497   subsd(xmm3, xmm4);
4498   addsd(xmm1, Address(eax, 16));
4499   mulpd(xmm6, xmm2);
4500   addsd(xmm5, xmm0);
4501   addsd(xmm3, xmm7);
4502   addsd(xmm1, xmm5);
4503   addsd(xmm1, xmm3);
4504   addsd(xmm1, xmm6);
4505   unpckhpd(xmm6, xmm6);
4506   addsd(xmm1, xmm6);
4507   addsd(xmm4, xmm1);
4508   movsd(Address(rsp, 0), xmm4);
4509   fld_d(Address(rsp, 0));
4510   jmp(L_2TAG_PACKET_1_0_2);
4511 
4512   bind(L_2TAG_PACKET_0_0_2);
4513   jcc(Assembler::greater, L_2TAG_PACKET_2_0_2);
4514   pextrw(eax, xmm0, 3);
4515   andl(eax, 32767);
4516   pinsrw(xmm0, eax, 3);
4517   movsd(xmm1, Address(tmp, 2192));
4518   subsd(xmm1, xmm0);
4519   movsd(Address(rsp, 0), xmm1);
4520   fld_d(Address(rsp, 0));
4521   jmp(L_2TAG_PACKET_1_0_2);
4522 
4523   bind(L_2TAG_PACKET_2_0_2);
4524   movl(eax, Address(rsp, 132));
4525   andl(eax, 2146435072);
4526   cmpl(eax, 2146435072);
4527   jcc(Assembler::equal, L_2TAG_PACKET_3_0_2);
4528   subl(rsp, 32);
4529   movsd(Address(rsp, 0), xmm0);
4530   lea(eax, Address(rsp, 40));
4531   movl(Address(rsp, 8), eax);
4532   movl(eax, 1);
4533   movl(Address(rsp, 12), eax);
4534   call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlibm_sin_cos_huge())));
4535   addl(rsp, 32);
4536   fld_d(Address(rsp, 8));
4537   jmp(L_2TAG_PACKET_1_0_2);
4538 
4539   bind(L_2TAG_PACKET_3_0_2);
4540   fld_d(Address(rsp, 128));
4541   fmul_d(Address(tmp, 2208));
4542 
4543   bind(L_2TAG_PACKET_1_0_2);
4544   movl(tmp, Address(rsp, 56));
4545 }
4546 
4547 #endif