about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authornsz <nsz@port70.net>2012-03-19 10:50:42 +0100
committernsz <nsz@port70.net>2012-03-19 10:50:42 +0100
commitf767aba8afe84d6117c7c0376122a5ff704a69df (patch)
tree852f30796aa34b7cda6892ded4b5ec51f333ae84 /src
parent9322344fa4c47a64361a81eda1b1930cd4341626 (diff)
parent0b70a1e9a9651d21242c5b6da327ecab0f1a38a6 (diff)
downloadmusl-f767aba8afe84d6117c7c0376122a5ff704a69df.tar.gz
musl-f767aba8afe84d6117c7c0376122a5ff704a69df.tar.xz
musl-f767aba8afe84d6117c7c0376122a5ff704a69df.zip
Merge branch 'master' of git://git.etalabs.net/musl
Diffstat (limited to 'src')
-rw-r--r--src/math/i386/ceil.s1
-rw-r--r--src/math/i386/ceilf.s1
-rw-r--r--src/math/i386/ceill.s1
-rw-r--r--src/math/i386/floor.s67
-rw-r--r--src/math/i386/floorf.s1
-rw-r--r--src/math/i386/floorl.s1
-rw-r--r--src/math/i386/trunc.s1
-rw-r--r--src/math/i386/truncf.s1
-rw-r--r--src/math/i386/truncl.s1
9 files changed, 75 insertions, 0 deletions
diff --git a/src/math/i386/ceil.s b/src/math/i386/ceil.s
new file mode 100644
index 00000000..bc29f15c
--- /dev/null
+++ b/src/math/i386/ceil.s
@@ -0,0 +1 @@
+# see floor.s
diff --git a/src/math/i386/ceilf.s b/src/math/i386/ceilf.s
new file mode 100644
index 00000000..bc29f15c
--- /dev/null
+++ b/src/math/i386/ceilf.s
@@ -0,0 +1 @@
+# see floor.s
diff --git a/src/math/i386/ceill.s b/src/math/i386/ceill.s
new file mode 100644
index 00000000..bc29f15c
--- /dev/null
+++ b/src/math/i386/ceill.s
@@ -0,0 +1 @@
+# see floor.s
diff --git a/src/math/i386/floor.s b/src/math/i386/floor.s
new file mode 100644
index 00000000..46ba88db
--- /dev/null
+++ b/src/math/i386/floor.s
@@ -0,0 +1,67 @@
+.global floorf
+.type floorf,@function
+floorf:
+	flds 4(%esp)
+	jmp 1f
+
+.global floorl
+.type floorl,@function
+floorl:
+	fldt 4(%esp)
+	jmp 1f
+
+.global floor
+.type floor,@function
+floor:
+	fldl 4(%esp)
+1:	mov $0x7,%al
+1:	fstcw 4(%esp)
+	mov 5(%esp),%ah
+	mov %al,5(%esp)
+	fldcw 4(%esp)
+	frndint
+	mov %ah,5(%esp)
+	fldcw 4(%esp)
+	ret
+
+.global ceil
+.type ceil,@function
+ceil:
+	fldl 4(%esp)
+	mov $0xb,%al
+	jmp 1b
+
+.global ceilf
+.type ceilf,@function
+ceilf:
+	flds 4(%esp)
+	mov $0xb,%al
+	jmp 1b
+
+.global ceill
+.type ceill,@function
+ceill:
+	fldt 4(%esp)
+	mov $0xb,%al
+	jmp 1b
+
+.global trunc
+.type trunc,@function
+trunc:
+	fldl 4(%esp)
+	mov $0xf,%al
+	jmp 1b
+
+.global truncf
+.type truncf,@function
+truncf:
+	flds 4(%esp)
+	mov $0xf,%al
+	jmp 1b
+
+.global truncl
+.type truncl,@function
+truncl:
+	fldt 4(%esp)
+	mov $0xf,%al
+	jmp 1b
diff --git a/src/math/i386/floorf.s b/src/math/i386/floorf.s
new file mode 100644
index 00000000..bc29f15c
--- /dev/null
+++ b/src/math/i386/floorf.s
@@ -0,0 +1 @@
+# see floor.s
diff --git a/src/math/i386/floorl.s b/src/math/i386/floorl.s
new file mode 100644
index 00000000..bc29f15c
--- /dev/null
+++ b/src/math/i386/floorl.s
@@ -0,0 +1 @@
+# see floor.s
diff --git a/src/math/i386/trunc.s b/src/math/i386/trunc.s
new file mode 100644
index 00000000..bc29f15c
--- /dev/null
+++ b/src/math/i386/trunc.s
@@ -0,0 +1 @@
+# see floor.s
diff --git a/src/math/i386/truncf.s b/src/math/i386/truncf.s
new file mode 100644
index 00000000..bc29f15c
--- /dev/null
+++ b/src/math/i386/truncf.s
@@ -0,0 +1 @@
+# see floor.s
diff --git a/src/math/i386/truncl.s b/src/math/i386/truncl.s
new file mode 100644
index 00000000..bc29f15c
--- /dev/null
+++ b/src/math/i386/truncl.s
@@ -0,0 +1 @@
+# see floor.s