From 83221b4e21ec4cc8996362472987a49552df1e0b Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 17 Nov 2020 16:32:38 -0800 Subject: 7260 This seems to preserve the intent of commit 6555. --- apps/mu | Bin 564752 -> 564312 bytes apps/mu.subx | 26 +++++++++++--------------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/apps/mu b/apps/mu index d2d2358e..62632aa7 100755 Binary files a/apps/mu and b/apps/mu differ diff --git a/apps/mu.subx b/apps/mu.subx index 752e57da..139e04fa 100644 --- a/apps/mu.subx +++ b/apps/mu.subx @@ -5916,9 +5916,8 @@ test-reg-var-def-with-read-of-same-register: (tailor-exit-descriptor %edx 0x10) # (write _test-input-stream "fn foo {\n") - (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n") - (write _test-input-stream " var idx/ecx: int <- copy 3\n") - (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n") + (write _test-input-stream " var x/eax: int <- copy 3\n") + (write _test-input-stream " var y/eax: int <- add x\n") (write _test-input-stream "}\n") # convert (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx) @@ -5948,18 +5947,15 @@ test-reg-var-def-with-read-of-same-register: (check-next-stream-line-equal _test-output-stream " {" "F - test-reg-var-def-with-read-of-same-register/4") (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-reg-var-def-with-read-of-same-register/5") (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-reg-var-def-with-read-of-same-register/6") - (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-reg-var-def-with-read-of-same-register/7") - (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-reg-var-def-with-read-of-same-register/8") - (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-reg-var-def-with-read-of-same-register/9") - (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000002 + 4) 0x00000000/r32" "F - test-reg-var-def-with-read-of-same-register/11") - (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-reg-var-def-with-read-of-same-register/13") - (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-reg-var-def-with-read-of-same-register/14") - (check-next-stream-line-equal _test-output-stream " }" "F - test-reg-var-def-with-read-of-same-register/15") - (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-reg-var-def-with-read-of-same-register/16") - (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-reg-var-def-with-read-of-same-register/17") - (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-reg-var-def-with-read-of-same-register/18") - (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-reg-var-def-with-read-of-same-register/19") - (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-reg-var-def-with-read-of-same-register/20") + (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-reg-var-def-with-read-of-same-register/7") + (check-next-stream-line-equal _test-output-stream " 01/add-to %eax 0x00000000/r32" "F - test-reg-var-def-with-read-of-same-register/8") + (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-reg-var-def-with-read-of-same-register/9") + (check-next-stream-line-equal _test-output-stream " }" "F - test-reg-var-def-with-read-of-same-register/10") + (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-reg-var-def-with-read-of-same-register/11") + (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-reg-var-def-with-read-of-same-register/12") + (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-reg-var-def-with-read-of-same-register/13") + (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-reg-var-def-with-read-of-same-register/14") + (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-reg-var-def-with-read-of-same-register/15") # don't restore from ebp 81 0/subop/add %esp 8/imm32 # . epilogue -- cgit 1.4.1-2-gfad0