summaryrefslogtreecommitdiff
path: root/libc/i386fp/fpulld.x
diff options
context:
space:
mode:
Diffstat (limited to 'libc/i386fp/fpulld.x')
-rw-r--r--libc/i386fp/fpulld.x20
1 files changed, 20 insertions, 0 deletions
diff --git a/libc/i386fp/fpulld.x b/libc/i386fp/fpulld.x
new file mode 100644
index 0000000..928a846
--- /dev/null
+++ b/libc/i386fp/fpulld.x
@@ -0,0 +1,20 @@
+! bcc 386 floating point routines (version 2) -- Fpulld
+! authors: Timothy Murphy (tim@maths.tcd.ie), Bruce Evans
+
+#include "fplib.h"
+
+! Pop double from stack and store at address [ebx]
+
+ .globl Fpulld
+ .align ALIGNMENT
+Fpulld:
+ pop ecx
+ pop dword D_LOW[ebx]
+ pop dword D_HIGH[ebx]
+ jmp ecx ! return
+
+! This popping method is much slower on 486's because popping to memory
+! takes 5+ while moving twice takes 2 and the return address doesn't
+! have to be moved. However, popping is a little faster on a non-cached
+! 386/20 with static column RAM although the memory access pattern is
+! better for a double-width move than for popping. What about a cached 386?