summaryrefslogtreecommitdiffstats
path: root/lib/libc/amd64/stdlib/ldiv.S
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/amd64/stdlib/ldiv.S')
-rw-r--r--lib/libc/amd64/stdlib/ldiv.S15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/libc/amd64/stdlib/ldiv.S b/lib/libc/amd64/stdlib/ldiv.S
new file mode 100644
index 0000000..de952f0
--- /dev/null
+++ b/lib/libc/amd64/stdlib/ldiv.S
@@ -0,0 +1,15 @@
+/* $NetBSD: ldiv.S,v 1.1 2001/06/19 00:25:04 fvdl Exp $ */
+
+/*-
+ * Written by gcc 3.0.
+ * Copy/pasted by Frank van der Linden (fvdl@wasabisystems.com)
+ */
+
+#include <machine/asm.h>
+__FBSDID("$FreeBSD$");
+
+ENTRY(ldiv)
+ movq %rdi,%rax
+ cqto
+ idivq %rsi
+ ret
OpenPOWER on IntegriCloud