1 /*
   2 * Copyright (c) 2016, 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 "runtime/stubRoutines.hpp"
  31 #include "macroAssembler_x86.hpp"
  32 
  33 #ifdef _MSC_VER
  34 #define ALIGNED_(x) __declspec(align(x))
  35 #else
  36 #define ALIGNED_(x) __attribute__ ((aligned(x)))
  37 #endif
  38 
  39 /******************************************************************************/
  40 //                     ALGORITHM DESCRIPTION - TAN()
  41 //                     ---------------------
  42 //
  43 // Polynomials coefficients and other constants.
  44 //
  45 // Note that in this algorithm, there is a different polynomial for
  46 // each breakpoint, so there are 32 sets of polynomial coefficients
  47 // as well as 32 instances of the other constants.
  48 //
  49 // The polynomial coefficients and constants are offset from the start
  50 // of the main block as follows:
  51 //
  52 //   0:  c8 | c0
  53 //  16:  c9 | c1
  54 //  32: c10 | c2
  55 //  48: c11 | c3
  56 //  64: c12 | c4
  57 //  80: c13 | c5
  58 //  96: c14 | c6
  59 // 112: c15 | c7
  60 // 128: T_hi
  61 // 136: T_lo
  62 // 144: Sigma
  63 // 152: T_hl
  64 // 160: Tau
  65 // 168: Mask
  66 // 176: (end of block)
  67 //
  68 // The total table size is therefore 5632 bytes.
  69 //
  70 // Note that c0 and c1 are always zero. We could try storing
  71 // other constants here, and just loading the low part of the
  72 // SIMD register in these cases, after ensuring the high part
  73 // is zero.
  74 //
  75 // The higher terms of the polynomial are computed in the *low*
  76 // part of the SIMD register. This is so we can overlap the
  77 // multiplication by r^8 and the unpacking of the other part.
  78 //
  79 // The constants are:
  80 // T_hi + T_lo = accurate constant term in power series
  81 // Sigma + T_hl = accurate coefficient of r in power series (Sigma=1 bit)
  82 // Tau = multiplier for the reciprocal, always -1 or 0
  83 //
  84 // The basic reconstruction formula using these constants is:
  85 //
  86 // High = tau * recip_hi + t_hi
  87 // Med = (sgn * r + t_hl * r)_hi
  88 // Low = (sgn * r + t_hl * r)_lo +
  89 //       tau * recip_lo + T_lo + (T_hl + sigma) * c + pol
  90 //
  91 // where pol = c0 + c1 * r + c2 * r^2 + ... + c15 * r^15
  92 //
  93 // (c0 = c1 = 0, but using them keeps SIMD regularity)
  94 //
  95 // We then do a compensated sum High + Med, add the low parts together
  96 // and then do the final sum.
  97 //
  98 // Here recip_hi + recip_lo is an accurate reciprocal of the remainder
  99 // modulo pi/2
 100 //
 101 // Special cases:
 102 //  tan(NaN) = quiet NaN, and raise invalid exception
 103 //  tan(INF) = NaN and raise invalid exception
 104 //  tan(+/-0) = +/-0
 105 //
 106 /******************************************************************************/
 107 
 108 #ifdef _LP64
 109 // The 64 bit code is at most SSE2 compliant
 110 ALIGNED_(16) juint _ONEHALF_tan[] =
 111 {
 112     0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
 113 };
 114 
 115 ALIGNED_(16) juint _MUL16[] =
 116 {
 117     0x00000000UL, 0x40300000UL, 0x00000000UL, 0x3ff00000UL
 118 };
 119 
 120 ALIGNED_(16) juint _sign_mask_tan[] =
 121 {
 122     0x00000000UL, 0x80000000UL, 0x00000000UL, 0x80000000UL
 123 };
 124 
 125 ALIGNED_(16) juint _PI32INV_tan[] =
 126 {
 127     0x6dc9c883UL, 0x3fe45f30UL, 0x6dc9c883UL, 0x40245f30UL
 128 };
 129 
 130 ALIGNED_(16) juint _P_1_tan[] =
 131 {
 132     0x54444000UL, 0x3fb921fbUL, 0x54440000UL, 0x3fb921fbUL
 133 };
 134 
 135 ALIGNED_(16) juint _P_2_tan[] =
 136 {
 137     0x67674000UL, 0xbd32e7b9UL, 0x4c4c0000UL, 0x3d468c23UL
 138 };
 139 
 140 ALIGNED_(16) juint _P_3_tan[] =
 141 {
 142     0x3707344aUL, 0x3aa8a2e0UL, 0x03707345UL, 0x3ae98a2eUL
 143 };
 144 
 145 ALIGNED_(16) juint _Ctable_tan[] =
 146 {
 147     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x882c10faUL,
 148     0x3f9664f4UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
 149     0x00000000UL, 0x00000000UL, 0x55e6c23dUL, 0x3f8226e3UL, 0x55555555UL,
 150     0x3fd55555UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
 151     0x0e157de0UL, 0x3f6d6d3dUL, 0x11111111UL, 0x3fc11111UL, 0x00000000UL,
 152     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x452b75e3UL, 0x3f57da36UL,
 153     0x1ba1ba1cUL, 0x3faba1baUL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
 154     0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL,
 155     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x4e435f9bUL,
 156     0x3f953f83UL, 0x00000000UL, 0x00000000UL, 0x3c6e8e46UL, 0x3f9b74eaUL,
 157     0x00000000UL, 0x00000000UL, 0xda5b7511UL, 0x3f85ad63UL, 0xdc230b9bUL,
 158     0x3fb97558UL, 0x26cb3788UL, 0x3f881308UL, 0x76fc4985UL, 0x3fd62ac9UL,
 159     0x77bb08baUL, 0x3f757c85UL, 0xb6247521UL, 0x3fb1381eUL, 0x5922170cUL,
 160     0x3f754e95UL, 0x8746482dUL, 0x3fc27f83UL, 0x11055b30UL, 0x3f64e391UL,
 161     0x3e666320UL, 0x3fa3e609UL, 0x0de9dae3UL, 0x3f6301dfUL, 0x1f1dca06UL,
 162     0x3fafa8aeUL, 0x8c5b2da2UL, 0x3fb936bbUL, 0x4e88f7a5UL, 0x3c587d05UL,
 163     0x00000000UL, 0x3ff00000UL, 0xa8935dd9UL, 0x3f83dde2UL, 0x00000000UL,
 164     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x5a279ea3UL, 0x3faa3407UL,
 165     0x00000000UL, 0x00000000UL, 0x432d65faUL, 0x3fa70153UL, 0x00000000UL,
 166     0x00000000UL, 0x891a4602UL, 0x3f9d03efUL, 0xd62ca5f8UL, 0x3fca77d9UL,
 167     0xb35f4628UL, 0x3f97a265UL, 0x433258faUL, 0x3fd8cf51UL, 0xb58fd909UL,
 168     0x3f8f88e3UL, 0x01771ceaUL, 0x3fc2b154UL, 0xf3562f8eUL, 0x3f888f57UL,
 169     0xc028a723UL, 0x3fc7370fUL, 0x20b7f9f0UL, 0x3f80f44cUL, 0x214368e9UL,
 170     0x3fb6dfaaUL, 0x28891863UL, 0x3f79b4b6UL, 0x172dbbf0UL, 0x3fb6cb8eUL,
 171     0xe0553158UL, 0x3fc975f5UL, 0x593fe814UL, 0x3c2ef5d3UL, 0x00000000UL,
 172     0x3ff00000UL, 0x03dec550UL, 0x3fa44203UL, 0x00000000UL, 0x00000000UL,
 173     0x00000000UL, 0x00000000UL, 0x9314533eUL, 0x3fbb8ec5UL, 0x00000000UL,
 174     0x00000000UL, 0x09aa36d0UL, 0x3fb6d3f4UL, 0x00000000UL, 0x00000000UL,
 175     0xdcb427fdUL, 0x3fb13950UL, 0xd87ab0bbUL, 0x3fd5335eUL, 0xce0ae8a5UL,
 176     0x3fabb382UL, 0x79143126UL, 0x3fddba41UL, 0x5f2b28d4UL, 0x3fa552f1UL,
 177     0x59f21a6dUL, 0x3fd015abUL, 0x22c27d95UL, 0x3fa0e984UL, 0xe19fc6aaUL,
 178     0x3fd0576cUL, 0x8f2c2950UL, 0x3f9a4898UL, 0xc0b3f22cUL, 0x3fc59462UL,
 179     0x1883a4b8UL, 0x3f94b61cUL, 0x3f838640UL, 0x3fc30eb8UL, 0x355c63dcUL,
 180     0x3fd36a08UL, 0x1dce993dUL, 0xbc6d704dUL, 0x00000000UL, 0x3ff00000UL,
 181     0x2b82ab63UL, 0x3fb78e92UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
 182     0x00000000UL, 0x56f37042UL, 0x3fccfc56UL, 0x00000000UL, 0x00000000UL,
 183     0xaa563951UL, 0x3fc90125UL, 0x00000000UL, 0x00000000UL, 0x3d0e7c5dUL,
 184     0x3fc50533UL, 0x9bed9b2eUL, 0x3fdf0ed9UL, 0x5fe7c47cUL, 0x3fc1f250UL,
 185     0x96c125e5UL, 0x3fe2edd9UL, 0x5a02bbd8UL, 0x3fbe5c71UL, 0x86362c20UL,
 186     0x3fda08b7UL, 0x4b4435edUL, 0x3fb9d342UL, 0x4b494091UL, 0x3fd911bdUL,
 187     0xb56658beUL, 0x3fb5e4c7UL, 0x93a2fd76UL, 0x3fd3c092UL, 0xda271794UL,
 188     0x3fb29910UL, 0x3303df2bUL, 0x3fd189beUL, 0x99fcef32UL, 0x3fda8279UL,
 189     0xb68c1467UL, 0x3c708b2fUL, 0x00000000UL, 0x3ff00000UL, 0x980c4337UL,
 190     0x3fc5f619UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
 191     0xcc03e501UL, 0x3fdff10fUL, 0x00000000UL, 0x00000000UL, 0x44a4e845UL,
 192     0x3fddb63bUL, 0x00000000UL, 0x00000000UL, 0x3768ad9fUL, 0x3fdb72a4UL,
 193     0x3dd01ccaUL, 0x3fe5fdb9UL, 0xa61d2811UL, 0x3fd972b2UL, 0x5645ad0bUL,
 194     0x3fe977f9UL, 0xd013b3abUL, 0x3fd78ca3UL, 0xbf0bf914UL, 0x3fe4f192UL,
 195     0x4d53e730UL, 0x3fd5d060UL, 0x3f8b9000UL, 0x3fe49933UL, 0xe2b82f08UL,
 196     0x3fd4322aUL, 0x5936a835UL, 0x3fe27ae1UL, 0xb1c61c9bUL, 0x3fd2b3fbUL,
 197     0xef478605UL, 0x3fe1659eUL, 0x190834ecUL, 0x3fe11ab7UL, 0xcdb625eaUL,
 198     0xbc8e564bUL, 0x00000000UL, 0x3ff00000UL, 0xb07217e3UL, 0x3fd248f1UL,
 199     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x2b2c49d0UL,
 200     0x3ff2de9cUL, 0x00000000UL, 0x00000000UL, 0x2655bc98UL, 0x3ff33e58UL,
 201     0x00000000UL, 0x00000000UL, 0xff691fa2UL, 0x3ff3972eUL, 0xe93463bdUL,
 202     0x3feeed87UL, 0x070e10a0UL, 0x3ff3f5b2UL, 0xf4d790a4UL, 0x3ff20c10UL,
 203     0xa04e8ea3UL, 0x3ff4541aUL, 0x386accd3UL, 0x3ff1369eUL, 0x222a66ddUL,
 204     0x3ff4b521UL, 0x22a9777eUL, 0x3ff20817UL, 0x52a04a6eUL, 0x3ff5178fUL,
 205     0xddaa0031UL, 0x3ff22137UL, 0x4447d47cUL, 0x3ff57c01UL, 0x1e9c7f1dUL,
 206     0x3ff29311UL, 0x2ab7f990UL, 0x3fe561b8UL, 0x209c7df1UL, 0x3c87a8c5UL,
 207     0x00000000UL, 0x3ff00000UL, 0x4170bcc6UL, 0x3fdc92d8UL, 0x00000000UL,
 208     0x00000000UL, 0x00000000UL, 0x00000000UL, 0xc7ab4d5aUL, 0x40085e24UL,
 209     0x00000000UL, 0x00000000UL, 0xe93ea75dUL, 0x400b963dUL, 0x00000000UL,
 210     0x00000000UL, 0x94a7f25aUL, 0x400f37e2UL, 0x4b6261cbUL, 0x3ff5f984UL,
 211     0x5a9dd812UL, 0x4011aab0UL, 0x74c30018UL, 0x3ffaf5a5UL, 0x7f2ce8e3UL,
 212     0x4013fe8bUL, 0xfe8e54faUL, 0x3ffd7334UL, 0x670d618dUL, 0x4016a10cUL,
 213     0x4db97058UL, 0x4000e012UL, 0x24df44ddUL, 0x40199c5fUL, 0x697d6eceUL,
 214     0x4003006eUL, 0x83298b82UL, 0x401cfc4dUL, 0x19d490d6UL, 0x40058c19UL,
 215     0x2ae42850UL, 0x3fea4300UL, 0x118e20e6UL, 0xbc7a6db8UL, 0x00000000UL,
 216     0x40000000UL, 0xe33345b8UL, 0xbfd4e526UL, 0x00000000UL, 0x00000000UL,
 217     0x00000000UL, 0x00000000UL, 0x65965966UL, 0x40219659UL, 0x00000000UL,
 218     0x00000000UL, 0x882c10faUL, 0x402664f4UL, 0x00000000UL, 0x00000000UL,
 219     0x83cd3723UL, 0x402c8342UL, 0x00000000UL, 0x40000000UL, 0x55e6c23dUL,
 220     0x403226e3UL, 0x55555555UL, 0x40055555UL, 0x34451939UL, 0x40371c96UL,
 221     0xaaaaaaabUL, 0x400aaaaaUL, 0x0e157de0UL, 0x403d6d3dUL, 0x11111111UL,
 222     0x40111111UL, 0xa738201fUL, 0x4042bbceUL, 0x05b05b06UL, 0x4015b05bUL,
 223     0x452b75e3UL, 0x4047da36UL, 0x1ba1ba1cUL, 0x401ba1baUL, 0x00000000UL,
 224     0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x40000000UL,
 225     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
 226     0x00000000UL, 0x4f48b8d3UL, 0xbf33eaf9UL, 0x00000000UL, 0x00000000UL,
 227     0x0cf7586fUL, 0x3f20b8eaUL, 0x00000000UL, 0x00000000UL, 0xd0258911UL,
 228     0xbf0abaf3UL, 0x23e49fe9UL, 0xbfab5a8cUL, 0x2d53222eUL, 0x3ef60d15UL,
 229     0x21169451UL, 0x3fa172b2UL, 0xbb254dbcUL, 0xbee1d3b5UL, 0xdbf93b8eUL,
 230     0xbf84c7dbUL, 0x05b4630bUL, 0x3ecd3364UL, 0xee9aada7UL, 0x3f743924UL,
 231     0x794a8297UL, 0xbeb7b7b9UL, 0xe015f797UL, 0xbf5d41f5UL, 0xe41a4a56UL,
 232     0x3ea35dfbUL, 0xe4c2a251UL, 0x3f49a2abUL, 0x5af9e000UL, 0xbfce49ceUL,
 233     0x8c743719UL, 0x3d1eb860UL, 0x00000000UL, 0x00000000UL, 0x1b4863cfUL,
 234     0x3fd78294UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL,
 235     0x535ad890UL, 0xbf2b9320UL, 0x00000000UL, 0x00000000UL, 0x018fdf1fUL,
 236     0x3f16d61dUL, 0x00000000UL, 0x00000000UL, 0x0359f1beUL, 0xbf0139e4UL,
 237     0xa4317c6dUL, 0xbfa67e17UL, 0x82672d0fUL, 0x3eebb405UL, 0x2f1b621eUL,
 238     0x3f9f455bUL, 0x51ccf238UL, 0xbed55317UL, 0xf437b9acUL, 0xbf804beeUL,
 239     0xc791a2b5UL, 0x3ec0e993UL, 0x919a1db2UL, 0x3f7080c2UL, 0x336a5b0eUL,
 240     0xbeaa48a2UL, 0x0a268358UL, 0xbf55a443UL, 0xdfd978e4UL, 0x3e94b61fUL,
 241     0xd7767a58UL, 0x3f431806UL, 0x2aea0000UL, 0xbfc9bbe8UL, 0x7723ea61UL,
 242     0xbd3a2369UL, 0x00000000UL, 0x00000000UL, 0xdf7796ffUL, 0x3fd6e642UL,
 243     0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0xb9ff07ceUL,
 244     0xbf231c78UL, 0x00000000UL, 0x00000000UL, 0xa5517182UL, 0x3f0ff0e0UL,
 245     0x00000000UL, 0x00000000UL, 0x790b4cbcUL, 0xbef66191UL, 0x848a46c6UL,
 246     0xbfa21ac0UL, 0xb16435faUL, 0x3ee1d3ecUL, 0x2a1aa832UL, 0x3f9c71eaUL,
 247     0xfdd299efUL, 0xbec9dd1aUL, 0x3f8dbaafUL, 0xbf793363UL, 0x309fc6eaUL,
 248     0x3eb415d6UL, 0xbee60471UL, 0x3f6b83baUL, 0x94a0a697UL, 0xbe9dae11UL,
 249     0x3e5c67b3UL, 0xbf4fd07bUL, 0x9a8f3e3eUL, 0x3e86bd75UL, 0xa4beb7a4UL,
 250     0x3f3d1eb1UL, 0x29cfc000UL, 0xbfc549ceUL, 0xbf159358UL, 0xbd397b33UL,
 251     0x00000000UL, 0x00000000UL, 0x871fee6cUL, 0x3fd666f0UL, 0x00000000UL,
 252     0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x7d98a556UL, 0xbf1a3958UL,
 253     0x00000000UL, 0x00000000UL, 0x9d88dc01UL, 0x3f0704c2UL, 0x00000000UL,
 254     0x00000000UL, 0x73742a2bUL, 0xbeed054aUL, 0x58844587UL, 0xbf9c2a13UL,
 255     0x55688a79UL, 0x3ed7a326UL, 0xee33f1d6UL, 0x3f9a48f4UL, 0xa8dc9888UL,
 256     0xbebf8939UL, 0xaad4b5b8UL, 0xbf72f746UL, 0x9102efa1UL, 0x3ea88f82UL,
 257     0xdabc29cfUL, 0x3f678228UL, 0x9289afb8UL, 0xbe90f456UL, 0x741fb4edUL,
 258     0xbf46f3a3UL, 0xa97f6663UL, 0x3e79b4bfUL, 0xca89ff3fUL, 0x3f36db70UL,
 259     0xa8a2a000UL, 0xbfc0ee13UL, 0x3da24be1UL, 0xbd338b9fUL, 0x00000000UL,
 260     0x00000000UL, 0x11cd6c69UL, 0x3fd601fdUL, 0x00000000UL, 0x3ff00000UL,
 261     0x00000000UL, 0xfffffff8UL, 0x1a154b97UL, 0xbf116b01UL, 0x00000000UL,
 262     0x00000000UL, 0x2d427630UL, 0x3f0147bfUL, 0x00000000UL, 0x00000000UL,
 263     0xb93820c8UL, 0xbee264d4UL, 0xbb6cbb18UL, 0xbf94ab8cUL, 0x888d4d92UL,
 264     0x3ed0568bUL, 0x60730f7cUL, 0x3f98b19bUL, 0xe4b1fb11UL, 0xbeb2f950UL,
 265     0x22cf9f74UL, 0xbf6b21cdUL, 0x4a3ff0a6UL, 0x3e9f499eUL, 0xfd2b83ceUL,
 266     0x3f64aad7UL, 0x637b73afUL, 0xbe83487cUL, 0xe522591aUL, 0xbf3fc092UL,
 267     0xa158e8bcUL, 0x3e6e3aaeUL, 0xe5e82ffaUL, 0x3f329d2fUL, 0xd636a000UL,
 268     0xbfb9477fUL, 0xc2c2d2bcUL, 0xbd135ef9UL, 0x00000000UL, 0x00000000UL,
 269     0xf2fdb123UL, 0x3fd5b566UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL,
 270     0xfffffff8UL, 0xc41acb64UL, 0xbf05448dUL, 0x00000000UL, 0x00000000UL,
 271     0xdbb03d6fUL, 0x3efb7ad2UL, 0x00000000UL, 0x00000000UL, 0x9e42962dUL,
 272     0xbed5aea5UL, 0x2579f8efUL, 0xbf8b2398UL, 0x288a1ed9UL, 0x3ec81441UL,
 273     0xb0198dc5UL, 0x3f979a3aUL, 0x2fdfe253UL, 0xbea57cd3UL, 0x5766336fUL,
 274     0xbf617caaUL, 0x600944c3UL, 0x3e954ed6UL, 0xa4e0aaf8UL, 0x3f62c646UL,
 275     0x6b8fb29cUL, 0xbe74e3a3UL, 0xdc4c0409UL, 0xbf33f952UL, 0x9bffe365UL,
 276     0x3e6301ecUL, 0xb8869e44UL, 0x3f2fc566UL, 0xe1e04000UL, 0xbfb0cc62UL,
 277     0x016b907fUL, 0xbd119cbcUL, 0x00000000UL, 0x00000000UL, 0xe6b9d8faUL,
 278     0x3fd57fb3UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL,
 279     0x5daf22a6UL, 0xbef429d7UL, 0x00000000UL, 0x00000000UL, 0x06bca545UL,
 280     0x3ef7a27dUL, 0x00000000UL, 0x00000000UL, 0x7211c19aUL, 0xbec41c3eUL,
 281     0x956ed53eUL, 0xbf7ae3f4UL, 0xee750e72UL, 0x3ec3901bUL, 0x91d443f5UL,
 282     0x3f96f713UL, 0x36661e6cUL, 0xbe936e09UL, 0x506f9381UL, 0xbf5122e8UL,
 283     0xcb6dd43fUL, 0x3e9041b9UL, 0x6698b2ffUL, 0x3f61b0c7UL, 0x576bf12bUL,
 284     0xbe625a8aUL, 0xe5a0e9dcUL, 0xbf23499dUL, 0x110384ddUL, 0x3e5b1c2cUL,
 285     0x68d43db6UL, 0x3f2cb899UL, 0x6ecac000UL, 0xbfa0c414UL, 0xcd7dd58cUL,
 286     0x3d13500fUL, 0x00000000UL, 0x00000000UL, 0x85a2c8fbUL, 0x3fd55fe0UL,
 287     0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x00000000UL,
 288     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x2bf70ebeUL, 0x3ef66a8fUL,
 289     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
 290     0x00000000UL, 0xd644267fUL, 0x3ec22805UL, 0x16c16c17UL, 0x3f96c16cUL,
 291     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0xc4e09162UL,
 292     0x3e8d6db2UL, 0xbc011567UL, 0x3f61566aUL, 0x00000000UL, 0x00000000UL,
 293     0x00000000UL, 0x00000000UL, 0x1f79955cUL, 0x3e57da4eUL, 0x9334ef0bUL,
 294     0x3f2bbd77UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
 295     0x00000000UL, 0x00000000UL, 0x55555555UL, 0x3fd55555UL, 0x00000000UL,
 296     0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x5daf22a6UL, 0x3ef429d7UL,
 297     0x00000000UL, 0x00000000UL, 0x06bca545UL, 0x3ef7a27dUL, 0x00000000UL,
 298     0x00000000UL, 0x7211c19aUL, 0x3ec41c3eUL, 0x956ed53eUL, 0x3f7ae3f4UL,
 299     0xee750e72UL, 0x3ec3901bUL, 0x91d443f5UL, 0x3f96f713UL, 0x36661e6cUL,
 300     0x3e936e09UL, 0x506f9381UL, 0x3f5122e8UL, 0xcb6dd43fUL, 0x3e9041b9UL,
 301     0x6698b2ffUL, 0x3f61b0c7UL, 0x576bf12bUL, 0x3e625a8aUL, 0xe5a0e9dcUL,
 302     0x3f23499dUL, 0x110384ddUL, 0x3e5b1c2cUL, 0x68d43db6UL, 0x3f2cb899UL,
 303     0x6ecac000UL, 0x3fa0c414UL, 0xcd7dd58cUL, 0xbd13500fUL, 0x00000000UL,
 304     0x00000000UL, 0x85a2c8fbUL, 0x3fd55fe0UL, 0x00000000UL, 0x3ff00000UL,
 305     0x00000000UL, 0xfffffff8UL, 0xc41acb64UL, 0x3f05448dUL, 0x00000000UL,
 306     0x00000000UL, 0xdbb03d6fUL, 0x3efb7ad2UL, 0x00000000UL, 0x00000000UL,
 307     0x9e42962dUL, 0x3ed5aea5UL, 0x2579f8efUL, 0x3f8b2398UL, 0x288a1ed9UL,
 308     0x3ec81441UL, 0xb0198dc5UL, 0x3f979a3aUL, 0x2fdfe253UL, 0x3ea57cd3UL,
 309     0x5766336fUL, 0x3f617caaUL, 0x600944c3UL, 0x3e954ed6UL, 0xa4e0aaf8UL,
 310     0x3f62c646UL, 0x6b8fb29cUL, 0x3e74e3a3UL, 0xdc4c0409UL, 0x3f33f952UL,
 311     0x9bffe365UL, 0x3e6301ecUL, 0xb8869e44UL, 0x3f2fc566UL, 0xe1e04000UL,
 312     0x3fb0cc62UL, 0x016b907fUL, 0x3d119cbcUL, 0x00000000UL, 0x00000000UL,
 313     0xe6b9d8faUL, 0x3fd57fb3UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL,
 314     0xfffffff8UL, 0x1a154b97UL, 0x3f116b01UL, 0x00000000UL, 0x00000000UL,
 315     0x2d427630UL, 0x3f0147bfUL, 0x00000000UL, 0x00000000UL, 0xb93820c8UL,
 316     0x3ee264d4UL, 0xbb6cbb18UL, 0x3f94ab8cUL, 0x888d4d92UL, 0x3ed0568bUL,
 317     0x60730f7cUL, 0x3f98b19bUL, 0xe4b1fb11UL, 0x3eb2f950UL, 0x22cf9f74UL,
 318     0x3f6b21cdUL, 0x4a3ff0a6UL, 0x3e9f499eUL, 0xfd2b83ceUL, 0x3f64aad7UL,
 319     0x637b73afUL, 0x3e83487cUL, 0xe522591aUL, 0x3f3fc092UL, 0xa158e8bcUL,
 320     0x3e6e3aaeUL, 0xe5e82ffaUL, 0x3f329d2fUL, 0xd636a000UL, 0x3fb9477fUL,
 321     0xc2c2d2bcUL, 0x3d135ef9UL, 0x00000000UL, 0x00000000UL, 0xf2fdb123UL,
 322     0x3fd5b566UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL,
 323     0x7d98a556UL, 0x3f1a3958UL, 0x00000000UL, 0x00000000UL, 0x9d88dc01UL,
 324     0x3f0704c2UL, 0x00000000UL, 0x00000000UL, 0x73742a2bUL, 0x3eed054aUL,
 325     0x58844587UL, 0x3f9c2a13UL, 0x55688a79UL, 0x3ed7a326UL, 0xee33f1d6UL,
 326     0x3f9a48f4UL, 0xa8dc9888UL, 0x3ebf8939UL, 0xaad4b5b8UL, 0x3f72f746UL,
 327     0x9102efa1UL, 0x3ea88f82UL, 0xdabc29cfUL, 0x3f678228UL, 0x9289afb8UL,
 328     0x3e90f456UL, 0x741fb4edUL, 0x3f46f3a3UL, 0xa97f6663UL, 0x3e79b4bfUL,
 329     0xca89ff3fUL, 0x3f36db70UL, 0xa8a2a000UL, 0x3fc0ee13UL, 0x3da24be1UL,
 330     0x3d338b9fUL, 0x00000000UL, 0x00000000UL, 0x11cd6c69UL, 0x3fd601fdUL,
 331     0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0xb9ff07ceUL,
 332     0x3f231c78UL, 0x00000000UL, 0x00000000UL, 0xa5517182UL, 0x3f0ff0e0UL,
 333     0x00000000UL, 0x00000000UL, 0x790b4cbcUL, 0x3ef66191UL, 0x848a46c6UL,
 334     0x3fa21ac0UL, 0xb16435faUL, 0x3ee1d3ecUL, 0x2a1aa832UL, 0x3f9c71eaUL,
 335     0xfdd299efUL, 0x3ec9dd1aUL, 0x3f8dbaafUL, 0x3f793363UL, 0x309fc6eaUL,
 336     0x3eb415d6UL, 0xbee60471UL, 0x3f6b83baUL, 0x94a0a697UL, 0x3e9dae11UL,
 337     0x3e5c67b3UL, 0x3f4fd07bUL, 0x9a8f3e3eUL, 0x3e86bd75UL, 0xa4beb7a4UL,
 338     0x3f3d1eb1UL, 0x29cfc000UL, 0x3fc549ceUL, 0xbf159358UL, 0x3d397b33UL,
 339     0x00000000UL, 0x00000000UL, 0x871fee6cUL, 0x3fd666f0UL, 0x00000000UL,
 340     0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x535ad890UL, 0x3f2b9320UL,
 341     0x00000000UL, 0x00000000UL, 0x018fdf1fUL, 0x3f16d61dUL, 0x00000000UL,
 342     0x00000000UL, 0x0359f1beUL, 0x3f0139e4UL, 0xa4317c6dUL, 0x3fa67e17UL,
 343     0x82672d0fUL, 0x3eebb405UL, 0x2f1b621eUL, 0x3f9f455bUL, 0x51ccf238UL,
 344     0x3ed55317UL, 0xf437b9acUL, 0x3f804beeUL, 0xc791a2b5UL, 0x3ec0e993UL,
 345     0x919a1db2UL, 0x3f7080c2UL, 0x336a5b0eUL, 0x3eaa48a2UL, 0x0a268358UL,
 346     0x3f55a443UL, 0xdfd978e4UL, 0x3e94b61fUL, 0xd7767a58UL, 0x3f431806UL,
 347     0x2aea0000UL, 0x3fc9bbe8UL, 0x7723ea61UL, 0x3d3a2369UL, 0x00000000UL,
 348     0x00000000UL, 0xdf7796ffUL, 0x3fd6e642UL, 0x00000000UL, 0x3ff00000UL,
 349     0x00000000UL, 0xfffffff8UL, 0x4f48b8d3UL, 0x3f33eaf9UL, 0x00000000UL,
 350     0x00000000UL, 0x0cf7586fUL, 0x3f20b8eaUL, 0x00000000UL, 0x00000000UL,
 351     0xd0258911UL, 0x3f0abaf3UL, 0x23e49fe9UL, 0x3fab5a8cUL, 0x2d53222eUL,
 352     0x3ef60d15UL, 0x21169451UL, 0x3fa172b2UL, 0xbb254dbcUL, 0x3ee1d3b5UL,
 353     0xdbf93b8eUL, 0x3f84c7dbUL, 0x05b4630bUL, 0x3ecd3364UL, 0xee9aada7UL,
 354     0x3f743924UL, 0x794a8297UL, 0x3eb7b7b9UL, 0xe015f797UL, 0x3f5d41f5UL,
 355     0xe41a4a56UL, 0x3ea35dfbUL, 0xe4c2a251UL, 0x3f49a2abUL, 0x5af9e000UL,
 356     0x3fce49ceUL, 0x8c743719UL, 0xbd1eb860UL, 0x00000000UL, 0x00000000UL,
 357     0x1b4863cfUL, 0x3fd78294UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL,
 358     0xfffffff8UL, 0x65965966UL, 0xc0219659UL, 0x00000000UL, 0x00000000UL,
 359     0x882c10faUL, 0x402664f4UL, 0x00000000UL, 0x00000000UL, 0x83cd3723UL,
 360     0xc02c8342UL, 0x00000000UL, 0xc0000000UL, 0x55e6c23dUL, 0x403226e3UL,
 361     0x55555555UL, 0x40055555UL, 0x34451939UL, 0xc0371c96UL, 0xaaaaaaabUL,
 362     0xc00aaaaaUL, 0x0e157de0UL, 0x403d6d3dUL, 0x11111111UL, 0x40111111UL,
 363     0xa738201fUL, 0xc042bbceUL, 0x05b05b06UL, 0xc015b05bUL, 0x452b75e3UL,
 364     0x4047da36UL, 0x1ba1ba1cUL, 0x401ba1baUL, 0x00000000UL, 0xbff00000UL,
 365     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x40000000UL, 0x00000000UL,
 366     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
 367     0xc7ab4d5aUL, 0xc0085e24UL, 0x00000000UL, 0x00000000UL, 0xe93ea75dUL,
 368     0x400b963dUL, 0x00000000UL, 0x00000000UL, 0x94a7f25aUL, 0xc00f37e2UL,
 369     0x4b6261cbUL, 0xbff5f984UL, 0x5a9dd812UL, 0x4011aab0UL, 0x74c30018UL,
 370     0x3ffaf5a5UL, 0x7f2ce8e3UL, 0xc013fe8bUL, 0xfe8e54faUL, 0xbffd7334UL,
 371     0x670d618dUL, 0x4016a10cUL, 0x4db97058UL, 0x4000e012UL, 0x24df44ddUL,
 372     0xc0199c5fUL, 0x697d6eceUL, 0xc003006eUL, 0x83298b82UL, 0x401cfc4dUL,
 373     0x19d490d6UL, 0x40058c19UL, 0x2ae42850UL, 0xbfea4300UL, 0x118e20e6UL,
 374     0x3c7a6db8UL, 0x00000000UL, 0x40000000UL, 0xe33345b8UL, 0xbfd4e526UL,
 375     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x2b2c49d0UL,
 376     0xbff2de9cUL, 0x00000000UL, 0x00000000UL, 0x2655bc98UL, 0x3ff33e58UL,
 377     0x00000000UL, 0x00000000UL, 0xff691fa2UL, 0xbff3972eUL, 0xe93463bdUL,
 378     0xbfeeed87UL, 0x070e10a0UL, 0x3ff3f5b2UL, 0xf4d790a4UL, 0x3ff20c10UL,
 379     0xa04e8ea3UL, 0xbff4541aUL, 0x386accd3UL, 0xbff1369eUL, 0x222a66ddUL,
 380     0x3ff4b521UL, 0x22a9777eUL, 0x3ff20817UL, 0x52a04a6eUL, 0xbff5178fUL,
 381     0xddaa0031UL, 0xbff22137UL, 0x4447d47cUL, 0x3ff57c01UL, 0x1e9c7f1dUL,
 382     0x3ff29311UL, 0x2ab7f990UL, 0xbfe561b8UL, 0x209c7df1UL, 0xbc87a8c5UL,
 383     0x00000000UL, 0x3ff00000UL, 0x4170bcc6UL, 0x3fdc92d8UL, 0x00000000UL,
 384     0x00000000UL, 0x00000000UL, 0x00000000UL, 0xcc03e501UL, 0xbfdff10fUL,
 385     0x00000000UL, 0x00000000UL, 0x44a4e845UL, 0x3fddb63bUL, 0x00000000UL,
 386     0x00000000UL, 0x3768ad9fUL, 0xbfdb72a4UL, 0x3dd01ccaUL, 0xbfe5fdb9UL,
 387     0xa61d2811UL, 0x3fd972b2UL, 0x5645ad0bUL, 0x3fe977f9UL, 0xd013b3abUL,
 388     0xbfd78ca3UL, 0xbf0bf914UL, 0xbfe4f192UL, 0x4d53e730UL, 0x3fd5d060UL,
 389     0x3f8b9000UL, 0x3fe49933UL, 0xe2b82f08UL, 0xbfd4322aUL, 0x5936a835UL,
 390     0xbfe27ae1UL, 0xb1c61c9bUL, 0x3fd2b3fbUL, 0xef478605UL, 0x3fe1659eUL,
 391     0x190834ecUL, 0xbfe11ab7UL, 0xcdb625eaUL, 0x3c8e564bUL, 0x00000000UL,
 392     0x3ff00000UL, 0xb07217e3UL, 0x3fd248f1UL, 0x00000000UL, 0x00000000UL,
 393     0x00000000UL, 0x00000000UL, 0x56f37042UL, 0xbfccfc56UL, 0x00000000UL,
 394     0x00000000UL, 0xaa563951UL, 0x3fc90125UL, 0x00000000UL, 0x00000000UL,
 395     0x3d0e7c5dUL, 0xbfc50533UL, 0x9bed9b2eUL, 0xbfdf0ed9UL, 0x5fe7c47cUL,
 396     0x3fc1f250UL, 0x96c125e5UL, 0x3fe2edd9UL, 0x5a02bbd8UL, 0xbfbe5c71UL,
 397     0x86362c20UL, 0xbfda08b7UL, 0x4b4435edUL, 0x3fb9d342UL, 0x4b494091UL,
 398     0x3fd911bdUL, 0xb56658beUL, 0xbfb5e4c7UL, 0x93a2fd76UL, 0xbfd3c092UL,
 399     0xda271794UL, 0x3fb29910UL, 0x3303df2bUL, 0x3fd189beUL, 0x99fcef32UL,
 400     0xbfda8279UL, 0xb68c1467UL, 0xbc708b2fUL, 0x00000000UL, 0x3ff00000UL,
 401     0x980c4337UL, 0x3fc5f619UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
 402     0x00000000UL, 0x9314533eUL, 0xbfbb8ec5UL, 0x00000000UL, 0x00000000UL,
 403     0x09aa36d0UL, 0x3fb6d3f4UL, 0x00000000UL, 0x00000000UL, 0xdcb427fdUL,
 404     0xbfb13950UL, 0xd87ab0bbUL, 0xbfd5335eUL, 0xce0ae8a5UL, 0x3fabb382UL,
 405     0x79143126UL, 0x3fddba41UL, 0x5f2b28d4UL, 0xbfa552f1UL, 0x59f21a6dUL,
 406     0xbfd015abUL, 0x22c27d95UL, 0x3fa0e984UL, 0xe19fc6aaUL, 0x3fd0576cUL,
 407     0x8f2c2950UL, 0xbf9a4898UL, 0xc0b3f22cUL, 0xbfc59462UL, 0x1883a4b8UL,
 408     0x3f94b61cUL, 0x3f838640UL, 0x3fc30eb8UL, 0x355c63dcUL, 0xbfd36a08UL,
 409     0x1dce993dUL, 0x3c6d704dUL, 0x00000000UL, 0x3ff00000UL, 0x2b82ab63UL,
 410     0x3fb78e92UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
 411     0x5a279ea3UL, 0xbfaa3407UL, 0x00000000UL, 0x00000000UL, 0x432d65faUL,
 412     0x3fa70153UL, 0x00000000UL, 0x00000000UL, 0x891a4602UL, 0xbf9d03efUL,
 413     0xd62ca5f8UL, 0xbfca77d9UL, 0xb35f4628UL, 0x3f97a265UL, 0x433258faUL,
 414     0x3fd8cf51UL, 0xb58fd909UL, 0xbf8f88e3UL, 0x01771ceaUL, 0xbfc2b154UL,
 415     0xf3562f8eUL, 0x3f888f57UL, 0xc028a723UL, 0x3fc7370fUL, 0x20b7f9f0UL,
 416     0xbf80f44cUL, 0x214368e9UL, 0xbfb6dfaaUL, 0x28891863UL, 0x3f79b4b6UL,
 417     0x172dbbf0UL, 0x3fb6cb8eUL, 0xe0553158UL, 0xbfc975f5UL, 0x593fe814UL,
 418     0xbc2ef5d3UL, 0x00000000UL, 0x3ff00000UL, 0x03dec550UL, 0x3fa44203UL,
 419     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x4e435f9bUL,
 420     0xbf953f83UL, 0x00000000UL, 0x00000000UL, 0x3c6e8e46UL, 0x3f9b74eaUL,
 421     0x00000000UL, 0x00000000UL, 0xda5b7511UL, 0xbf85ad63UL, 0xdc230b9bUL,
 422     0xbfb97558UL, 0x26cb3788UL, 0x3f881308UL, 0x76fc4985UL, 0x3fd62ac9UL,
 423     0x77bb08baUL, 0xbf757c85UL, 0xb6247521UL, 0xbfb1381eUL, 0x5922170cUL,
 424     0x3f754e95UL, 0x8746482dUL, 0x3fc27f83UL, 0x11055b30UL, 0xbf64e391UL,
 425     0x3e666320UL, 0xbfa3e609UL, 0x0de9dae3UL, 0x3f6301dfUL, 0x1f1dca06UL,
 426     0x3fafa8aeUL, 0x8c5b2da2UL, 0xbfb936bbUL, 0x4e88f7a5UL, 0xbc587d05UL,
 427     0x00000000UL, 0x3ff00000UL, 0xa8935dd9UL, 0x3f83dde2UL, 0x00000000UL,
 428     0x00000000UL, 0x00000000UL, 0x00000000UL
 429 };
 430 
 431 ALIGNED_(16) juint _MASK_35_tan[] =
 432 {
 433     0xfffc0000UL, 0xffffffffUL, 0x00000000UL, 0x00000000UL
 434 };
 435 
 436 ALIGNED_(16) juint _Q_11_tan[] =
 437 {
 438     0xb8fe4d77UL, 0x3f82609aUL
 439 };
 440 
 441 ALIGNED_(16) juint _Q_9_tan[] =
 442 {
 443     0xbf847a43UL, 0x3f9664a0UL
 444 };
 445 
 446 ALIGNED_(16) juint _Q_7_tan[] =
 447 {
 448     0x52c4c8abUL, 0x3faba1baUL
 449 };
 450 
 451 ALIGNED_(16) juint _Q_5_tan[] =
 452 {
 453     0x11092746UL, 0x3fc11111UL
 454 };
 455 
 456 ALIGNED_(16) juint _Q_3_tan[] =
 457 {
 458     0x55555612UL, 0x3fd55555UL
 459 };
 460 
 461 ALIGNED_(16) juint _PI_INV_TABLE_tan[] =
 462 {
 463     0x00000000UL, 0x00000000UL, 0xa2f9836eUL, 0x4e441529UL, 0xfc2757d1UL,
 464     0xf534ddc0UL, 0xdb629599UL, 0x3c439041UL, 0xfe5163abUL, 0xdebbc561UL,
 465     0xb7246e3aUL, 0x424dd2e0UL, 0x06492eeaUL, 0x09d1921cUL, 0xfe1deb1cUL,
 466     0xb129a73eUL, 0xe88235f5UL, 0x2ebb4484UL, 0xe99c7026UL, 0xb45f7e41UL,
 467     0x3991d639UL, 0x835339f4UL, 0x9c845f8bUL, 0xbdf9283bUL, 0x1ff897ffUL,
 468     0xde05980fUL, 0xef2f118bUL, 0x5a0a6d1fUL, 0x6d367ecfUL, 0x27cb09b7UL,
 469     0x4f463f66UL, 0x9e5fea2dUL, 0x7527bac7UL, 0xebe5f17bUL, 0x3d0739f7UL,
 470     0x8a5292eaUL, 0x6bfb5fb1UL, 0x1f8d5d08UL, 0x56033046UL, 0xfc7b6babUL,
 471     0xf0cfbc21UL
 472 };
 473 
 474 ALIGNED_(8) juint _PI_4_tan[] =
 475 {
 476     0x00000000UL, 0x3fe921fbUL, 0x4611a626UL, 0x3e85110bUL
 477 };
 478 
 479 ALIGNED_(8) juint _QQ_2_tan[] =
 480 {
 481     0x676733afUL, 0x3d32e7b9UL
 482 };
 483 
 484 ALIGNED_(8) juint _ONE_tan[] =
 485 {
 486     0x00000000UL, 0x3ff00000UL
 487 };
 488 
 489 ALIGNED_(8) juint _TWO_POW_55_tan[] =
 490 {
 491     0x00000000UL, 0x43600000UL
 492 };
 493 
 494 ALIGNED_(4) juint _TWO_POW_M55_tan[] =
 495 {
 496     0x00000000UL, 0x3c800000UL
 497 };
 498 
 499 ALIGNED_(4) juint _NEG_ZERO_tan[] =
 500 {
 501     0x00000000UL, 0x80000000UL
 502 };
 503 
 504 void MacroAssembler::fast_tan(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) {
 505 
 506   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;
 507   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;
 508   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;
 509   Label L_2TAG_PACKET_12_0_1, L_2TAG_PACKET_13_0_1, L_2TAG_PACKET_14_0_1, B1_2, B1_3, B1_4, B1_5, start;
 510 
 511   address ONEHALF = (address)_ONEHALF_tan;
 512   address MUL16 = (address)_MUL16;
 513   address sign_mask = (address)_sign_mask_tan;
 514   address PI32INV = (address)_PI32INV_tan;
 515   address P_1 = (address)_P_1_tan;
 516   address P_2 = (address)_P_2_tan;
 517   address P_3 = (address)_P_3_tan;
 518   address Ctable = (address)_Ctable_tan;
 519   address MASK_35 = (address)_MASK_35_tan;
 520   address Q_11 = (address)_Q_11_tan;
 521   address Q_9 = (address)_Q_9_tan;
 522   address Q_7 = (address)_Q_7_tan;
 523   address Q_5 = (address)_Q_5_tan;
 524   address Q_3 = (address)_Q_3_tan;
 525   address PI_INV_TABLE = (address)_PI_INV_TABLE_tan;
 526   address PI_4 = (address)_PI_4_tan;
 527   address QQ_2 = (address)_QQ_2_tan;
 528   address ONE = (address)_ONE_tan;
 529   address TWO_POW_55 = (address)_TWO_POW_55_tan;
 530   address TWO_POW_M55 = (address)_TWO_POW_M55_tan;
 531   address NEG_ZERO = (address)_NEG_ZERO_tan;
 532 
 533   bind(start);
 534   push(rbx);
 535   subq(rsp, 16);
 536   movsd(Address(rsp, 8), xmm0);
 537 
 538   bind(B1_2);
 539   pextrw(eax, xmm0, 3);
 540   andl(eax, 32767);
 541   subl(eax, 16314);
 542   cmpl(eax, 270);
 543   jcc(Assembler::above, L_2TAG_PACKET_0_0_1);
 544   movdqu(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
 545   movdqu(xmm6, ExternalAddress(MUL16));    //0x00000000UL, 0x40300000UL, 0x00000000UL, 0x3ff00000UL
 546   unpcklpd(xmm0, xmm0);
 547   movdqu(xmm4, ExternalAddress(sign_mask));    //0x00000000UL, 0x80000000UL, 0x00000000UL, 0x80000000UL
 548   andpd(xmm4, xmm0);
 549   movdqu(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x3fe45f30UL, 0x6dc9c883UL, 0x40245f30UL
 550   mulpd(xmm1, xmm0);
 551   por(xmm5, xmm4);
 552   addpd(xmm1, xmm5);
 553   movdqu(xmm7, xmm1);
 554   unpckhpd(xmm7, xmm7);
 555   cvttsd2sil(edx, xmm7);
 556   cvttpd2dq(xmm1, xmm1);
 557   cvtdq2pd(xmm1, xmm1);
 558   mulpd(xmm1, xmm6);
 559   movdqu(xmm3, ExternalAddress(P_1));    //0x54444000UL, 0x3fb921fbUL, 0x54440000UL, 0x3fb921fbUL
 560   movq(xmm5, ExternalAddress(QQ_2));    //0x676733afUL, 0x3d32e7b9UL
 561   addq(rdx, 469248);
 562   movdqu(xmm4, ExternalAddress(P_2));    //0x67674000UL, 0xbd32e7b9UL, 0x4c4c0000UL, 0x3d468c23UL
 563   mulpd(xmm3, xmm1);
 564   andq(rdx, 31);
 565   mulsd(xmm5, xmm1);
 566   movq(rcx, rdx);
 567   mulpd(xmm4, xmm1);
 568   shlq(rcx, 1);
 569   subpd(xmm0, xmm3);
 570   mulpd(xmm1, ExternalAddress(P_3));    //0x3707344aUL, 0x3aa8a2e0UL, 0x03707345UL, 0x3ae98a2eUL
 571   addq(rdx, rcx);
 572   shlq(rcx, 2);
 573   addq(rdx, rcx);
 574   addsd(xmm5, xmm0);
 575   movdqu(xmm2, xmm0);
 576   subpd(xmm0, xmm4);
 577   movq(xmm6, ExternalAddress(ONE));    //0x00000000UL, 0x3ff00000UL
 578   shlq(rdx, 4);
 579   lea(rax, ExternalAddress(Ctable));
 580   andpd(xmm5, ExternalAddress(MASK_35));    //0xfffc0000UL, 0xffffffffUL, 0x00000000UL, 0x00000000UL
 581   movdqu(xmm3, xmm0);
 582   addq(rax, rdx);
 583   subpd(xmm2, xmm0);
 584   unpckhpd(xmm0, xmm0);
 585   divsd(xmm6, xmm5);
 586   subpd(xmm2, xmm4);
 587   movdqu(xmm7, Address(rax, 16));
 588   subsd(xmm3, xmm5);
 589   mulpd(xmm7, xmm0);
 590   subpd(xmm2, xmm1);
 591   movdqu(xmm1, Address(rax, 48));
 592   mulpd(xmm1, xmm0);
 593   movdqu(xmm4, Address(rax, 96));
 594   mulpd(xmm4, xmm0);
 595   addsd(xmm2, xmm3);
 596   movdqu(xmm3, xmm0);
 597   mulpd(xmm0, xmm0);
 598   addpd(xmm7, Address(rax, 0));
 599   addpd(xmm1, Address(rax, 32));
 600   mulpd(xmm1, xmm0);
 601   addpd(xmm4, Address(rax, 80));
 602   addpd(xmm7, xmm1);
 603   movdqu(xmm1, Address(rax, 112));
 604   mulpd(xmm1, xmm0);
 605   mulpd(xmm0, xmm0);
 606   addpd(xmm4, xmm1);
 607   movdqu(xmm1, Address(rax, 64));
 608   mulpd(xmm1, xmm0);
 609   addpd(xmm7, xmm1);
 610   movdqu(xmm1, xmm3);
 611   mulpd(xmm3, xmm0);
 612   mulsd(xmm0, xmm0);
 613   mulpd(xmm1, Address(rax, 144));
 614   mulpd(xmm4, xmm3);
 615   movdqu(xmm3, xmm1);
 616   addpd(xmm7, xmm4);
 617   movdqu(xmm4, xmm1);
 618   mulsd(xmm0, xmm7);
 619   unpckhpd(xmm7, xmm7);
 620   addsd(xmm0, xmm7);
 621   unpckhpd(xmm1, xmm1);
 622   addsd(xmm3, xmm1);
 623   subsd(xmm4, xmm3);
 624   addsd(xmm1, xmm4);
 625   movdqu(xmm4, xmm2);
 626   movq(xmm7, Address(rax, 144));
 627   unpckhpd(xmm2, xmm2);
 628   addsd(xmm7, Address(rax, 152));
 629   mulsd(xmm7, xmm2);
 630   addsd(xmm7, Address(rax, 136));
 631   addsd(xmm7, xmm1);
 632   addsd(xmm0, xmm7);
 633   movq(xmm7, ExternalAddress(ONE));    //0x00000000UL, 0x3ff00000UL
 634   mulsd(xmm4, xmm6);
 635   movq(xmm2, Address(rax, 168));
 636   andpd(xmm2, xmm6);
 637   mulsd(xmm5, xmm2);
 638   mulsd(xmm6, Address(rax, 160));
 639   subsd(xmm7, xmm5);
 640   subsd(xmm2, Address(rax, 128));
 641   subsd(xmm7, xmm4);
 642   mulsd(xmm7, xmm6);
 643   movdqu(xmm4, xmm3);
 644   subsd(xmm3, xmm2);
 645   addsd(xmm2, xmm3);
 646   subsd(xmm4, xmm2);
 647   addsd(xmm0, xmm4);
 648   subsd(xmm0, xmm7);
 649   addsd(xmm0, xmm3);
 650   jmp(B1_4);
 651 
 652   bind(L_2TAG_PACKET_0_0_1);
 653   jcc(Assembler::greater, L_2TAG_PACKET_1_0_1);
 654   pextrw(eax, xmm0, 3);
 655   movl(edx, eax);
 656   andl(eax, 32752);
 657   jcc(Assembler::equal, L_2TAG_PACKET_2_0_1);
 658   andl(edx, 32767);
 659   cmpl(edx, 15904);
 660   jcc(Assembler::below, L_2TAG_PACKET_3_0_1);
 661   movdqu(xmm2, xmm0);
 662   movdqu(xmm3, xmm0);
 663   movq(xmm1, ExternalAddress(Q_11));    //0xb8fe4d77UL, 0x3f82609aUL
 664   mulsd(xmm2, xmm0);
 665   mulsd(xmm3, xmm2);
 666   mulsd(xmm1, xmm2);
 667   addsd(xmm1, ExternalAddress(Q_9));    //0xbf847a43UL, 0x3f9664a0UL
 668   mulsd(xmm1, xmm2);
 669   addsd(xmm1, ExternalAddress(Q_7));    //0x52c4c8abUL, 0x3faba1baUL
 670   mulsd(xmm1, xmm2);
 671   addsd(xmm1, ExternalAddress(Q_5));    //0x11092746UL, 0x3fc11111UL
 672   mulsd(xmm1, xmm2);
 673   addsd(xmm1, ExternalAddress(Q_3));    //0x55555612UL, 0x3fd55555UL
 674   mulsd(xmm1, xmm3);
 675   addsd(xmm0, xmm1);
 676   jmp(B1_4);
 677 
 678   bind(L_2TAG_PACKET_3_0_1);
 679   movq(xmm3, ExternalAddress(TWO_POW_55));    //0x00000000UL, 0x43600000UL
 680   mulsd(xmm3, xmm0);
 681   addsd(xmm0, xmm3);
 682   mulsd(xmm0, ExternalAddress(TWO_POW_M55));    //0x00000000UL, 0x3c800000UL
 683   jmp(B1_4);
 684 
 685   bind(L_2TAG_PACKET_2_0_1);
 686   movdqu(xmm1, xmm0);
 687   mulsd(xmm1, xmm1);
 688   jmp(B1_4);
 689 
 690   bind(L_2TAG_PACKET_1_0_1);
 691   pextrw(eax, xmm0, 3);
 692   andl(eax, 32752);
 693   cmpl(eax, 32752);
 694   jcc(Assembler::equal, L_2TAG_PACKET_4_0_1);
 695   pextrw(ecx, xmm0, 3);
 696   andl(ecx, 32752);
 697   subl(ecx, 16224);
 698   shrl(ecx, 7);
 699   andl(ecx, 65532);
 700   lea(r11, ExternalAddress(PI_INV_TABLE));
 701   addq(rcx, r11);
 702   movdq(rax, xmm0);
 703   movl(r10, Address(rcx, 20));
 704   movl(r8, Address(rcx, 24));
 705   movl(edx, eax);
 706   shrq(rax, 21);
 707   orl(eax, INT_MIN);
 708   shrl(eax, 11);
 709   movl(r9, r10);
 710   imulq(r10, rdx);
 711   imulq(r9, rax);
 712   imulq(r8, rax);
 713   movl(rsi, Address(rcx, 16));
 714   movl(rdi, Address(rcx, 12));
 715   movl(r11, r10);
 716   shrq(r10, 32);
 717   addq(r9, r10);
 718   addq(r11, r8);
 719   movl(r8, r11);
 720   shrq(r11, 32);
 721   addq(r9, r11);
 722   movl(r10, rsi);
 723   imulq(rsi, rdx);
 724   imulq(r10, rax);
 725   movl(r11, rdi);
 726   imulq(rdi, rdx);
 727   movl(rbx, rsi);
 728   shrq(rsi, 32);
 729   addq(r9, rbx);
 730   movl(rbx, r9);
 731   shrq(r9, 32);
 732   addq(r10, rsi);
 733   addq(r10, r9);
 734   shlq(rbx, 32);
 735   orq(r8, rbx);
 736   imulq(r11, rax);
 737   movl(r9, Address(rcx, 8));
 738   movl(rsi, Address(rcx, 4));
 739   movl(rbx, rdi);
 740   shrq(rdi, 32);
 741   addq(r10, rbx);
 742   movl(rbx, r10);
 743   shrq(r10, 32);
 744   addq(r11, rdi);
 745   addq(r11, r10);
 746   movq(rdi, r9);
 747   imulq(r9, rdx);
 748   imulq(rdi, rax);
 749   movl(r10, r9);
 750   shrq(r9, 32);
 751   addq(r11, r10);
 752   movl(r10, r11);
 753   shrq(r11, 32);
 754   addq(rdi, r9);
 755   addq(rdi, r11);
 756   movq(r9, rsi);
 757   imulq(rsi, rdx);
 758   imulq(r9, rax);
 759   shlq(r10, 32);
 760   orq(r10, rbx);
 761   movl(eax, Address(rcx, 0));
 762   movl(r11, rsi);
 763   shrq(rsi, 32);
 764   addq(rdi, r11);
 765   movl(r11, rdi);
 766   shrq(rdi, 32);
 767   addq(r9, rsi);
 768   addq(r9, rdi);
 769   imulq(rdx, rax);
 770   pextrw(rbx, xmm0, 3);
 771   lea(rdi, ExternalAddress(PI_INV_TABLE));
 772   subq(rcx, rdi);
 773   addl(ecx, ecx);
 774   addl(ecx, ecx);
 775   addl(ecx, ecx);
 776   addl(ecx, 19);
 777   movl(rsi, 32768);
 778   andl(rsi, rbx);
 779   shrl(rbx, 4);
 780   andl(rbx, 2047);
 781   subl(rbx, 1023);
 782   subl(ecx, rbx);
 783   addq(r9, rdx);
 784   movl(edx, ecx);
 785   addl(edx, 32);
 786   cmpl(ecx, 0);
 787   jcc(Assembler::less, L_2TAG_PACKET_5_0_1);
 788   negl(ecx);
 789   addl(ecx, 29);
 790   shll(r9);
 791   movl(rdi, r9);
 792   andl(r9, 1073741823);
 793   testl(r9, 536870912);
 794   jcc(Assembler::notEqual, L_2TAG_PACKET_6_0_1);
 795   shrl(r9);
 796   movl(rbx, 0);
 797   shlq(r9, 32);
 798   orq(r9, r11);
 799 
 800   bind(L_2TAG_PACKET_7_0_1);
 801 
 802   bind(L_2TAG_PACKET_8_0_1);
 803   cmpq(r9, 0);
 804   jcc(Assembler::equal, L_2TAG_PACKET_9_0_1);
 805 
 806   bind(L_2TAG_PACKET_10_0_1);
 807   bsrq(r11, r9);
 808   movl(ecx, 29);
 809   subl(ecx, r11);
 810   jcc(Assembler::lessEqual, L_2TAG_PACKET_11_0_1);
 811   shlq(r9);
 812   movq(rax, r10);
 813   shlq(r10);
 814   addl(edx, ecx);
 815   negl(ecx);
 816   addl(ecx, 64);
 817   shrq(rax);
 818   shrq(r8);
 819   orq(r9, rax);
 820   orq(r10, r8);
 821 
 822   bind(L_2TAG_PACKET_12_0_1);
 823   cvtsi2sdq(xmm0, r9);
 824   shrq(r10, 1);
 825   cvtsi2sdq(xmm3, r10);
 826   xorpd(xmm4, xmm4);
 827   shll(edx, 4);
 828   negl(edx);
 829   addl(edx, 16368);
 830   orl(edx, rsi);
 831   xorl(edx, rbx);
 832   pinsrw(xmm4, edx, 3);
 833   movq(xmm2, ExternalAddress(PI_4));    //0x00000000UL, 0x3fe921fbUL, 0x4611a626UL, 0x3e85110bUL
 834   movq(xmm7, ExternalAddress(8 + PI_4));    //0x3fe921fbUL, 0x4611a626UL, 0x3e85110bUL
 835   xorpd(xmm5, xmm5);
 836   subl(edx, 1008);
 837   pinsrw(xmm5, edx, 3);
 838   mulsd(xmm0, xmm4);
 839   shll(rsi, 16);
 840   sarl(rsi, 31);
 841   mulsd(xmm3, xmm5);
 842   movdqu(xmm1, xmm0);
 843   mulsd(xmm0, xmm2);
 844   shrl(rdi, 30);
 845   addsd(xmm1, xmm3);
 846   mulsd(xmm3, xmm2);
 847   addl(rdi, rsi);
 848   xorl(rdi, rsi);
 849   mulsd(xmm7, xmm1);
 850   movl(eax, rdi);
 851   addsd(xmm7, xmm3);
 852   movdqu(xmm2, xmm0);
 853   addsd(xmm0, xmm7);
 854   subsd(xmm2, xmm0);
 855   addsd(xmm7, xmm2);
 856   movdqu(xmm1, ExternalAddress(PI32INV));    //0x6dc9c883UL, 0x3fe45f30UL, 0x6dc9c883UL, 0x40245f30UL
 857   if (VM_Version::supports_sse3()) {
 858     movddup(xmm0, xmm0);
 859   }
 860   else {
 861     movlhps(xmm0, xmm0);
 862   }
 863   movdqu(xmm4, ExternalAddress(sign_mask));    //0x00000000UL, 0x80000000UL, 0x00000000UL, 0x80000000UL
 864   andpd(xmm4, xmm0);
 865   mulpd(xmm1, xmm0);
 866   if (VM_Version::supports_sse3()) {
 867     movddup(xmm7, xmm7);
 868   }
 869   else {
 870     movlhps(xmm7, xmm7);
 871   }
 872   movdqu(xmm5, ExternalAddress(ONEHALF));    //0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL
 873   movdqu(xmm6, ExternalAddress(MUL16));    //0x00000000UL, 0x40300000UL, 0x00000000UL, 0x3ff00000UL
 874   por(xmm5, xmm4);
 875   addpd(xmm1, xmm5);
 876   movdqu(xmm5, xmm1);
 877   unpckhpd(xmm5, xmm5);
 878   cvttsd2sil(edx, xmm5);
 879   cvttpd2dq(xmm1, xmm1);
 880   cvtdq2pd(xmm1, xmm1);
 881   mulpd(xmm1, xmm6);
 882   movdqu(xmm3, ExternalAddress(P_1));    //0x54444000UL, 0x3fb921fbUL, 0x54440000UL, 0x3fb921fbUL
 883   movq(xmm5, ExternalAddress(QQ_2));    //0x676733afUL, 0x3d32e7b9UL
 884   shll(eax, 4);
 885   addl(edx, 469248);
 886   movdqu(xmm4, ExternalAddress(P_2));    //0x67674000UL, 0xbd32e7b9UL, 0x4c4c0000UL, 0x3d468c23UL
 887   mulpd(xmm3, xmm1);
 888   addl(edx, eax);
 889   andl(edx, 31);
 890   mulsd(xmm5, xmm1);
 891   movl(ecx, edx);
 892   mulpd(xmm4, xmm1);
 893   shll(ecx, 1);
 894   subpd(xmm0, xmm3);
 895   mulpd(xmm1, ExternalAddress(P_3));    //0x3707344aUL, 0x3aa8a2e0UL, 0x03707345UL, 0x3ae98a2eUL
 896   addl(edx, ecx);
 897   shll(ecx, 2);
 898   addl(edx, ecx);
 899   addsd(xmm5, xmm0);
 900   movdqu(xmm2, xmm0);
 901   subpd(xmm0, xmm4);
 902   movq(xmm6, ExternalAddress(ONE));    //0x00000000UL, 0x3ff00000UL
 903   shll(edx, 4);
 904   lea(rax, ExternalAddress(Ctable));
 905   andpd(xmm5, ExternalAddress(MASK_35));    //0xfffc0000UL, 0xffffffffUL, 0x00000000UL, 0x00000000UL
 906   movdqu(xmm3, xmm0);
 907   addq(rax, rdx);
 908   subpd(xmm2, xmm0);
 909   unpckhpd(xmm0, xmm0);
 910   divsd(xmm6, xmm5);
 911   subpd(xmm2, xmm4);
 912   subsd(xmm3, xmm5);
 913   subpd(xmm2, xmm1);
 914   movdqu(xmm1, Address(rax, 48));
 915   addpd(xmm2, xmm7);
 916   movdqu(xmm7, Address(rax, 16));
 917   mulpd(xmm7, xmm0);
 918   movdqu(xmm4, Address(rax, 96));
 919   mulpd(xmm1, xmm0);
 920   mulpd(xmm4, xmm0);
 921   addsd(xmm2, xmm3);
 922   movdqu(xmm3, xmm0);
 923   mulpd(xmm0, xmm0);
 924   addpd(xmm7, Address(rax, 0));
 925   addpd(xmm1, Address(rax, 32));
 926   mulpd(xmm1, xmm0);
 927   addpd(xmm4, Address(rax, 80));
 928   addpd(xmm7, xmm1);
 929   movdqu(xmm1, Address(rax, 112));
 930   mulpd(xmm1, xmm0);
 931   mulpd(xmm0, xmm0);
 932   addpd(xmm4, xmm1);
 933   movdqu(xmm1, Address(rax, 64));
 934   mulpd(xmm1, xmm0);
 935   addpd(xmm7, xmm1);
 936   movdqu(xmm1, xmm3);
 937   mulpd(xmm3, xmm0);
 938   mulsd(xmm0, xmm0);
 939   mulpd(xmm1, Address(rax, 144));
 940   mulpd(xmm4, xmm3);
 941   movdqu(xmm3, xmm1);
 942   addpd(xmm7, xmm4);
 943   movdqu(xmm4, xmm1);
 944   mulsd(xmm0, xmm7);
 945   unpckhpd(xmm7, xmm7);
 946   addsd(xmm0, xmm7);
 947   unpckhpd(xmm1, xmm1);
 948   addsd(xmm3, xmm1);
 949   subsd(xmm4, xmm3);
 950   addsd(xmm1, xmm4);
 951   movdqu(xmm4, xmm2);
 952   movq(xmm7, Address(rax, 144));
 953   unpckhpd(xmm2, xmm2);
 954   addsd(xmm7, Address(rax, 152));
 955   mulsd(xmm7, xmm2);
 956   addsd(xmm7, Address(rax, 136));
 957   addsd(xmm7, xmm1);
 958   addsd(xmm0, xmm7);
 959   movq(xmm7, ExternalAddress(ONE));    //0x00000000UL, 0x3ff00000UL
 960   mulsd(xmm4, xmm6);
 961   movq(xmm2, Address(rax, 168));
 962   andpd(xmm2, xmm6);
 963   mulsd(xmm5, xmm2);
 964   mulsd(xmm6, Address(rax, 160));
 965   subsd(xmm7, xmm5);
 966   subsd(xmm2, Address(rax, 128));
 967   subsd(xmm7, xmm4);
 968   mulsd(xmm7, xmm6);
 969   movdqu(xmm4, xmm3);
 970   subsd(xmm3, xmm2);
 971   addsd(xmm2, xmm3);
 972   subsd(xmm4, xmm2);
 973   addsd(xmm0, xmm4);
 974   subsd(xmm0, xmm7);
 975   addsd(xmm0, xmm3);
 976   jmp(B1_4);
 977 
 978   bind(L_2TAG_PACKET_9_0_1);
 979   addl(edx, 64);
 980   movq(r9, r10);
 981   movq(r10, r8);
 982   movl(r8, 0);
 983   cmpq(r9, 0);
 984   jcc(Assembler::notEqual, L_2TAG_PACKET_10_0_1);
 985   addl(edx, 64);
 986   movq(r9, r10);
 987   movq(r10, r8);
 988   cmpq(r9, 0);
 989   jcc(Assembler::notEqual, L_2TAG_PACKET_10_0_1);
 990   jmp(L_2TAG_PACKET_12_0_1);
 991 
 992   bind(L_2TAG_PACKET_11_0_1);
 993   jcc(Assembler::equal, L_2TAG_PACKET_12_0_1);
 994   negl(ecx);
 995   shrq(r10);
 996   movq(rax, r9);
 997   shrq(r9);
 998   subl(edx, ecx);
 999   negl(ecx);
1000   addl(ecx, 64);
1001   shlq(rax);
1002   orq(r10, rax);
1003   jmp(L_2TAG_PACKET_12_0_1);
1004 
1005   bind(L_2TAG_PACKET_5_0_1);
1006   notl(ecx);
1007   shlq(r9, 32);
1008   orq(r9, r11);
1009   shlq(r9);
1010   movq(rdi, r9);
1011   testl(r9, INT_MIN);
1012   jcc(Assembler::notEqual, L_2TAG_PACKET_13_0_1);
1013   shrl(r9);
1014   movl(rbx, 0);
1015   shrq(rdi, 2);
1016   jmp(L_2TAG_PACKET_8_0_1);
1017 
1018   bind(L_2TAG_PACKET_6_0_1);
1019   shrl(r9);
1020   movl(rbx, 1073741824);
1021   shrl(rbx);
1022   shlq(r9, 32);
1023   orq(r9, r11);
1024   shlq(rbx, 32);
1025   addl(rdi, 1073741824);
1026   movl(rcx, 0);
1027   movl(r11, 0);
1028   subq(rcx, r8);
1029   sbbq(r11, r10);
1030   sbbq(rbx, r9);
1031   movq(r8, rcx);
1032   movq(r10, r11);
1033   movq(r9, rbx);
1034   movl(rbx, 32768);
1035   jmp(L_2TAG_PACKET_7_0_1);
1036 
1037   bind(L_2TAG_PACKET_13_0_1);
1038   shrl(r9);
1039   mov64(rbx, 0x100000000);
1040   shrq(rbx);
1041   movl(rcx, 0);
1042   movl(r11, 0);
1043   subq(rcx, r8);
1044   sbbq(r11, r10);
1045   sbbq(rbx, r9);
1046   movq(r8, rcx);
1047   movq(r10, r11);
1048   movq(r9, rbx);
1049   movl(rbx, 32768);
1050   shrq(rdi, 2);
1051   addl(rdi, 1073741824);
1052   jmp(L_2TAG_PACKET_8_0_1);
1053 
1054   bind(L_2TAG_PACKET_4_0_1);
1055   movq(xmm0, Address(rsp, 8));
1056   mulsd(xmm0, ExternalAddress(NEG_ZERO));    //0x00000000UL, 0x80000000UL
1057   movq(Address(rsp, 0), xmm0);
1058 
1059   bind(L_2TAG_PACKET_14_0_1);
1060 
1061   bind(B1_4);
1062   addq(rsp, 16);
1063   pop(rbx);
1064 }
1065 #else
1066 // The 32 bit code is at most SSE2 compliant
1067 ALIGNED_(16) jushort _TP[] =
1068 {
1069     0x4cd6, 0xaf6c, 0xc710, 0xc662, 0xbffd, 0x0000, 0x4b06, 0xb0ac, 0xd3b2, 0xcc2c,
1070     0x3ff9, 0x0000, 0x00e3, 0xc850, 0xaa28, 0x9533, 0xbff3, 0x0000, 0x2ff0, 0x466d,
1071     0x1a3b, 0xb266, 0x3fe5, 0x0000
1072 };
1073 
1074 ALIGNED_(16) jushort _TQ[] =
1075 {
1076     0x399c, 0x8391, 0x154c, 0x94ca, 0xbfff, 0x0000, 0xb6a3, 0xc36a, 0x44e2, 0x8a2c,
1077     0x3ffe, 0x0000, 0xb70f, 0xd068, 0xa6ce, 0xe9dd, 0xbff9, 0x0000, 0x820f, 0x51ce,
1078     0x7d76, 0x9bff, 0x3ff3, 0x0000
1079 };
1080 
1081 ALIGNED_(16) jushort _GP[] =
1082 {
1083     0xaaab, 0xaaaa, 0xaaaa, 0xaaaa, 0xbffd, 0x0000, 0xb62f, 0x0b60, 0x60b6, 0xb60b,
1084     0xbff9, 0x0000, 0xdfa7, 0x08aa, 0x55e0, 0x8ab3, 0xbff6, 0x0000, 0x85a0, 0xa819,
1085     0xbc99, 0xddeb, 0xbff2, 0x0000, 0x7065, 0x6a37, 0x795f, 0xb354, 0xbfef, 0x0000,
1086     0xa8f9, 0x83f1, 0x2ec8, 0x9140, 0xbfec, 0x0000, 0xf3ca, 0x8c96, 0x8e0b, 0xeb6d,
1087     0xbfe8, 0x0000, 0x355b, 0xd910, 0x67c9, 0xbed3, 0xbfe5, 0x0000, 0x286b, 0xb49e,
1088     0xb854, 0x9a98, 0xbfe2, 0x0000, 0x0871, 0x1a2f, 0x6477, 0xfcc4, 0xbfde, 0x0000,
1089     0xa559, 0x1da9, 0xaed2, 0xba76, 0xbfdb, 0x0000, 0x00a3, 0x7fea, 0x9bc3, 0xf205,
1090     0xbfd8, 0x0000
1091 };
1092 
1093 void MacroAssembler::libm_tancot_huge(XMMRegister xmm0, XMMRegister xmm1, Register eax, Register ecx, Register edx, Register ebx, Register esi, Register edi, Register ebp, Register esp) {
1094   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;
1095   Label B1_13, B1_14, B1_15, B1_16, B1_17, B1_18, B1_19, B1_20, B1_21, B1_22, B1_23;
1096   Label B1_24, B1_25, B1_26, B1_27, B1_28, B1_29, B1_30, B1_31, B1_32, B1_33, B1_34;
1097   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;
1098 
1099   assert_different_registers(ebx, eax, ecx, edx, esi, edi, ebp, esp);
1100 
1101   address L_2il0floatpacket_0 = StubRoutines::x86::_L_2il0floatpacket_0_addr();
1102   address Pi4Inv = StubRoutines::x86::_Pi4Inv_addr();
1103   address Pi4x3 = StubRoutines::x86::_Pi4x3_addr();
1104   address Pi4x4 = StubRoutines::x86::_Pi4x4_addr();
1105   address ones = StubRoutines::x86::_ones_addr();
1106   address TP = (address)_TP;
1107   address TQ = (address)_TQ;
1108   address GP = (address)_GP;
1109 
1110   bind(B1_1);
1111   push(ebp);
1112   movl(ebp, esp);
1113   andl(esp, -64);
1114   push(esi);
1115   push(edi);
1116   push(ebx);
1117   subl(esp, 52);
1118   movl(eax, Address(ebp, 16));
1119   movl(ebx, Address(ebp, 20));
1120   movl(Address(esp, 40), eax);
1121 
1122   bind(B1_2);
1123   fnstcw(Address(esp, 38));
1124 
1125   bind(B1_3);
1126   movl(edx, Address(ebp, 12));
1127   movl(eax, edx);
1128   andl(eax, 2147483647);
1129   shrl(edx, 31);
1130   movl(Address(esp, 44), edx);
1131   cmpl(eax, 1104150528);
1132   jcc(Assembler::aboveEqual, B1_11);
1133 
1134   bind(B1_4);
1135   movsd(xmm1, Address(ebp, 8));
1136   movzwl(ecx, Address(esp, 38));
1137   movl(edx, ecx);
1138   andl(edx, 768);
1139   andps(xmm1, ExternalAddress(L_2il0floatpacket_0));    //0xffffffffUL, 0x7fffffffUL, 0x00000000UL, 0x00000000UL
1140   cmpl(edx, 768);
1141   movsd(xmm0, ExternalAddress(Pi4Inv));    ////0x6dc9c883UL, 0x3ff45f30UL
1142   mulsd(xmm0, xmm1);
1143   movsd(Address(ebp, 8), xmm1);
1144   movsd(Address(esp, 0), xmm0);
1145   jcc(Assembler::equal, B1_39);
1146 
1147   bind(B1_5);
1148   orl(ecx, -64768);
1149   movw(Address(esp, 36), ecx);
1150 
1151   bind(B1_6);
1152   fldcw(Address(esp, 36));
1153 
1154   bind(B1_7);
1155   movsd(xmm1, Address(ebp, 8));
1156   movl(edi, 1);
1157 
1158   bind(B1_8);
1159   movl(Address(esp, 12), esi);
1160   movl(esi, Address(esp, 4));
1161   movl(edx, esi);
1162   movl(Address(esp, 24), edi);
1163   movl(edi, esi);
1164   shrl(edi, 20);
1165   andl(edx, 1048575);
1166   movl(ecx, edi);
1167   orl(edx, 1048576);
1168   negl(ecx);
1169   addl(edi, 13);
1170   movl(Address(esp, 8), ebx);
1171   addl(ecx, 19);
1172   movl(ebx, edx);
1173   movl(Address(esp, 28), ecx);
1174   shrl(ebx);
1175   movl(ecx, edi);
1176   shll(edx);
1177   movl(ecx, Address(esp, 28));
1178   movl(edi, Address(esp, 0));
1179   shrl(edi);
1180   orl(edx, edi);
1181   cmpl(esi, 1094713344);
1182   movsd(Address(esp, 16), xmm1);
1183   fld_d(Address(esp, 16));
1184   cmov32(Assembler::below, edx, ebx);
1185   movl(edi, Address(esp, 24));
1186   movl(esi, Address(esp, 12));
1187   lea(ebx, Address(edx, 1));
1188   andl(ebx, -2);
1189   movl(Address(esp, 16), ebx);
1190   cmpl(eax, 1094713344);
1191   fild_s(Address(esp, 16));
1192   movl(ebx, Address(esp, 8));
1193   jcc(Assembler::aboveEqual, B1_10);
1194 
1195   bind(B1_9);
1196   fld_d(ExternalAddress(Pi4x3));    //0x54443000UL, 0xbfe921fbUL
1197   fmul(1);
1198   faddp(2);
1199   fld_d(ExternalAddress(8 + Pi4x3));    //0x3b39a000UL, 0x3d373dcbUL
1200   fmul(1);
1201   faddp(2);
1202   fld_d(ExternalAddress(16 + Pi4x3));    //0xe0e68948UL, 0xba845c06UL
1203   fmulp(1);
1204   faddp(1);
1205   jmp(B1_17);
1206 
1207   bind(B1_10);
1208   fld_d(ExternalAddress(Pi4x4));    //0x54400000UL, 0xbfe921fbUL
1209   fmul(1);
1210   faddp(2);
1211   fld_d(ExternalAddress(8 + Pi4x4));    //0x1a600000UL, 0xbdc0b461UL
1212   fmul(1);
1213   faddp(2);
1214   fld_d(ExternalAddress(16 + Pi4x4));    //0x2e000000UL, 0xbb93198aUL
1215   fmul(1);
1216   faddp(2);
1217   fld_d(ExternalAddress(24 + Pi4x4));    //0x252049c1UL, 0xb96b839aUL
1218   fmulp(1);
1219   faddp(1);
1220   jmp(B1_17);
1221 
1222   bind(B1_11);
1223   movzwl(edx, Address(esp, 38));
1224   movl(eax, edx);
1225   andl(eax, 768);
1226   cmpl(eax, 768);
1227   jcc(Assembler::equal, B1_40);
1228 
1229   bind(B1_12);
1230   orl(edx, -64768);
1231   movw(Address(esp, 36), edx);
1232 
1233   bind(B1_13);
1234   fldcw(Address(esp, 36));
1235 
1236   bind(B1_14);
1237   movl(edi, 1);
1238 
1239   bind(B1_15);
1240   movsd(xmm0, Address(ebp, 8));
1241   addl(esp, -32);
1242   andps(xmm0, ExternalAddress(L_2il0floatpacket_0));    //0xffffffffUL, 0x7fffffffUL, 0x00000000UL, 0x00000000UL
1243   lea(eax, Address(esp, 32));
1244   movsd(Address(eax, 16), xmm0);
1245   fld_d(Address(eax, 16));
1246   fstp_x(Address(esp, 0));
1247   movl(Address(esp, 12), 0);
1248   movl(Address(esp, 16), eax);
1249   call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlibm_reduce_pi04l())));
1250 
1251   bind(B1_43);
1252   movl(edx, eax);
1253   addl(esp, 32);
1254 
1255   bind(B1_16);
1256   fld_d(Address(esp, 0));
1257   fld_d(Address(esp, 8));
1258   faddp(1);
1259 
1260   bind(B1_17);
1261   movl(eax, ebx);
1262   andl(eax, 3);
1263   cmpl(eax, 3);
1264   jcc(Assembler::notEqual, B1_24);
1265 
1266   bind(B1_18);
1267   fld_d(ExternalAddress(ones));
1268   incl(edx);
1269   fdiv(1);
1270   testb(edx, 2);
1271   fstp_x(Address(esp, 24));
1272   fld_s(0);
1273   fmul(1);
1274   fld_s(0);
1275   fmul(1);
1276   fld_x(ExternalAddress(36 + TP));    //0x2ff0, 0x466d, 0x1a
1277   fmul(2);
1278   fld_x(ExternalAddress(24 + TP));    //0x00e3, 0xc850, 0xaa
1279   faddp(1);
1280   fmul(2);
1281   fld_x(ExternalAddress(12 + TP));    //0x4b06, 0xb0ac, 0xd3
1282   faddp(1);
1283   fmul(2);
1284   fld_x(ExternalAddress(36 + TQ));    //0x820f, 0x51ce, 0x7d
1285   fmul(3);
1286   fld_x(ExternalAddress(24 + TQ));    //0xb70f, 0xd068, 0xa6
1287   faddp(1);
1288   fmul(3);
1289   fld_x(ExternalAddress(12 + TQ));    //0xb6a3, 0xc36a, 0x44
1290   faddp(1);
1291   fmul(3);
1292   fld_x(ExternalAddress(TQ));    //0x399c, 0x8391, 0x15
1293   faddp(1);
1294   fld_x(ExternalAddress(TP));    //0x4cd6, 0xaf6c, 0xc7
1295   faddp(2);
1296   fld_x(ExternalAddress(132 + GP));    //0x00a3, 0x7fea, 0x9b
1297   fmul(3);
1298   fld_x(ExternalAddress(120 + GP));    //0xa559, 0x1da9, 0xae
1299   fmul(4);
1300   fld_x(ExternalAddress(108 + GP));    //0x0871, 0x1a2f, 0x64
1301   faddp(2);
1302   fxch(1);
1303   fmul(4);
1304   fld_x(ExternalAddress(96 + GP));    //0x286b, 0xb49e, 0xb8
1305   faddp(2);
1306   fxch(1);
1307   fmul(4);
1308   fld_x(ExternalAddress(84 + GP));    //0x355b, 0xd910, 0x67
1309   faddp(2);
1310   fxch(1);
1311   fmul(4);
1312   fld_x(ExternalAddress(72 + GP));    //0x8c96, 0x8e0b, 0xeb
1313   faddp(2);
1314   fxch(1);
1315   fmul(4);
1316   fld_x(ExternalAddress(60 + GP));    //0xa8f9, 0x83f1, 0x2e
1317   faddp(2);
1318   fxch(1);
1319   fmul(4);
1320   fld_x(ExternalAddress(48 + GP));    //0x7065, 0x6a37, 0x79
1321   faddp(2);
1322   fxch(1);
1323   fmul(4);
1324   fld_x(ExternalAddress(36 + GP));    //0x85a0, 0xa819, 0xbc
1325   faddp(2);
1326   fxch(1);
1327   fmul(4);
1328   fld_x(ExternalAddress(24 + GP));    //0xdfa7, 0x08aa, 0x55
1329   faddp(2);
1330   fxch(1);
1331   fmulp(4);
1332   fld_x(ExternalAddress(12 + GP));    //0xb62f, 0x0b60, 0x60
1333   faddp(1);
1334   fmul(4);
1335   fmul(5);
1336   fld_x(ExternalAddress(GP));    //0xaaab, 0xaaaa, 0xaa
1337   faddp(4);
1338   fxch(3);
1339   fmul(5);
1340   faddp(3);
1341   jcc(Assembler::equal, B1_20);
1342 
1343   bind(B1_19);
1344   fld_x(Address(esp, 24));
1345   fxch(1);
1346   fdivrp(2);
1347   fxch(1);
1348   fmulp(3);
1349   movl(eax, Address(esp, 44));
1350   xorl(eax, 1);
1351   fxch(2);
1352   fmul(3);
1353   fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
1354   fmula(2);
1355   fmula(3);
1356   fxch(3);
1357   faddp(2);
1358   fxch(1);
1359   fstp_d(Address(esp, 16));
1360   fmul(1);
1361   fxch(1);
1362   fmulp(2);
1363   movsd(xmm0, Address(esp, 16));
1364   faddp(1);
1365   fstp_d(Address(esp, 16));
1366   movsd(xmm1, Address(esp, 16));
1367   jmp(B1_21);
1368 
1369   bind(B1_20);
1370   fdivrp(1);
1371   fmulp(2);
1372   fxch(1);
1373   fmul(2);
1374   movl(eax, Address(esp, 44));
1375   fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
1376   fmula(1);
1377   fmula(3);
1378   fxch(3);
1379   faddp(1);
1380   fstp_d(Address(esp, 16));
1381   fmul(1);
1382   fld_x(Address(esp, 24));
1383   fmulp(2);
1384   movsd(xmm0, Address(esp, 16));
1385   faddp(1);
1386   fstp_d(Address(esp, 16));
1387   movsd(xmm1, Address(esp, 16));
1388 
1389   bind(B1_21);
1390   testl(edi, edi);
1391   jcc(Assembler::equal, B1_23);
1392 
1393   bind(B1_22);
1394   fldcw(Address(esp, 38));
1395 
1396   bind(B1_23);
1397   movl(eax, Address(esp, 40));
1398   movsd(Address(eax, 0), xmm0);
1399   movsd(Address(eax, 8), xmm1);
1400   addl(esp, 52);
1401   pop(ebx);
1402   pop(edi);
1403   pop(esi);
1404   movl(esp, ebp);
1405   pop(ebp);
1406   ret(0);
1407 
1408   bind(B1_24);
1409   testb(ebx, 2);
1410   jcc(Assembler::equal, B1_31);
1411 
1412   bind(B1_25);
1413   incl(edx);
1414   fld_s(0);
1415   fmul(1);
1416   testb(edx, 2);
1417   jcc(Assembler::equal, B1_27);
1418 
1419   bind(B1_26);
1420   fld_d(ExternalAddress(ones));
1421   fdiv(2);
1422   fld_s(1);
1423   fmul(2);
1424   fld_x(ExternalAddress(132 + GP));    //0x00a3, 0x7fea, 0x9b
1425   fmul(1);
1426   fld_x(ExternalAddress(120 + GP));    //0xa559, 0x1da9, 0xae
1427   fmul(2);
1428   fld_x(ExternalAddress(108 + GP));    //0x67c9, 0xbed3, 0xbf
1429   movl(eax, Address(esp, 44));
1430   faddp(2);
1431   fxch(1);
1432   fmul(2);
1433   xorl(eax, 1);
1434   fld_x(ExternalAddress(96 + GP));    //0x286b, 0xb49e, 0xb8
1435   faddp(2);
1436   fxch(1);
1437   fmul(2);
1438   fld_x(ExternalAddress(84 + GP));    //0x355b, 0xd910, 0x67
1439   faddp(2);
1440   fxch(1);
1441   fmul(2);
1442   fld_x(ExternalAddress(72 + GP));    //0xf3ca, 0x8c96, 0x8e
1443   faddp(2);
1444   fxch(1);
1445   fmul(2);
1446   fld_x(ExternalAddress(60 + GP));    //0xa8f9, 0x83f1, 0x2e
1447   faddp(2);
1448   fxch(1);
1449   fmul(2);
1450   fld_x(ExternalAddress(48 + GP));    //0x7065, 0x6a37, 0x79
1451   faddp(2);
1452   fxch(1);
1453   fmul(2);
1454   fld_x(ExternalAddress(36 + GP));    //0x85a0, 0xa819, 0xbc
1455   faddp(2);
1456   fxch(1);
1457   fmul(2);
1458   fld_x(ExternalAddress(24 + GP));    //0xdfa7, 0x08aa, 0x55
1459   faddp(2);
1460   fxch(1);
1461   fmulp(2);
1462   fld_x(ExternalAddress(12 + GP));    //0xb62f, 0x0b60, 0x60
1463   faddp(1);
1464   fmulp(3);
1465   fld_x(ExternalAddress(GP));    //0xaaab, 0xaaaa, 0xaa
1466   faddp(1);
1467   fmul(3);
1468   fxch(2);
1469   fmulp(3);
1470   fxch(1);
1471   faddp(2);
1472   fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
1473   fmula(2);
1474   fmulp(1);
1475   faddp(1);
1476   fstp_d(Address(esp, 16));
1477   movsd(xmm0, Address(esp, 16));
1478   jmp(B1_28);
1479 
1480   bind(B1_27);
1481   fld_x(ExternalAddress(36 + TP));    //0x2ff0, 0x466d, 0x1a
1482   fmul(1);
1483   fld_x(ExternalAddress(24 + TP));    //0x00e3, 0xc850, 0xaa
1484   movl(eax, Address(esp, 44));
1485   faddp(1);
1486   fmul(1);
1487   fld_x(ExternalAddress(36 + TQ));    //0x820f, 0x51ce, 0x7d
1488   fmul(2);
1489   fld_x(ExternalAddress(24 + TQ));    //0xb70f, 0xd068, 0xa6
1490   faddp(1);
1491   fmul(2);
1492   fld_x(ExternalAddress(12 + TQ));    //0xb6a3, 0xc36a, 0x44
1493   faddp(1);
1494   fmul(2);
1495   fld_x(ExternalAddress(TQ));    //0x399c, 0x8391, 0x15
1496   faddp(1);
1497   fld_x(ExternalAddress(12 + TP));    //0x4b06, 0xb0ac, 0xd3
1498   faddp(2);
1499   fxch(1);
1500   fmul(2);
1501   fld_x(ExternalAddress(TP));    //0x4cd6, 0xaf6c, 0xc7
1502   faddp(1);
1503   fdivrp(1);
1504   fmulp(1);
1505   fmul(1);
1506   fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
1507   fmula(1);
1508   fmulp(2);
1509   faddp(1);
1510   fstp_d(Address(esp, 16));
1511   movsd(xmm0, Address(esp, 16));
1512 
1513   bind(B1_28);
1514   testl(edi, edi);
1515   jcc(Assembler::equal, B1_30);
1516 
1517   bind(B1_29);
1518   fldcw(Address(esp, 38));
1519 
1520   bind(B1_30);
1521   movl(eax, Address(esp, 40));
1522   movsd(Address(eax, 0), xmm0);
1523   addl(esp, 52);
1524   pop(ebx);
1525   pop(edi);
1526   pop(esi);
1527   movl(esp, ebp);
1528   pop(ebp);
1529   ret(0);
1530 
1531   bind(B1_31);
1532   testb(ebx, 1);
1533   jcc(Assembler::equal, B1_38);
1534 
1535   bind(B1_32);
1536   incl(edx);
1537   fld_s(0);
1538   fmul(1);
1539   testb(edx, 2);
1540   jcc(Assembler::equal, B1_34);
1541 
1542   bind(B1_33);
1543   fld_x(ExternalAddress(36 + TP));    //0x2ff0, 0x466d, 0x1a
1544   fmul(1);
1545   fld_x(ExternalAddress(24 + TP));    //0x00e3, 0xc850, 0xaa
1546   movl(eax, Address(esp, 44));
1547   faddp(1);
1548   fmul(1);
1549   xorl(eax, 1);
1550   fld_x(ExternalAddress(36 + TQ));    //0x820f, 0x51ce, 0x7d
1551   fmul(2);
1552   fld_x(ExternalAddress(24 + TQ));    //0xb70f, 0xd068, 0xa6
1553   faddp(1);
1554   fmul(2);
1555   fld_x(ExternalAddress(12 + TQ));    //0xb6a3, 0xc36a, 0x44
1556   faddp(1);
1557   fmul(2);
1558   fld_x(ExternalAddress(TQ));    //0x399c, 0x8391, 0x15
1559   faddp(1);
1560   fld_x(ExternalAddress(12 + TP));    //0x4b06, 0xb0ac, 0xd3
1561   faddp(2);
1562   fxch(1);
1563   fmul(2);
1564   fld_x(ExternalAddress(TP));    //0x4cd6, 0xaf6c, 0xc7
1565   faddp(1);
1566   fdivrp(1);
1567   fmulp(1);
1568   fmul(1);
1569   fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
1570   fmula(1);
1571   fmulp(2);
1572   faddp(1);
1573   fstp_d(Address(esp, 16));
1574   movsd(xmm0, Address(esp, 16));
1575   jmp(B1_35);
1576 
1577   bind(B1_34);
1578   fld_d(ExternalAddress(ones));
1579   fdiv(2);
1580   fld_s(1);
1581   fmul(2);
1582   fld_x(ExternalAddress(132 + GP));    //0x00a3, 0x7fea, 0x9b
1583   fmul(1);
1584   fld_x(ExternalAddress(120 + GP));    //0xa559, 0x1da9, 0xae
1585   fmul(2);
1586   fld_x(ExternalAddress(108 + GP));    //0x67c9, 0xbed3, 0xbf
1587   movl(eax, Address(esp, 44));
1588   faddp(2);
1589   fxch(1);
1590   fmul(2);
1591   fld_x(ExternalAddress(96 + GP));    //0x286b, 0xb49e, 0xb8
1592   faddp(2);
1593   fxch(1);
1594   fmul(2);
1595   fld_x(ExternalAddress(84 + GP));    //0x355b, 0xd910, 0x67
1596   faddp(2);
1597   fxch(1);
1598   fmul(2);
1599   fld_x(ExternalAddress(72 + GP));    //0xf3ca, 0x8c96, 0x8e
1600   faddp(2);
1601   fxch(1);
1602   fmul(2);
1603   fld_x(ExternalAddress(60 + GP));    //0xa8f9, 0x83f1, 0x2e
1604   faddp(2);
1605   fxch(1);
1606   fmul(2);
1607   fld_x(ExternalAddress(48 + GP));    //0x7065, 0x6a37, 0x79
1608   faddp(2);
1609   fxch(1);
1610   fmul(2);
1611   fld_x(ExternalAddress(36 + GP));    //0x85a0, 0xa819, 0xbc
1612   faddp(2);
1613   fxch(1);
1614   fmul(2);
1615   fld_x(ExternalAddress(24 + GP));    //0xdfa7, 0x08aa, 0x55
1616   faddp(2);
1617   fxch(1);
1618   fmulp(2);
1619   fld_x(ExternalAddress(12 + GP));    //0xb62f, 0x0b60, 0x60
1620   faddp(1);
1621   fmulp(3);
1622   fld_x(ExternalAddress(GP));    //0xaaab, 0xaaaa, 0xaa
1623   faddp(1);
1624   fmul(3);
1625   fxch(2);
1626   fmulp(3);
1627   fxch(1);
1628   faddp(2);
1629   fld_d(Address(ones, RelocationHolder::none).plus_disp(eax, Address::times_8));
1630   fmula(2);
1631   fmulp(1);
1632   faddp(1);
1633   fstp_d(Address(esp, 16));
1634   movsd(xmm0, Address(esp, 16));
1635 
1636   bind(B1_35);
1637   testl(edi, edi);
1638   jcc(Assembler::equal, B1_37);
1639 
1640   bind(B1_36);
1641   fldcw(Address(esp, 38));
1642 
1643   bind(B1_37);
1644   movl(eax, Address(esp, 40));
1645   movsd(Address(eax, 8), xmm0);
1646   addl(esp, 52);
1647   pop(ebx);
1648   pop(edi);
1649   pop(esi);
1650   mov(esp, ebp);
1651   pop(ebp);
1652   ret(0);
1653 
1654   bind(B1_38);
1655   fstp_d(0);
1656   addl(esp, 52);
1657   pop(ebx);
1658   pop(edi);
1659   pop(esi);
1660   mov(esp, ebp);
1661   pop(ebp);
1662   ret(0);
1663 
1664   bind(B1_39);
1665   xorl(edi, edi);
1666   jmp(B1_8);
1667 
1668   bind(B1_40);
1669   xorl(edi, edi);
1670   jmp(B1_15);
1671 }
1672 
1673 ALIGNED_(16) juint _static_const_table_tan[] =
1674 {
1675     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x882c10faUL,
1676     0x3f9664f4UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
1677     0x00000000UL, 0x00000000UL, 0x55e6c23dUL, 0x3f8226e3UL, 0x55555555UL,
1678     0x3fd55555UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
1679     0x0e157de0UL, 0x3f6d6d3dUL, 0x11111111UL, 0x3fc11111UL, 0x00000000UL,
1680     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x452b75e3UL, 0x3f57da36UL,
1681     0x1ba1ba1cUL, 0x3faba1baUL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
1682     0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL,
1683     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x4e435f9bUL,
1684     0x3f953f83UL, 0x00000000UL, 0x00000000UL, 0x3c6e8e46UL, 0x3f9b74eaUL,
1685     0x00000000UL, 0x00000000UL, 0xda5b7511UL, 0x3f85ad63UL, 0xdc230b9bUL,
1686     0x3fb97558UL, 0x26cb3788UL, 0x3f881308UL, 0x76fc4985UL, 0x3fd62ac9UL,
1687     0x77bb08baUL, 0x3f757c85UL, 0xb6247521UL, 0x3fb1381eUL, 0x5922170cUL,
1688     0x3f754e95UL, 0x8746482dUL, 0x3fc27f83UL, 0x11055b30UL, 0x3f64e391UL,
1689     0x3e666320UL, 0x3fa3e609UL, 0x0de9dae3UL, 0x3f6301dfUL, 0x1f1dca06UL,
1690     0x3fafa8aeUL, 0x8c5b2da2UL, 0x3fb936bbUL, 0x4e88f7a5UL, 0x3c587d05UL,
1691     0x00000000UL, 0x3ff00000UL, 0xa8935dd9UL, 0x3f83dde2UL, 0x00000000UL,
1692     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x5a279ea3UL, 0x3faa3407UL,
1693     0x00000000UL, 0x00000000UL, 0x432d65faUL, 0x3fa70153UL, 0x00000000UL,
1694     0x00000000UL, 0x891a4602UL, 0x3f9d03efUL, 0xd62ca5f8UL, 0x3fca77d9UL,
1695     0xb35f4628UL, 0x3f97a265UL, 0x433258faUL, 0x3fd8cf51UL, 0xb58fd909UL,
1696     0x3f8f88e3UL, 0x01771ceaUL, 0x3fc2b154UL, 0xf3562f8eUL, 0x3f888f57UL,
1697     0xc028a723UL, 0x3fc7370fUL, 0x20b7f9f0UL, 0x3f80f44cUL, 0x214368e9UL,
1698     0x3fb6dfaaUL, 0x28891863UL, 0x3f79b4b6UL, 0x172dbbf0UL, 0x3fb6cb8eUL,
1699     0xe0553158UL, 0x3fc975f5UL, 0x593fe814UL, 0x3c2ef5d3UL, 0x00000000UL,
1700     0x3ff00000UL, 0x03dec550UL, 0x3fa44203UL, 0x00000000UL, 0x00000000UL,
1701     0x00000000UL, 0x00000000UL, 0x9314533eUL, 0x3fbb8ec5UL, 0x00000000UL,
1702     0x00000000UL, 0x09aa36d0UL, 0x3fb6d3f4UL, 0x00000000UL, 0x00000000UL,
1703     0xdcb427fdUL, 0x3fb13950UL, 0xd87ab0bbUL, 0x3fd5335eUL, 0xce0ae8a5UL,
1704     0x3fabb382UL, 0x79143126UL, 0x3fddba41UL, 0x5f2b28d4UL, 0x3fa552f1UL,
1705     0x59f21a6dUL, 0x3fd015abUL, 0x22c27d95UL, 0x3fa0e984UL, 0xe19fc6aaUL,
1706     0x3fd0576cUL, 0x8f2c2950UL, 0x3f9a4898UL, 0xc0b3f22cUL, 0x3fc59462UL,
1707     0x1883a4b8UL, 0x3f94b61cUL, 0x3f838640UL, 0x3fc30eb8UL, 0x355c63dcUL,
1708     0x3fd36a08UL, 0x1dce993dUL, 0xbc6d704dUL, 0x00000000UL, 0x3ff00000UL,
1709     0x2b82ab63UL, 0x3fb78e92UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
1710     0x00000000UL, 0x56f37042UL, 0x3fccfc56UL, 0x00000000UL, 0x00000000UL,
1711     0xaa563951UL, 0x3fc90125UL, 0x00000000UL, 0x00000000UL, 0x3d0e7c5dUL,
1712     0x3fc50533UL, 0x9bed9b2eUL, 0x3fdf0ed9UL, 0x5fe7c47cUL, 0x3fc1f250UL,
1713     0x96c125e5UL, 0x3fe2edd9UL, 0x5a02bbd8UL, 0x3fbe5c71UL, 0x86362c20UL,
1714     0x3fda08b7UL, 0x4b4435edUL, 0x3fb9d342UL, 0x4b494091UL, 0x3fd911bdUL,
1715     0xb56658beUL, 0x3fb5e4c7UL, 0x93a2fd76UL, 0x3fd3c092UL, 0xda271794UL,
1716     0x3fb29910UL, 0x3303df2bUL, 0x3fd189beUL, 0x99fcef32UL, 0x3fda8279UL,
1717     0xb68c1467UL, 0x3c708b2fUL, 0x00000000UL, 0x3ff00000UL, 0x980c4337UL,
1718     0x3fc5f619UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
1719     0xcc03e501UL, 0x3fdff10fUL, 0x00000000UL, 0x00000000UL, 0x44a4e845UL,
1720     0x3fddb63bUL, 0x00000000UL, 0x00000000UL, 0x3768ad9fUL, 0x3fdb72a4UL,
1721     0x3dd01ccaUL, 0x3fe5fdb9UL, 0xa61d2811UL, 0x3fd972b2UL, 0x5645ad0bUL,
1722     0x3fe977f9UL, 0xd013b3abUL, 0x3fd78ca3UL, 0xbf0bf914UL, 0x3fe4f192UL,
1723     0x4d53e730UL, 0x3fd5d060UL, 0x3f8b9000UL, 0x3fe49933UL, 0xe2b82f08UL,
1724     0x3fd4322aUL, 0x5936a835UL, 0x3fe27ae1UL, 0xb1c61c9bUL, 0x3fd2b3fbUL,
1725     0xef478605UL, 0x3fe1659eUL, 0x190834ecUL, 0x3fe11ab7UL, 0xcdb625eaUL,
1726     0xbc8e564bUL, 0x00000000UL, 0x3ff00000UL, 0xb07217e3UL, 0x3fd248f1UL,
1727     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x2b2c49d0UL,
1728     0x3ff2de9cUL, 0x00000000UL, 0x00000000UL, 0x2655bc98UL, 0x3ff33e58UL,
1729     0x00000000UL, 0x00000000UL, 0xff691fa2UL, 0x3ff3972eUL, 0xe93463bdUL,
1730     0x3feeed87UL, 0x070e10a0UL, 0x3ff3f5b2UL, 0xf4d790a4UL, 0x3ff20c10UL,
1731     0xa04e8ea3UL, 0x3ff4541aUL, 0x386accd3UL, 0x3ff1369eUL, 0x222a66ddUL,
1732     0x3ff4b521UL, 0x22a9777eUL, 0x3ff20817UL, 0x52a04a6eUL, 0x3ff5178fUL,
1733     0xddaa0031UL, 0x3ff22137UL, 0x4447d47cUL, 0x3ff57c01UL, 0x1e9c7f1dUL,
1734     0x3ff29311UL, 0x2ab7f990UL, 0x3fe561b8UL, 0x209c7df1UL, 0x3c87a8c5UL,
1735     0x00000000UL, 0x3ff00000UL, 0x4170bcc6UL, 0x3fdc92d8UL, 0x00000000UL,
1736     0x00000000UL, 0x00000000UL, 0x00000000UL, 0xc7ab4d5aUL, 0x40085e24UL,
1737     0x00000000UL, 0x00000000UL, 0xe93ea75dUL, 0x400b963dUL, 0x00000000UL,
1738     0x00000000UL, 0x94a7f25aUL, 0x400f37e2UL, 0x4b6261cbUL, 0x3ff5f984UL,
1739     0x5a9dd812UL, 0x4011aab0UL, 0x74c30018UL, 0x3ffaf5a5UL, 0x7f2ce8e3UL,
1740     0x4013fe8bUL, 0xfe8e54faUL, 0x3ffd7334UL, 0x670d618dUL, 0x4016a10cUL,
1741     0x4db97058UL, 0x4000e012UL, 0x24df44ddUL, 0x40199c5fUL, 0x697d6eceUL,
1742     0x4003006eUL, 0x83298b82UL, 0x401cfc4dUL, 0x19d490d6UL, 0x40058c19UL,
1743     0x2ae42850UL, 0x3fea4300UL, 0x118e20e6UL, 0xbc7a6db8UL, 0x00000000UL,
1744     0x40000000UL, 0xe33345b8UL, 0xbfd4e526UL, 0x00000000UL, 0x00000000UL,
1745     0x00000000UL, 0x00000000UL, 0x65965966UL, 0x40219659UL, 0x00000000UL,
1746     0x00000000UL, 0x882c10faUL, 0x402664f4UL, 0x00000000UL, 0x00000000UL,
1747     0x83cd3723UL, 0x402c8342UL, 0x00000000UL, 0x40000000UL, 0x55e6c23dUL,
1748     0x403226e3UL, 0x55555555UL, 0x40055555UL, 0x34451939UL, 0x40371c96UL,
1749     0xaaaaaaabUL, 0x400aaaaaUL, 0x0e157de0UL, 0x403d6d3dUL, 0x11111111UL,
1750     0x40111111UL, 0xa738201fUL, 0x4042bbceUL, 0x05b05b06UL, 0x4015b05bUL,
1751     0x452b75e3UL, 0x4047da36UL, 0x1ba1ba1cUL, 0x401ba1baUL, 0x00000000UL,
1752     0x3ff00000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x40000000UL,
1753     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
1754     0x00000000UL, 0x4f48b8d3UL, 0xbf33eaf9UL, 0x00000000UL, 0x00000000UL,
1755     0x0cf7586fUL, 0x3f20b8eaUL, 0x00000000UL, 0x00000000UL, 0xd0258911UL,
1756     0xbf0abaf3UL, 0x23e49fe9UL, 0xbfab5a8cUL, 0x2d53222eUL, 0x3ef60d15UL,
1757     0x21169451UL, 0x3fa172b2UL, 0xbb254dbcUL, 0xbee1d3b5UL, 0xdbf93b8eUL,
1758     0xbf84c7dbUL, 0x05b4630bUL, 0x3ecd3364UL, 0xee9aada7UL, 0x3f743924UL,
1759     0x794a8297UL, 0xbeb7b7b9UL, 0xe015f797UL, 0xbf5d41f5UL, 0xe41a4a56UL,
1760     0x3ea35dfbUL, 0xe4c2a251UL, 0x3f49a2abUL, 0x5af9e000UL, 0xbfce49ceUL,
1761     0x8c743719UL, 0x3d1eb860UL, 0x00000000UL, 0x00000000UL, 0x1b4863cfUL,
1762     0x3fd78294UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL,
1763     0x535ad890UL, 0xbf2b9320UL, 0x00000000UL, 0x00000000UL, 0x018fdf1fUL,
1764     0x3f16d61dUL, 0x00000000UL, 0x00000000UL, 0x0359f1beUL, 0xbf0139e4UL,
1765     0xa4317c6dUL, 0xbfa67e17UL, 0x82672d0fUL, 0x3eebb405UL, 0x2f1b621eUL,
1766     0x3f9f455bUL, 0x51ccf238UL, 0xbed55317UL, 0xf437b9acUL, 0xbf804beeUL,
1767     0xc791a2b5UL, 0x3ec0e993UL, 0x919a1db2UL, 0x3f7080c2UL, 0x336a5b0eUL,
1768     0xbeaa48a2UL, 0x0a268358UL, 0xbf55a443UL, 0xdfd978e4UL, 0x3e94b61fUL,
1769     0xd7767a58UL, 0x3f431806UL, 0x2aea0000UL, 0xbfc9bbe8UL, 0x7723ea61UL,
1770     0xbd3a2369UL, 0x00000000UL, 0x00000000UL, 0xdf7796ffUL, 0x3fd6e642UL,
1771     0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0xb9ff07ceUL,
1772     0xbf231c78UL, 0x00000000UL, 0x00000000UL, 0xa5517182UL, 0x3f0ff0e0UL,
1773     0x00000000UL, 0x00000000UL, 0x790b4cbcUL, 0xbef66191UL, 0x848a46c6UL,
1774     0xbfa21ac0UL, 0xb16435faUL, 0x3ee1d3ecUL, 0x2a1aa832UL, 0x3f9c71eaUL,
1775     0xfdd299efUL, 0xbec9dd1aUL, 0x3f8dbaafUL, 0xbf793363UL, 0x309fc6eaUL,
1776     0x3eb415d6UL, 0xbee60471UL, 0x3f6b83baUL, 0x94a0a697UL, 0xbe9dae11UL,
1777     0x3e5c67b3UL, 0xbf4fd07bUL, 0x9a8f3e3eUL, 0x3e86bd75UL, 0xa4beb7a4UL,
1778     0x3f3d1eb1UL, 0x29cfc000UL, 0xbfc549ceUL, 0xbf159358UL, 0xbd397b33UL,
1779     0x00000000UL, 0x00000000UL, 0x871fee6cUL, 0x3fd666f0UL, 0x00000000UL,
1780     0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x7d98a556UL, 0xbf1a3958UL,
1781     0x00000000UL, 0x00000000UL, 0x9d88dc01UL, 0x3f0704c2UL, 0x00000000UL,
1782     0x00000000UL, 0x73742a2bUL, 0xbeed054aUL, 0x58844587UL, 0xbf9c2a13UL,
1783     0x55688a79UL, 0x3ed7a326UL, 0xee33f1d6UL, 0x3f9a48f4UL, 0xa8dc9888UL,
1784     0xbebf8939UL, 0xaad4b5b8UL, 0xbf72f746UL, 0x9102efa1UL, 0x3ea88f82UL,
1785     0xdabc29cfUL, 0x3f678228UL, 0x9289afb8UL, 0xbe90f456UL, 0x741fb4edUL,
1786     0xbf46f3a3UL, 0xa97f6663UL, 0x3e79b4bfUL, 0xca89ff3fUL, 0x3f36db70UL,
1787     0xa8a2a000UL, 0xbfc0ee13UL, 0x3da24be1UL, 0xbd338b9fUL, 0x00000000UL,
1788     0x00000000UL, 0x11cd6c69UL, 0x3fd601fdUL, 0x00000000UL, 0x3ff00000UL,
1789     0x00000000UL, 0xfffffff8UL, 0x1a154b97UL, 0xbf116b01UL, 0x00000000UL,
1790     0x00000000UL, 0x2d427630UL, 0x3f0147bfUL, 0x00000000UL, 0x00000000UL,
1791     0xb93820c8UL, 0xbee264d4UL, 0xbb6cbb18UL, 0xbf94ab8cUL, 0x888d4d92UL,
1792     0x3ed0568bUL, 0x60730f7cUL, 0x3f98b19bUL, 0xe4b1fb11UL, 0xbeb2f950UL,
1793     0x22cf9f74UL, 0xbf6b21cdUL, 0x4a3ff0a6UL, 0x3e9f499eUL, 0xfd2b83ceUL,
1794     0x3f64aad7UL, 0x637b73afUL, 0xbe83487cUL, 0xe522591aUL, 0xbf3fc092UL,
1795     0xa158e8bcUL, 0x3e6e3aaeUL, 0xe5e82ffaUL, 0x3f329d2fUL, 0xd636a000UL,
1796     0xbfb9477fUL, 0xc2c2d2bcUL, 0xbd135ef9UL, 0x00000000UL, 0x00000000UL,
1797     0xf2fdb123UL, 0x3fd5b566UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL,
1798     0xfffffff8UL, 0xc41acb64UL, 0xbf05448dUL, 0x00000000UL, 0x00000000UL,
1799     0xdbb03d6fUL, 0x3efb7ad2UL, 0x00000000UL, 0x00000000UL, 0x9e42962dUL,
1800     0xbed5aea5UL, 0x2579f8efUL, 0xbf8b2398UL, 0x288a1ed9UL, 0x3ec81441UL,
1801     0xb0198dc5UL, 0x3f979a3aUL, 0x2fdfe253UL, 0xbea57cd3UL, 0x5766336fUL,
1802     0xbf617caaUL, 0x600944c3UL, 0x3e954ed6UL, 0xa4e0aaf8UL, 0x3f62c646UL,
1803     0x6b8fb29cUL, 0xbe74e3a3UL, 0xdc4c0409UL, 0xbf33f952UL, 0x9bffe365UL,
1804     0x3e6301ecUL, 0xb8869e44UL, 0x3f2fc566UL, 0xe1e04000UL, 0xbfb0cc62UL,
1805     0x016b907fUL, 0xbd119cbcUL, 0x00000000UL, 0x00000000UL, 0xe6b9d8faUL,
1806     0x3fd57fb3UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL,
1807     0x5daf22a6UL, 0xbef429d7UL, 0x00000000UL, 0x00000000UL, 0x06bca545UL,
1808     0x3ef7a27dUL, 0x00000000UL, 0x00000000UL, 0x7211c19aUL, 0xbec41c3eUL,
1809     0x956ed53eUL, 0xbf7ae3f4UL, 0xee750e72UL, 0x3ec3901bUL, 0x91d443f5UL,
1810     0x3f96f713UL, 0x36661e6cUL, 0xbe936e09UL, 0x506f9381UL, 0xbf5122e8UL,
1811     0xcb6dd43fUL, 0x3e9041b9UL, 0x6698b2ffUL, 0x3f61b0c7UL, 0x576bf12bUL,
1812     0xbe625a8aUL, 0xe5a0e9dcUL, 0xbf23499dUL, 0x110384ddUL, 0x3e5b1c2cUL,
1813     0x68d43db6UL, 0x3f2cb899UL, 0x6ecac000UL, 0xbfa0c414UL, 0xcd7dd58cUL,
1814     0x3d13500fUL, 0x00000000UL, 0x00000000UL, 0x85a2c8fbUL, 0x3fd55fe0UL,
1815     0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x00000000UL,
1816     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x2bf70ebeUL, 0x3ef66a8fUL,
1817     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
1818     0x00000000UL, 0xd644267fUL, 0x3ec22805UL, 0x16c16c17UL, 0x3f96c16cUL,
1819     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0xc4e09162UL,
1820     0x3e8d6db2UL, 0xbc011567UL, 0x3f61566aUL, 0x00000000UL, 0x00000000UL,
1821     0x00000000UL, 0x00000000UL, 0x1f79955cUL, 0x3e57da4eUL, 0x9334ef0bUL,
1822     0x3f2bbd77UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
1823     0x00000000UL, 0x00000000UL, 0x55555555UL, 0x3fd55555UL, 0x00000000UL,
1824     0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x5daf22a6UL, 0x3ef429d7UL,
1825     0x00000000UL, 0x00000000UL, 0x06bca545UL, 0x3ef7a27dUL, 0x00000000UL,
1826     0x00000000UL, 0x7211c19aUL, 0x3ec41c3eUL, 0x956ed53eUL, 0x3f7ae3f4UL,
1827     0xee750e72UL, 0x3ec3901bUL, 0x91d443f5UL, 0x3f96f713UL, 0x36661e6cUL,
1828     0x3e936e09UL, 0x506f9381UL, 0x3f5122e8UL, 0xcb6dd43fUL, 0x3e9041b9UL,
1829     0x6698b2ffUL, 0x3f61b0c7UL, 0x576bf12bUL, 0x3e625a8aUL, 0xe5a0e9dcUL,
1830     0x3f23499dUL, 0x110384ddUL, 0x3e5b1c2cUL, 0x68d43db6UL, 0x3f2cb899UL,
1831     0x6ecac000UL, 0x3fa0c414UL, 0xcd7dd58cUL, 0xbd13500fUL, 0x00000000UL,
1832     0x00000000UL, 0x85a2c8fbUL, 0x3fd55fe0UL, 0x00000000UL, 0x3ff00000UL,
1833     0x00000000UL, 0xfffffff8UL, 0xc41acb64UL, 0x3f05448dUL, 0x00000000UL,
1834     0x00000000UL, 0xdbb03d6fUL, 0x3efb7ad2UL, 0x00000000UL, 0x00000000UL,
1835     0x9e42962dUL, 0x3ed5aea5UL, 0x2579f8efUL, 0x3f8b2398UL, 0x288a1ed9UL,
1836     0x3ec81441UL, 0xb0198dc5UL, 0x3f979a3aUL, 0x2fdfe253UL, 0x3ea57cd3UL,
1837     0x5766336fUL, 0x3f617caaUL, 0x600944c3UL, 0x3e954ed6UL, 0xa4e0aaf8UL,
1838     0x3f62c646UL, 0x6b8fb29cUL, 0x3e74e3a3UL, 0xdc4c0409UL, 0x3f33f952UL,
1839     0x9bffe365UL, 0x3e6301ecUL, 0xb8869e44UL, 0x3f2fc566UL, 0xe1e04000UL,
1840     0x3fb0cc62UL, 0x016b907fUL, 0x3d119cbcUL, 0x00000000UL, 0x00000000UL,
1841     0xe6b9d8faUL, 0x3fd57fb3UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL,
1842     0xfffffff8UL, 0x1a154b97UL, 0x3f116b01UL, 0x00000000UL, 0x00000000UL,
1843     0x2d427630UL, 0x3f0147bfUL, 0x00000000UL, 0x00000000UL, 0xb93820c8UL,
1844     0x3ee264d4UL, 0xbb6cbb18UL, 0x3f94ab8cUL, 0x888d4d92UL, 0x3ed0568bUL,
1845     0x60730f7cUL, 0x3f98b19bUL, 0xe4b1fb11UL, 0x3eb2f950UL, 0x22cf9f74UL,
1846     0x3f6b21cdUL, 0x4a3ff0a6UL, 0x3e9f499eUL, 0xfd2b83ceUL, 0x3f64aad7UL,
1847     0x637b73afUL, 0x3e83487cUL, 0xe522591aUL, 0x3f3fc092UL, 0xa158e8bcUL,
1848     0x3e6e3aaeUL, 0xe5e82ffaUL, 0x3f329d2fUL, 0xd636a000UL, 0x3fb9477fUL,
1849     0xc2c2d2bcUL, 0x3d135ef9UL, 0x00000000UL, 0x00000000UL, 0xf2fdb123UL,
1850     0x3fd5b566UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL,
1851     0x7d98a556UL, 0x3f1a3958UL, 0x00000000UL, 0x00000000UL, 0x9d88dc01UL,
1852     0x3f0704c2UL, 0x00000000UL, 0x00000000UL, 0x73742a2bUL, 0x3eed054aUL,
1853     0x58844587UL, 0x3f9c2a13UL, 0x55688a79UL, 0x3ed7a326UL, 0xee33f1d6UL,
1854     0x3f9a48f4UL, 0xa8dc9888UL, 0x3ebf8939UL, 0xaad4b5b8UL, 0x3f72f746UL,
1855     0x9102efa1UL, 0x3ea88f82UL, 0xdabc29cfUL, 0x3f678228UL, 0x9289afb8UL,
1856     0x3e90f456UL, 0x741fb4edUL, 0x3f46f3a3UL, 0xa97f6663UL, 0x3e79b4bfUL,
1857     0xca89ff3fUL, 0x3f36db70UL, 0xa8a2a000UL, 0x3fc0ee13UL, 0x3da24be1UL,
1858     0x3d338b9fUL, 0x00000000UL, 0x00000000UL, 0x11cd6c69UL, 0x3fd601fdUL,
1859     0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0xb9ff07ceUL,
1860     0x3f231c78UL, 0x00000000UL, 0x00000000UL, 0xa5517182UL, 0x3f0ff0e0UL,
1861     0x00000000UL, 0x00000000UL, 0x790b4cbcUL, 0x3ef66191UL, 0x848a46c6UL,
1862     0x3fa21ac0UL, 0xb16435faUL, 0x3ee1d3ecUL, 0x2a1aa832UL, 0x3f9c71eaUL,
1863     0xfdd299efUL, 0x3ec9dd1aUL, 0x3f8dbaafUL, 0x3f793363UL, 0x309fc6eaUL,
1864     0x3eb415d6UL, 0xbee60471UL, 0x3f6b83baUL, 0x94a0a697UL, 0x3e9dae11UL,
1865     0x3e5c67b3UL, 0x3f4fd07bUL, 0x9a8f3e3eUL, 0x3e86bd75UL, 0xa4beb7a4UL,
1866     0x3f3d1eb1UL, 0x29cfc000UL, 0x3fc549ceUL, 0xbf159358UL, 0x3d397b33UL,
1867     0x00000000UL, 0x00000000UL, 0x871fee6cUL, 0x3fd666f0UL, 0x00000000UL,
1868     0x3ff00000UL, 0x00000000UL, 0xfffffff8UL, 0x535ad890UL, 0x3f2b9320UL,
1869     0x00000000UL, 0x00000000UL, 0x018fdf1fUL, 0x3f16d61dUL, 0x00000000UL,
1870     0x00000000UL, 0x0359f1beUL, 0x3f0139e4UL, 0xa4317c6dUL, 0x3fa67e17UL,
1871     0x82672d0fUL, 0x3eebb405UL, 0x2f1b621eUL, 0x3f9f455bUL, 0x51ccf238UL,
1872     0x3ed55317UL, 0xf437b9acUL, 0x3f804beeUL, 0xc791a2b5UL, 0x3ec0e993UL,
1873     0x919a1db2UL, 0x3f7080c2UL, 0x336a5b0eUL, 0x3eaa48a2UL, 0x0a268358UL,
1874     0x3f55a443UL, 0xdfd978e4UL, 0x3e94b61fUL, 0xd7767a58UL, 0x3f431806UL,
1875     0x2aea0000UL, 0x3fc9bbe8UL, 0x7723ea61UL, 0x3d3a2369UL, 0x00000000UL,
1876     0x00000000UL, 0xdf7796ffUL, 0x3fd6e642UL, 0x00000000UL, 0x3ff00000UL,
1877     0x00000000UL, 0xfffffff8UL, 0x4f48b8d3UL, 0x3f33eaf9UL, 0x00000000UL,
1878     0x00000000UL, 0x0cf7586fUL, 0x3f20b8eaUL, 0x00000000UL, 0x00000000UL,
1879     0xd0258911UL, 0x3f0abaf3UL, 0x23e49fe9UL, 0x3fab5a8cUL, 0x2d53222eUL,
1880     0x3ef60d15UL, 0x21169451UL, 0x3fa172b2UL, 0xbb254dbcUL, 0x3ee1d3b5UL,
1881     0xdbf93b8eUL, 0x3f84c7dbUL, 0x05b4630bUL, 0x3ecd3364UL, 0xee9aada7UL,
1882     0x3f743924UL, 0x794a8297UL, 0x3eb7b7b9UL, 0xe015f797UL, 0x3f5d41f5UL,
1883     0xe41a4a56UL, 0x3ea35dfbUL, 0xe4c2a251UL, 0x3f49a2abUL, 0x5af9e000UL,
1884     0x3fce49ceUL, 0x8c743719UL, 0xbd1eb860UL, 0x00000000UL, 0x00000000UL,
1885     0x1b4863cfUL, 0x3fd78294UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL,
1886     0xfffffff8UL, 0x65965966UL, 0xc0219659UL, 0x00000000UL, 0x00000000UL,
1887     0x882c10faUL, 0x402664f4UL, 0x00000000UL, 0x00000000UL, 0x83cd3723UL,
1888     0xc02c8342UL, 0x00000000UL, 0xc0000000UL, 0x55e6c23dUL, 0x403226e3UL,
1889     0x55555555UL, 0x40055555UL, 0x34451939UL, 0xc0371c96UL, 0xaaaaaaabUL,
1890     0xc00aaaaaUL, 0x0e157de0UL, 0x403d6d3dUL, 0x11111111UL, 0x40111111UL,
1891     0xa738201fUL, 0xc042bbceUL, 0x05b05b06UL, 0xc015b05bUL, 0x452b75e3UL,
1892     0x4047da36UL, 0x1ba1ba1cUL, 0x401ba1baUL, 0x00000000UL, 0xbff00000UL,
1893     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x40000000UL, 0x00000000UL,
1894     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
1895     0xc7ab4d5aUL, 0xc0085e24UL, 0x00000000UL, 0x00000000UL, 0xe93ea75dUL,
1896     0x400b963dUL, 0x00000000UL, 0x00000000UL, 0x94a7f25aUL, 0xc00f37e2UL,
1897     0x4b6261cbUL, 0xbff5f984UL, 0x5a9dd812UL, 0x4011aab0UL, 0x74c30018UL,
1898     0x3ffaf5a5UL, 0x7f2ce8e3UL, 0xc013fe8bUL, 0xfe8e54faUL, 0xbffd7334UL,
1899     0x670d618dUL, 0x4016a10cUL, 0x4db97058UL, 0x4000e012UL, 0x24df44ddUL,
1900     0xc0199c5fUL, 0x697d6eceUL, 0xc003006eUL, 0x83298b82UL, 0x401cfc4dUL,
1901     0x19d490d6UL, 0x40058c19UL, 0x2ae42850UL, 0xbfea4300UL, 0x118e20e6UL,
1902     0x3c7a6db8UL, 0x00000000UL, 0x40000000UL, 0xe33345b8UL, 0xbfd4e526UL,
1903     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x2b2c49d0UL,
1904     0xbff2de9cUL, 0x00000000UL, 0x00000000UL, 0x2655bc98UL, 0x3ff33e58UL,
1905     0x00000000UL, 0x00000000UL, 0xff691fa2UL, 0xbff3972eUL, 0xe93463bdUL,
1906     0xbfeeed87UL, 0x070e10a0UL, 0x3ff3f5b2UL, 0xf4d790a4UL, 0x3ff20c10UL,
1907     0xa04e8ea3UL, 0xbff4541aUL, 0x386accd3UL, 0xbff1369eUL, 0x222a66ddUL,
1908     0x3ff4b521UL, 0x22a9777eUL, 0x3ff20817UL, 0x52a04a6eUL, 0xbff5178fUL,
1909     0xddaa0031UL, 0xbff22137UL, 0x4447d47cUL, 0x3ff57c01UL, 0x1e9c7f1dUL,
1910     0x3ff29311UL, 0x2ab7f990UL, 0xbfe561b8UL, 0x209c7df1UL, 0xbc87a8c5UL,
1911     0x00000000UL, 0x3ff00000UL, 0x4170bcc6UL, 0x3fdc92d8UL, 0x00000000UL,
1912     0x00000000UL, 0x00000000UL, 0x00000000UL, 0xcc03e501UL, 0xbfdff10fUL,
1913     0x00000000UL, 0x00000000UL, 0x44a4e845UL, 0x3fddb63bUL, 0x00000000UL,
1914     0x00000000UL, 0x3768ad9fUL, 0xbfdb72a4UL, 0x3dd01ccaUL, 0xbfe5fdb9UL,
1915     0xa61d2811UL, 0x3fd972b2UL, 0x5645ad0bUL, 0x3fe977f9UL, 0xd013b3abUL,
1916     0xbfd78ca3UL, 0xbf0bf914UL, 0xbfe4f192UL, 0x4d53e730UL, 0x3fd5d060UL,
1917     0x3f8b9000UL, 0x3fe49933UL, 0xe2b82f08UL, 0xbfd4322aUL, 0x5936a835UL,
1918     0xbfe27ae1UL, 0xb1c61c9bUL, 0x3fd2b3fbUL, 0xef478605UL, 0x3fe1659eUL,
1919     0x190834ecUL, 0xbfe11ab7UL, 0xcdb625eaUL, 0x3c8e564bUL, 0x00000000UL,
1920     0x3ff00000UL, 0xb07217e3UL, 0x3fd248f1UL, 0x00000000UL, 0x00000000UL,
1921     0x00000000UL, 0x00000000UL, 0x56f37042UL, 0xbfccfc56UL, 0x00000000UL,
1922     0x00000000UL, 0xaa563951UL, 0x3fc90125UL, 0x00000000UL, 0x00000000UL,
1923     0x3d0e7c5dUL, 0xbfc50533UL, 0x9bed9b2eUL, 0xbfdf0ed9UL, 0x5fe7c47cUL,
1924     0x3fc1f250UL, 0x96c125e5UL, 0x3fe2edd9UL, 0x5a02bbd8UL, 0xbfbe5c71UL,
1925     0x86362c20UL, 0xbfda08b7UL, 0x4b4435edUL, 0x3fb9d342UL, 0x4b494091UL,
1926     0x3fd911bdUL, 0xb56658beUL, 0xbfb5e4c7UL, 0x93a2fd76UL, 0xbfd3c092UL,
1927     0xda271794UL, 0x3fb29910UL, 0x3303df2bUL, 0x3fd189beUL, 0x99fcef32UL,
1928     0xbfda8279UL, 0xb68c1467UL, 0xbc708b2fUL, 0x00000000UL, 0x3ff00000UL,
1929     0x980c4337UL, 0x3fc5f619UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
1930     0x00000000UL, 0x9314533eUL, 0xbfbb8ec5UL, 0x00000000UL, 0x00000000UL,
1931     0x09aa36d0UL, 0x3fb6d3f4UL, 0x00000000UL, 0x00000000UL, 0xdcb427fdUL,
1932     0xbfb13950UL, 0xd87ab0bbUL, 0xbfd5335eUL, 0xce0ae8a5UL, 0x3fabb382UL,
1933     0x79143126UL, 0x3fddba41UL, 0x5f2b28d4UL, 0xbfa552f1UL, 0x59f21a6dUL,
1934     0xbfd015abUL, 0x22c27d95UL, 0x3fa0e984UL, 0xe19fc6aaUL, 0x3fd0576cUL,
1935     0x8f2c2950UL, 0xbf9a4898UL, 0xc0b3f22cUL, 0xbfc59462UL, 0x1883a4b8UL,
1936     0x3f94b61cUL, 0x3f838640UL, 0x3fc30eb8UL, 0x355c63dcUL, 0xbfd36a08UL,
1937     0x1dce993dUL, 0x3c6d704dUL, 0x00000000UL, 0x3ff00000UL, 0x2b82ab63UL,
1938     0x3fb78e92UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL,
1939     0x5a279ea3UL, 0xbfaa3407UL, 0x00000000UL, 0x00000000UL, 0x432d65faUL,
1940     0x3fa70153UL, 0x00000000UL, 0x00000000UL, 0x891a4602UL, 0xbf9d03efUL,
1941     0xd62ca5f8UL, 0xbfca77d9UL, 0xb35f4628UL, 0x3f97a265UL, 0x433258faUL,
1942     0x3fd8cf51UL, 0xb58fd909UL, 0xbf8f88e3UL, 0x01771ceaUL, 0xbfc2b154UL,
1943     0xf3562f8eUL, 0x3f888f57UL, 0xc028a723UL, 0x3fc7370fUL, 0x20b7f9f0UL,
1944     0xbf80f44cUL, 0x214368e9UL, 0xbfb6dfaaUL, 0x28891863UL, 0x3f79b4b6UL,
1945     0x172dbbf0UL, 0x3fb6cb8eUL, 0xe0553158UL, 0xbfc975f5UL, 0x593fe814UL,
1946     0xbc2ef5d3UL, 0x00000000UL, 0x3ff00000UL, 0x03dec550UL, 0x3fa44203UL,
1947     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x4e435f9bUL,
1948     0xbf953f83UL, 0x00000000UL, 0x00000000UL, 0x3c6e8e46UL, 0x3f9b74eaUL,
1949     0x00000000UL, 0x00000000UL, 0xda5b7511UL, 0xbf85ad63UL, 0xdc230b9bUL,
1950     0xbfb97558UL, 0x26cb3788UL, 0x3f881308UL, 0x76fc4985UL, 0x3fd62ac9UL,
1951     0x77bb08baUL, 0xbf757c85UL, 0xb6247521UL, 0xbfb1381eUL, 0x5922170cUL,
1952     0x3f754e95UL, 0x8746482dUL, 0x3fc27f83UL, 0x11055b30UL, 0xbf64e391UL,
1953     0x3e666320UL, 0xbfa3e609UL, 0x0de9dae3UL, 0x3f6301dfUL, 0x1f1dca06UL,
1954     0x3fafa8aeUL, 0x8c5b2da2UL, 0xbfb936bbUL, 0x4e88f7a5UL, 0xbc587d05UL,
1955     0x00000000UL, 0x3ff00000UL, 0xa8935dd9UL, 0x3f83dde2UL, 0x00000000UL,
1956     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x6dc9c883UL, 0x3fe45f30UL,
1957     0x6dc9c883UL, 0x40245f30UL, 0x00000000UL, 0x43780000UL, 0x00000000UL,
1958     0x43380000UL, 0x54444000UL, 0x3fb921fbUL, 0x54440000UL, 0x3fb921fbUL,
1959     0x67674000UL, 0xbd32e7b9UL, 0x4c4c0000UL, 0x3d468c23UL, 0x3707344aUL,
1960     0x3aa8a2e0UL, 0x03707345UL, 0x3ae98a2eUL, 0x00000000UL, 0x80000000UL,
1961     0x00000000UL, 0x80000000UL, 0x676733afUL, 0x3d32e7b9UL, 0x00000000UL,
1962     0x00000000UL, 0x00000000UL, 0x3ff00000UL, 0x00000000UL, 0x00000000UL,
1963     0x00000000UL, 0x7ff00000UL, 0x00000000UL, 0x00000000UL, 0xfffc0000UL,
1964     0xffffffffUL, 0x00000000UL, 0x00000000UL, 0x00000000UL, 0x43600000UL,
1965     0x00000000UL, 0x00000000UL, 0x00000000UL, 0x3c800000UL, 0x00000000UL,
1966     0x00000000UL, 0x00000000UL, 0x3ca00000UL, 0x00000000UL, 0x00000000UL,
1967     0x00000000UL, 0x3fe00000UL, 0x00000000UL, 0x3fe00000UL, 0x00000000UL,
1968     0x40300000UL, 0x00000000UL, 0x3ff00000UL
1969 };
1970 
1971 void MacroAssembler::fast_tan(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xmm2, XMMRegister xmm3, XMMRegister xmm4, XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, Register eax, Register ecx, Register edx, Register tmp) {
1972 
1973   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;
1974   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;
1975   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;
1976   Label L_2TAG_PACKET_12_0_2, L_2TAG_PACKET_13_0_2, B1_3, B1_5, start;
1977 
1978   assert_different_registers(tmp, eax, ecx, edx);
1979 
1980   address static_const_table_tan = (address)_static_const_table_tan;
1981 
1982   bind(start);
1983   subl(rsp, 120);
1984   movl(Address(rsp, 56), tmp);
1985   lea(tmp, ExternalAddress(static_const_table_tan));
1986   movsd(xmm0, Address(rsp, 128));
1987   pextrw(eax, xmm0, 3);
1988   andl(eax, 32767);
1989   subl(eax, 14368);
1990   cmpl(eax, 2216);
1991   jcc(Assembler::above, L_2TAG_PACKET_0_0_2);
1992   movdqu(xmm5, Address(tmp, 5840));
1993   movdqu(xmm6, Address(tmp, 5856));
1994   unpcklpd(xmm0, xmm0);
1995   movdqu(xmm4, Address(tmp, 5712));
1996   andpd(xmm4, xmm0);
1997   movdqu(xmm1, Address(tmp, 5632));
1998   mulpd(xmm1, xmm0);
1999   por(xmm5, xmm4);
2000   addpd(xmm1, xmm5);
2001   movdqu(xmm7, xmm1);
2002   unpckhpd(xmm7, xmm7);
2003   cvttsd2sil(edx, xmm7);
2004   cvttpd2dq(xmm1, xmm1);
2005   cvtdq2pd(xmm1, xmm1);
2006   mulpd(xmm1, xmm6);
2007   movdqu(xmm3, Address(tmp, 5664));
2008   movsd(xmm5, Address(tmp, 5728));
2009   addl(edx, 469248);
2010   movdqu(xmm4, Address(tmp, 5680));
2011   mulpd(xmm3, xmm1);
2012   andl(edx, 31);
2013   mulsd(xmm5, xmm1);
2014   movl(ecx, edx);
2015   mulpd(xmm4, xmm1);
2016   shll(ecx, 1);
2017   subpd(xmm0, xmm3);
2018   mulpd(xmm1, Address(tmp, 5696));
2019   addl(edx, ecx);
2020   shll(ecx, 2);
2021   addl(edx, ecx);
2022   addsd(xmm5, xmm0);
2023   movdqu(xmm2, xmm0);
2024   subpd(xmm0, xmm4);
2025   movsd(xmm6, Address(tmp, 5744));
2026   shll(edx, 4);
2027   lea(eax, Address(tmp, 0));
2028   andpd(xmm5, Address(tmp, 5776));
2029   movdqu(xmm3, xmm0);
2030   addl(eax, edx);
2031   subpd(xmm2, xmm0);
2032   unpckhpd(xmm0, xmm0);
2033   divsd(xmm6, xmm5);
2034   subpd(xmm2, xmm4);
2035   movdqu(xmm7, Address(eax, 16));
2036   subsd(xmm3, xmm5);
2037   mulpd(xmm7, xmm0);
2038   subpd(xmm2, xmm1);
2039   movdqu(xmm1, Address(eax, 48));
2040   mulpd(xmm1, xmm0);
2041   movdqu(xmm4, Address(eax, 96));
2042   mulpd(xmm4, xmm0);
2043   addsd(xmm2, xmm3);
2044   movdqu(xmm3, xmm0);
2045   mulpd(xmm0, xmm0);
2046   addpd(xmm7, Address(eax, 0));
2047   addpd(xmm1, Address(eax, 32));
2048   mulpd(xmm1, xmm0);
2049   addpd(xmm4, Address(eax, 80));
2050   addpd(xmm7, xmm1);
2051   movdqu(xmm1, Address(eax, 112));
2052   mulpd(xmm1, xmm0);
2053   mulpd(xmm0, xmm0);
2054   addpd(xmm4, xmm1);
2055   movdqu(xmm1, Address(eax, 64));
2056   mulpd(xmm1, xmm0);
2057   addpd(xmm7, xmm1);
2058   movdqu(xmm1, xmm3);
2059   mulpd(xmm3, xmm0);
2060   mulsd(xmm0, xmm0);
2061   mulpd(xmm1, Address(eax, 144));
2062   mulpd(xmm4, xmm3);
2063   movdqu(xmm3, xmm1);
2064   addpd(xmm7, xmm4);
2065   movdqu(xmm4, xmm1);
2066   mulsd(xmm0, xmm7);
2067   unpckhpd(xmm7, xmm7);
2068   addsd(xmm0, xmm7);
2069   unpckhpd(xmm1, xmm1);
2070   addsd(xmm3, xmm1);
2071   subsd(xmm4, xmm3);
2072   addsd(xmm1, xmm4);
2073   movdqu(xmm4, xmm2);
2074   movsd(xmm7, Address(eax, 144));
2075   unpckhpd(xmm2, xmm2);
2076   addsd(xmm7, Address(eax, 152));
2077   mulsd(xmm7, xmm2);
2078   addsd(xmm7, Address(eax, 136));
2079   addsd(xmm7, xmm1);
2080   addsd(xmm0, xmm7);
2081   movsd(xmm7, Address(tmp, 5744));
2082   mulsd(xmm4, xmm6);
2083   movsd(xmm2, Address(eax, 168));
2084   andpd(xmm2, xmm6);
2085   mulsd(xmm5, xmm2);
2086   mulsd(xmm6, Address(eax, 160));
2087   subsd(xmm7, xmm5);
2088   subsd(xmm2, Address(eax, 128));
2089   subsd(xmm7, xmm4);
2090   mulsd(xmm7, xmm6);
2091   movdqu(xmm4, xmm3);
2092   subsd(xmm3, xmm2);
2093   addsd(xmm2, xmm3);
2094   subsd(xmm4, xmm2);
2095   addsd(xmm0, xmm4);
2096   subsd(xmm0, xmm7);
2097   addsd(xmm0, xmm3);
2098   movsd(Address(rsp, 0), xmm0);
2099   fld_d(Address(rsp, 0));
2100   jmp(L_2TAG_PACKET_1_0_2);
2101 
2102   bind(L_2TAG_PACKET_0_0_2);
2103   jcc(Assembler::greater, L_2TAG_PACKET_2_0_2);
2104   shrl(eax, 4);
2105   cmpl(eax, 268434558);
2106   jcc(Assembler::notEqual, L_2TAG_PACKET_3_0_2);
2107   movdqu(xmm3, xmm0);
2108   mulsd(xmm3, Address(tmp, 5808));
2109 
2110   bind(L_2TAG_PACKET_3_0_2);
2111   movsd(xmm3, Address(tmp, 5792));
2112   mulsd(xmm3, xmm0);
2113   addsd(xmm3, xmm0);
2114   mulsd(xmm3, Address(tmp, 5808));
2115   movsd(Address(rsp, 0), xmm3);
2116   fld_d(Address(rsp, 0));
2117   jmp(L_2TAG_PACKET_1_0_2);
2118 
2119   bind(L_2TAG_PACKET_2_0_2);
2120   movq(xmm7, Address(tmp, 5712));
2121   andpd(xmm7, xmm0);
2122   xorpd(xmm7, xmm0);
2123   ucomisd(xmm7, Address(tmp, 5760));
2124   jcc(Assembler::equal, L_2TAG_PACKET_4_0_2);
2125   subl(rsp, 32);
2126   movsd(Address(rsp, 0), xmm0);
2127   lea(eax, Address(rsp, 40));
2128   movl(Address(rsp, 8), eax);
2129   movl(eax, 2);
2130   movl(Address(rsp, 12), eax);
2131   call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dlibm_tan_cot_huge())));
2132   addl(rsp, 32);
2133   fld_d(Address(rsp, 8));
2134   jmp(L_2TAG_PACKET_1_0_2);
2135 
2136   bind(L_2TAG_PACKET_4_0_2);
2137   movq(Address(rsp, 0), xmm0);
2138   fld_d(Address(rsp, 0));
2139   fsub_d(Address(rsp, 0));
2140 
2141   bind(L_2TAG_PACKET_1_0_2);
2142   movl(tmp, Address(rsp, 56));
2143 }
2144 #endif