diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-03-08 17:09:27 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-03-08 17:09:27 -0700 |
commit | c67b26bbcb5d57189bd4ab26ff38ad85d6c70106 (patch) | |
tree | 0bbf06967f9de5ea1cbf4bcaee3c499ffd3a9e91 /apps | |
parent | a2a9d19f8948977d65513134c49aa7fb37a11857 (diff) | |
download | mu-c67b26bbcb5d57189bd4ab26ff38ad85d6c70106.tar.gz |
6108
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/mu | bin | 183209 -> 183202 bytes | |||
-rw-r--r-- | apps/mu.subx | 19 |
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 |