Skip to content
Snippets Groups Projects
Commit 4bc96b95 authored by Avi Kivity's avatar Avi Kivity
Browse files

libc: drop sse4.1 ceil(), floor()

The dependency on sse4.1 crashes on older cpus, use the generic musl
implementation.
parent e93b0a25
No related branches found
No related tags found
No related merge requests found
#include <math.h>
#include <osv/types.h>
// FIXME: check for sse4.1
double ceil(double v)
{
double r;
asm("roundsd $2, %1, %0" : "=x"(r) : "x"(v));
return r;
}
double floor(double v)
{
double r;
asm("roundsd $1, %1, %0" : "=x"(r) : "x"(v));
return r;
}
extern "C"
int __isnan(double v)
{
......
......@@ -165,7 +165,7 @@ libc += math/atanl.o
libc += math/cbrt.o
libc += math/cbrtf.o
libc += math/cbrtl.o
#libc += math/ceil.o
libc += math/ceil.o
libc += math/ceilf.o
libc += math/ceill.o
libc += math/copysign.o
......@@ -198,7 +198,7 @@ libc += math/fabsl.o
libc += math/fdim.o
libc += math/fdimf.o
libc += math/fdiml.o
#libc += math/floor.o
libc += math/floor.o
libc += math/floorf.o
libc += math/floorl.o
#libc += math/fma.o
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment