summaryrefslogtreecommitdiff
path: root/jefs.s
diff options
context:
space:
mode:
Diffstat (limited to 'jefs.s')
-rw-r--r--jefs.s17
1 files changed, 3 insertions, 14 deletions
diff --git a/jefs.s b/jefs.s
index f5c2858..adede03 100644
--- a/jefs.s
+++ b/jefs.s
@@ -582,20 +582,14 @@ defword "syscall3", syscall3, 0 ; ( rdx rsi rdi id -- rax )
ret
; stack {{{
-; these stack wrangling words are dreadfully inefficient right now
-; i will come back and make these less terrible later
defword "dup", dup, 0
mov r11, [r14]
pspush r11
ret
defword "2dup", twodup, 0 ; ( a b -- a b a b )
- ; todo inefficient
- pspop r11
- pspop r12
-
- pspush r12
- pspush r11
+ mov r11, [r14]
+ mov r12, [r14+8]
pspush r12
pspush r11
ret
@@ -609,12 +603,7 @@ defword "swap", swap, 0
ret
defword "over", over, 0
- ; TODO inefficient (use r14 ptr arith to only push once)
- pspop r11
- pspop r12
-
- pspush r11
- pspush r12
+ mov r11, [r14+8]
pspush r11
ret