summaryrefslogtreecommitdiffstats
path: root/lib/msun/i387/s_copysignl.S
diff options
context:
space:
mode:
Diffstat (limited to 'lib/msun/i387/s_copysignl.S')
-rw-r--r--lib/msun/i387/s_copysignl.S20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/msun/i387/s_copysignl.S b/lib/msun/i387/s_copysignl.S
new file mode 100644
index 0000000..b4143c0
--- /dev/null
+++ b/lib/msun/i387/s_copysignl.S
@@ -0,0 +1,20 @@
+/*
+ * Based on code written by J.T. Conklin <jtc@NetBSD.org>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$")
+
+ENTRY(copysignl)
+ movl 24(%esp),%edx
+ andl $0x8000,%edx
+ movl 12(%esp),%eax
+ andl $0x7fff,%eax
+ orl %edx,%eax
+ movl %eax,12(%esp)
+ fldt 4(%esp)
+ ret
+END(copysignl)
+
+ .section .note.GNU-stack,"",%progbits
OpenPOWER on IntegriCloud