• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2Copyright (c) 2014, Intel Corporation
3All rights reserved.
4Redistribution and use in source and binary forms, with or without
5modification, are permitted provided that the following conditions are met:
6    * Redistributions of source code must retain the above copyright notice,
7    * this list of conditions and the following disclaimer.
8    * Redistributions in binary form must reproduce the above copyright notice,
9    * this list of conditions and the following disclaimer in the documentation
10    * and/or other materials provided with the distribution.
11    * Neither the name of Intel Corporation nor the names of its contributors
12    * may be used to endorse or promote products derived from this software
13    * without specific prior written permission.
14THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24*/
25
26#include <private/bionic_asm.h>
27
28ENTRY(rint)
29  subl    $12,%esp
30  movsd   16(%esp),%xmm0
31  roundsd $4,%xmm0,%xmm0
32  movsd   %xmm0,(%esp)
33  fldl    (%esp)
34  addl    $12,%esp
35  ret
36END(rint)
37
38// LP32 sizeof(long double) == sizeof(double).
39ALIAS_SYMBOL(rintl, rint);
40