From 9428990bd6e61988df23811205504a5c63a348e1 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 14 Mar 2020 01:06:27 -0700 Subject: 6143 --- html/apps/factorial4.subx.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'html/apps/factorial4.subx.html') diff --git a/html/apps/factorial4.subx.html b/html/apps/factorial4.subx.html index bd41739e..fcbde291 100644 --- a/html/apps/factorial4.subx.html +++ b/html/apps/factorial4.subx.html @@ -119,7 +119,7 @@ if ('onhashchange' in window) { 60 55/push-ebp 61 89/<- %ebp 4/r32/esp 62 # save registers -63 53/push-ebx +63 51/push-ecx 64 # if (n <= 1) return 1 65 81 7/subop/compare *(ebp+8) 1/imm32 66 { @@ -129,14 +129,14 @@ if ('onhashchange' in window) { 70 # if (n > 1) return n * factorial(n-1) 71 { 72 7e/jump-if-<= break/disp8 -73 # var ebx: int = n-1 -74 8b/-> *(ebp+8) 3/r32/ebx -75 4b/decrement-ebx -76 (factorial %ebx) # => eax +73 # var tmp/ecx: int = n-1 +74 8b/-> *(ebp+8) 1/r32/ecx +75 49/decrement-ecx +76 (factorial %ecx) # => eax 77 f7 4/subop/multiply-into-eax *(ebp+8) 78 } 79 # restore registers -80 5b/pop-to-ebx +80 59/pop-to-ecx 81 # . epilogue 82 89/<- %esp 5/r32/ebp 83 5d/pop-to-ebp -- cgit 1.4.1-2-gfad0