about summary refs log tree commit diff stats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rwxr-xr-xapps/mubin183209 -> 183202 bytes
-rw-r--r--apps/mu.subx19
2 files changed, 6 insertions, 13 deletions
diff --git a/apps/mu b/apps/mu
index c0400f83..096c5006 100755
--- a/apps/mu
+++ b/apps/mu
Binary files differdiff --git a/apps/mu.subx b/apps/mu.subx
index 40699cae..78c94855 100644
--- a/apps/mu.subx
+++ b/apps/mu.subx
@@ -7078,7 +7078,8 @@ translate-mu-get-stmt:  # out: (address buffered-file), stmt: (handle stmt)
     (write-buffered *(ebp+8) *(eax+0x10))  # Var-register => eax
     #
     (write-buffered *(ebp+8) " + ")
-    (print-mu-get-offset *(ebp+8) %ecx)
+    (mu-get-offset %ecx)  # => eax
+    (print-int32-buffered *(ebp+8) %eax)
     (write-buffered *(ebp+8) ") ")
     # outputs[0] "/r32"
     8b/-> *(ecx+0xc) 0/r32/eax  # Stmt1-outputs
@@ -7166,27 +7167,19 @@ $num-shift-rights:end:
     5d/pop-to-ebp
     c3/return
 
-print-mu-get-offset:  # out: (addr buffered-file), stmt: (handle stmt)
+mu-get-offset:  # stmt: (handle stmt) -> result/eax: int
     # . prologue
     55/push-ebp
     89/<- %ebp 4/r32/esp
-    # . save registers
-    50/push-eax
     # var second-inout/eax: (handle stmt-var) = stmt->inouts->next
-    8b/-> *(ebp+0xc) 0/r32/eax
+    8b/-> *(ebp+8) 0/r32/eax
     8b/-> *(eax+8) 0/r32/eax  # Stmt1-inouts
     8b/-> *(eax+4) 0/r32/eax  # Stmt-var-next
     # var output-var/eax: (handle var) = second-inout->value
     8b/-> *eax 0/r32/eax  # Stmt-var-value
-    # print offset
-#?     (write-buffered Stderr "emitting offset from output var ")
-#?     (print-int32-buffered Stderr %eax)
-#?     (write-buffered Stderr Newline)
-#?     (flush Stderr)
-    (print-int32-buffered *(ebp+8) *(eax+0xc))  # Var-offset
+    # return output-var->offset
+    8b/-> *(eax+0xc) 0/r32/eax  # Var-offset
 $emit-get-offset:end:
-    # . restore registers
-    58/pop-to-eax
     # . epilogue
     89/<- %esp 5/r32/ebp
     5d/pop-to-ebp