1 /
   2 / CDDL HEADER START
   3 /
   4 / The contents of this file are subject to the terms of the
   5 / Common Development and Distribution License (the "License").
   6 / You may not use this file except in compliance with the License.
   7 /
   8 / You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 / or http://www.opensolaris.org/os/licensing.
  10 / See the License for the specific language governing permissions
  11 / and limitations under the License.
  12 /
  13 / When distributing Covered Code, include this CDDL HEADER in each
  14 / file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 / If applicable, add the following below this CDDL HEADER, with the
  16 / fields enclosed by brackets "[]" replaced with your own identifying
  17 / information: Portions Copyright [yyyy] [name of copyright owner]
  18 /
  19 / CDDL HEADER END
  20 /
  21 / Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  22 /
  23 / Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  24 / Use is subject to license terms.
  25 /
  26         .inline __fenv_getcwsw,1
  27         movl    (%esp),%eax
  28         fstsw   (%eax)
  29         fstcw   2(%eax)
  30         .end
  31 
  32         .inline __fenv_setcwsw,1
  33         movl    (%esp),%eax
  34         movw    (%eax),%dx
  35         movw    2(%eax),%cx
  36         subl    $28,%esp
  37         fstenv  (%esp)
  38         movw    %cx,(%esp)
  39         movw    %dx,4(%esp)
  40         fldenv  (%esp)
  41         fwait
  42         addl    $28,%esp
  43         .end
  44 
  45         .inline __fenv_getmxcsr,1
  46         movl    (%esp),%eax
  47         stmxcsr (%eax)
  48         .end
  49 
  50         .inline __fenv_setmxcsr,1
  51         movl    (%esp),%eax
  52         ldmxcsr (%eax)
  53         .end
  54 
  55         .inline f2xm1,1
  56         fldt    (%esp)
  57         f2xm1
  58         .end
  59 
  60         .inline fyl2x,2
  61         fldt    (%esp)
  62         fldt    12(%esp)
  63         fyl2x
  64         .end
  65 
  66         .inline fptan,1
  67         fldt    (%esp)
  68         fptan
  69         fstpt   (%esp)
  70         .end
  71 
  72         .inline fpatan,2
  73         fldt    (%esp)
  74         fldt    12(%esp)
  75         fpatan
  76         .end
  77 
  78         .inline fxtract,1
  79         fldt    (%esp)
  80         fxtract
  81         .end
  82 
  83         .inline fprem1,2
  84         fldt    (%esp)
  85         fldt    12(%esp)
  86         fprem1
  87         fstp    %st(1)
  88         .end
  89 
  90         .inline fprem,2
  91         fldt    (%esp)
  92         fldt    12(%esp)
  93         fprem
  94         fstp    %st(1)
  95         .end
  96 
  97         .inline fyl2xp1,2
  98         fldt    (%esp)
  99         fldt    12(%esp)
 100         fyl2xp1
 101         .end
 102 
 103         .inline fsqrt,1
 104         fldt    (%esp)
 105         fsqrt
 106         .end
 107 
 108         .inline fsincos,1
 109         fldt    (%esp)
 110         fsincos
 111         .end
 112 
 113         .inline frndint,1
 114         fldt    (%esp)
 115         frndint
 116         .end
 117 
 118         .inline fscale,2
 119         fldt    (%esp)
 120         fldt    12(%esp)
 121         fscale
 122         fstp    %st(1)
 123         .end
 124 
 125         .inline fsin,1
 126         fldt    (%esp)
 127         fsin
 128         .end
 129 
 130         .inline fcos,1
 131         fldt    (%esp)
 132         fcos
 133         .end
 134 
 135         .inline sse_cmpeqss,3
 136         movl    (%esp),%eax
 137         movl    4(%esp),%edx
 138         movl    8(%esp),%ecx
 139         movss   (%eax),%xmm0
 140         cmpeqss (%edx),%xmm0
 141         movss   %xmm0,(%ecx)
 142         .end
 143 
 144         .inline sse_cmpltss,3
 145         movl    (%esp),%eax
 146         movl    4(%esp),%edx
 147         movl    8(%esp),%ecx
 148         movss   (%eax),%xmm0
 149         cmpltss (%edx),%xmm0
 150         movss   %xmm0,(%ecx)
 151         .end
 152 
 153         .inline sse_cmpless,3
 154         movl    (%esp),%eax
 155         movl    4(%esp),%edx
 156         movl    8(%esp),%ecx
 157         movss   (%eax),%xmm0
 158         cmpless (%edx),%xmm0
 159         movss   %xmm0,(%ecx)
 160         .end
 161 
 162         .inline sse_cmpunordss,3
 163         movl    (%esp),%eax
 164         movl    4(%esp),%edx
 165         movl    8(%esp),%ecx
 166         movss   (%eax),%xmm0
 167         cmpunordss      (%edx),%xmm0
 168         movss   %xmm0,(%ecx)
 169         .end
 170 
 171         .inline sse_minss,3
 172         movl    (%esp),%eax
 173         movl    4(%esp),%edx
 174         movl    8(%esp),%ecx
 175         movss   (%eax),%xmm0
 176         minss   (%edx),%xmm0
 177         movss   %xmm0,(%ecx)
 178         .end
 179 
 180         .inline sse_maxss,3
 181         movl    (%esp),%eax
 182         movl    4(%esp),%edx
 183         movl    8(%esp),%ecx
 184         movss   (%eax),%xmm0
 185         maxss   (%edx),%xmm0
 186         movss   %xmm0,(%ecx)
 187         .end
 188 
 189         .inline sse_addss,3
 190         movl    (%esp),%eax
 191         movl    4(%esp),%edx
 192         movl    8(%esp),%ecx
 193         movss   (%eax),%xmm0
 194         addss   (%edx),%xmm0
 195         movss   %xmm0,(%ecx)
 196         .end
 197 
 198         .inline sse_subss,3
 199         movl    (%esp),%eax
 200         movl    4(%esp),%edx
 201         movl    8(%esp),%ecx
 202         movss   (%eax),%xmm0
 203         subss   (%edx),%xmm0
 204         movss   %xmm0,(%ecx)
 205         .end
 206 
 207         .inline sse_mulss,3
 208         movl    (%esp),%eax
 209         movl    4(%esp),%edx
 210         movl    8(%esp),%ecx
 211         movss   (%eax),%xmm0
 212         mulss   (%edx),%xmm0
 213         movss   %xmm0,(%ecx)
 214         .end
 215 
 216         .inline sse_divss,3
 217         movl    (%esp),%eax
 218         movl    4(%esp),%edx
 219         movl    8(%esp),%ecx
 220         movss   (%eax),%xmm0
 221         divss   (%edx),%xmm0
 222         movss   %xmm0,(%ecx)
 223         .end
 224 
 225         .inline sse_sqrtss,2
 226         movl    (%esp),%eax
 227         movl    4(%esp),%edx
 228         sqrtss  (%eax),%xmm0
 229         movss   %xmm0,(%edx)
 230         .end
 231 
 232         .inline sse_ucomiss,2
 233         movl    (%esp),%eax
 234         movl    4(%esp),%edx
 235         movss   (%eax),%xmm0
 236         ucomiss (%edx),%xmm0
 237         .end
 238 
 239         .inline sse_comiss,2
 240         movl    (%esp),%eax
 241         movl    4(%esp),%edx
 242         movss   (%eax),%xmm0
 243         comiss  (%edx),%xmm0
 244         .end
 245 
 246         .inline sse_cvtss2sd,2
 247         movl    (%esp),%eax
 248         movl    4(%esp),%edx
 249         cvtss2sd        (%eax),%xmm0
 250         movsd   %xmm0,(%edx)
 251         .end
 252 
 253         .inline sse_cvtsi2ss,2
 254         movl    (%esp),%eax
 255         movl    4(%esp),%edx
 256         cvtsi2ss        (%eax),%xmm0
 257         movss   %xmm0,(%edx)
 258         .end
 259 
 260         .inline sse_cvttss2si,2
 261         movl    (%esp),%eax
 262         movl    4(%esp),%edx
 263         cvttss2si       (%eax),%ecx
 264         movl    %ecx,(%edx)
 265         .end
 266 
 267         .inline sse_cvtss2si,2
 268         movl    (%esp),%eax
 269         movl    4(%esp),%edx
 270         cvtss2si        (%eax),%ecx
 271         movl    %ecx,(%edx)
 272         .end
 273 
 274         .inline sse_cmpeqsd,3
 275         movl    (%esp),%eax
 276         movl    4(%esp),%edx
 277         movl    8(%esp),%ecx
 278         movsd   (%eax),%xmm0
 279         cmpeqsd (%edx),%xmm0
 280         movsd   %xmm0,(%ecx)
 281         .end
 282 
 283         .inline sse_cmpltsd,3
 284         movl    (%esp),%eax
 285         movl    4(%esp),%edx
 286         movl    8(%esp),%ecx
 287         movsd   (%eax),%xmm0
 288         cmpltsd (%edx),%xmm0
 289         movsd   %xmm0,(%ecx)
 290         .end
 291 
 292         .inline sse_cmplesd,3
 293         movl    (%esp),%eax
 294         movl    4(%esp),%edx
 295         movl    8(%esp),%ecx
 296         movsd   (%eax),%xmm0
 297         cmplesd (%edx),%xmm0
 298         movsd   %xmm0,(%ecx)
 299         .end
 300 
 301         .inline sse_cmpunordsd,3
 302         movl    (%esp),%eax
 303         movl    4(%esp),%edx
 304         movl    8(%esp),%ecx
 305         movsd   (%eax),%xmm0
 306         cmpunordsd      (%edx),%xmm0
 307         movsd   %xmm0,(%ecx)
 308         .end
 309 
 310         .inline sse_minsd,3
 311         movl    (%esp),%eax
 312         movl    4(%esp),%edx
 313         movl    8(%esp),%ecx
 314         movsd   (%eax),%xmm0
 315         minsd   (%edx),%xmm0
 316         movsd   %xmm0,(%ecx)
 317         .end
 318 
 319         .inline sse_maxsd,3
 320         movl    (%esp),%eax
 321         movl    4(%esp),%edx
 322         movl    8(%esp),%ecx
 323         movsd   (%eax),%xmm0
 324         maxsd   (%edx),%xmm0
 325         movsd   %xmm0,(%ecx)
 326         .end
 327 
 328         .inline sse_addsd,3
 329         movl    (%esp),%eax
 330         movl    4(%esp),%edx
 331         movl    8(%esp),%ecx
 332         movsd   (%eax),%xmm0
 333         addsd   (%edx),%xmm0
 334         movsd   %xmm0,(%ecx)
 335         .end
 336 
 337         .inline sse_subsd,3
 338         movl    (%esp),%eax
 339         movl    4(%esp),%edx
 340         movl    8(%esp),%ecx
 341         movsd   (%eax),%xmm0
 342         subsd   (%edx),%xmm0
 343         movsd   %xmm0,(%ecx)
 344         .end
 345 
 346         .inline sse_mulsd,3
 347         movl    (%esp),%eax
 348         movl    4(%esp),%edx
 349         movl    8(%esp),%ecx
 350         movsd   (%eax),%xmm0
 351         mulsd   (%edx),%xmm0
 352         movsd   %xmm0,(%ecx)
 353         .end
 354 
 355         .inline sse_divsd,3
 356         movl    (%esp),%eax
 357         movl    4(%esp),%edx
 358         movl    8(%esp),%ecx
 359         movsd   (%eax),%xmm0
 360         divsd   (%edx),%xmm0
 361         movsd   %xmm0,(%ecx)
 362         .end
 363 
 364         .inline sse_sqrtsd,2
 365         movl    (%esp),%eax
 366         movl    4(%esp),%edx
 367         sqrtsd  (%eax),%xmm0
 368         movsd   %xmm0,(%edx)
 369         .end
 370 
 371         .inline sse_ucomisd,2
 372         movl    (%esp),%eax
 373         movl    4(%esp),%edx
 374         movsd   (%eax),%xmm0
 375         ucomisd (%edx),%xmm0
 376         .end
 377 
 378         .inline sse_comisd,2
 379         movl    (%esp),%eax
 380         movl    4(%esp),%edx
 381         movsd   (%eax),%xmm0
 382         comisd  (%edx),%xmm0
 383         .end
 384 
 385         .inline sse_cvtsd2ss,2
 386         movl    (%esp),%eax
 387         movl    4(%esp),%edx
 388         cvtsd2ss        (%eax),%xmm0
 389         movss   %xmm0,(%edx)
 390         .end
 391 
 392         .inline sse_cvtsi2sd,2
 393         movl    (%esp),%eax
 394         movl    4(%esp),%edx
 395         cvtsi2sd        (%eax),%xmm0
 396         movsd   %xmm0,(%edx)
 397         .end
 398 
 399         .inline sse_cvttsd2si,2
 400         movl    (%esp),%eax
 401         movl    4(%esp),%edx
 402         cvttsd2si       (%eax),%ecx
 403         movl    %ecx,(%edx)
 404         .end
 405 
 406         .inline sse_cvtsd2si,2
 407         movl    (%esp),%eax
 408         movl    4(%esp),%edx
 409         cvtsd2si        (%eax),%ecx
 410         movl    %ecx,(%edx)
 411         .end