From e38a95ecd9686b735936eef196a92792e727d0c6 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Wed, 3 Jun 2020 00:18:20 -0700 Subject: 6458 --- apps/mu.subx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'apps/mu.subx') diff --git a/apps/mu.subx b/apps/mu.subx index 5bc534f1..aeda4eb4 100644 --- a/apps/mu.subx +++ b/apps/mu.subx @@ -8063,9 +8063,6 @@ emit-subx-function: # out: (addr buffered-file), f: (addr function) 50/push-eax 51/push-ecx 52/push-edx - 57/push-edi - # edi = out - 8b/-> *(ebp+8) 7/r32/edi # ecx = f 8b/-> *(ebp+0xc) 1/r32/ecx # var vars/edx: (stack (addr var) 256) @@ -8075,23 +8072,22 @@ emit-subx-function: # out: (addr buffered-file), f: (addr function) 89/<- %edx 4/r32/esp # (lookup *ecx *(ecx+4)) # Function-name Function-name => eax - (write-buffered %edi %eax) - (write-buffered %edi ":\n") + (write-buffered *(ebp+8) %eax) + (write-buffered *(ebp+8) ":\n") # initialize some global state c7 0/subop/copy *Curr-block-depth 1/imm32 c7 0/subop/copy *Curr-local-stack-offset 0/imm32 # - (emit-subx-prologue %edi) + (emit-subx-prologue *(ebp+8)) (lookup *(ecx+0x18) *(ecx+0x1c)) # Function-body Function-body => eax - (emit-subx-block %edi %eax %edx) - (emit-subx-epilogue %edi) + (emit-subx-block *(ebp+8) %eax %edx) + (emit-subx-epilogue *(ebp+8)) # TODO: validate that *Curr-block-depth and *Curr-local-stack-offset have # been cleaned up $emit-subx-function:end: # . reclaim locals 81 0/subop/add %esp 808/imm32 # . restore registers - 5f/pop-to-edi 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax -- cgit 1.4.1-2-gfad0