summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/math/i386/atan2.s
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/math/i386/atan2.s')
-rw-r--r--libc-top-half/musl/src/math/i386/atan2.s15
1 files changed, 15 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/math/i386/atan2.s b/libc-top-half/musl/src/math/i386/atan2.s
new file mode 100644
index 0000000..8bc441b
--- /dev/null
+++ b/libc-top-half/musl/src/math/i386/atan2.s
@@ -0,0 +1,15 @@
+.global atan2
+.type atan2,@function
+atan2:
+ fldl 4(%esp)
+ fldl 12(%esp)
+ fpatan
+ fstpl 4(%esp)
+ fldl 4(%esp)
+ mov 8(%esp),%eax
+ add %eax,%eax
+ cmp $0x00200000,%eax
+ jae 1f
+ # subnormal x, return x with underflow
+ fsts 4(%esp)
+1: ret