about summary refs log tree commit diff stats
path: root/075print-int-decimal.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-02-29 05:53:13 -0800
committerKartik Agaram <vc@akkartik.com>2020-02-29 05:53:13 -0800
commitaf326d9e399f3834a81284f61dde2f0caaf6dd15 (patch)
tree89f60bf88a20ba1e61d04f47ff0b3b13f0fc9d81 /075print-int-decimal.subx
parentc51f590273908d3fa314387b6e0dd605a669246d (diff)
downloadmu-af326d9e399f3834a81284f61dde2f0caaf6dd15.tar.gz
6070
Diffstat (limited to '075print-int-decimal.subx')
-rw-r--r--075print-int-decimal.subx12
1 files changed, 5 insertions, 7 deletions
diff --git a/075print-int-decimal.subx b/075print-int-decimal.subx
index 6967a2a7..19fae94b 100644
--- a/075print-int-decimal.subx
+++ b/075print-int-decimal.subx
@@ -312,16 +312,14 @@ is-decimal-digit?:  # c: byte -> eax: boolean
     51/push-ecx
     # ecx = c
     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           1/r32/ecx   8/disp8         .                 # copy *(ebp+8) to ecx
+    # result = false
+    b8/copy-to-eax  0/imm32/false
     # return false if c < '0'
     81          7/subop/compare     3/mod/direct    1/rm32/ecx    .           .             .           .           .               0x30/imm32        # compare ecx
-    7c/jump-if-<  $is-decimal-digit?:false/disp8
-    # return true if c <= '9'
+    7c/jump-if-<  $is-decimal-digit?:end/disp8
+    # return (c <= '9')
     81          7/subop/compare     3/mod/direct    1/rm32/ecx    .           .             .           .           .               0x39/imm32        # compare ecx
-    7e/jump-if-<=  $is-decimal-digit?:true/disp8
-    # otherwise return false
-$is-decimal-digit?:false:
-    b8/copy-to-eax  0/imm32/false
-    eb/jump $is-decimal-digit?:end/disp8
+    7f/jump-if->  $is-decimal-digit?:end/disp8
 $is-decimal-digit?:true:
     b8/copy-to-eax  1/imm32/true
 $is-decimal-digit?:end: