mirror of https://git.musl-libc.org/git/musl
committed by
Rich Felker
8 changed files with 28 additions and 24 deletions
@ -0,0 +1,7 @@ |
|||||
|
#include <math.h> |
||||
|
|
||||
|
double rint(double x) |
||||
|
{ |
||||
|
__asm__ ("frndint" : "+t"(x)); |
||||
|
return x; |
||||
|
} |
||||
@ -1,6 +0,0 @@ |
|||||
.global rint |
|
||||
.type rint,@function |
|
||||
rint: |
|
||||
fldl 4(%esp) |
|
||||
frndint |
|
||||
ret |
|
||||
@ -0,0 +1,7 @@ |
|||||
|
#include <math.h> |
||||
|
|
||||
|
float rintf(float x) |
||||
|
{ |
||||
|
__asm__ ("frndint" : "+t"(x)); |
||||
|
return x; |
||||
|
} |
||||
@ -1,6 +0,0 @@ |
|||||
.global rintf |
|
||||
.type rintf,@function |
|
||||
rintf: |
|
||||
flds 4(%esp) |
|
||||
frndint |
|
||||
ret |
|
||||
@ -0,0 +1,7 @@ |
|||||
|
#include <math.h> |
||||
|
|
||||
|
long double rintl(long double x) |
||||
|
{ |
||||
|
__asm__ ("frndint" : "+t"(x)); |
||||
|
return x; |
||||
|
} |
||||
@ -1,6 +0,0 @@ |
|||||
.global rintl |
|
||||
.type rintl,@function |
|
||||
rintl: |
|
||||
fldt 4(%esp) |
|
||||
frndint |
|
||||
ret |
|
||||
@ -0,0 +1,7 @@ |
|||||
|
#include <math.h> |
||||
|
|
||||
|
long double rintl(long double x) |
||||
|
{ |
||||
|
__asm__ ("frndint" : "+t"(x)); |
||||
|
return x; |
||||
|
} |
||||
@ -1,6 +0,0 @@ |
|||||
.global rintl |
|
||||
.type rintl,@function |
|
||||
rintl: |
|
||||
fldt 8(%rsp) |
|
||||
frndint |
|
||||
ret |
|
||||
Loading…
Reference in new issue