about summary refs log tree commit diff stats
path: root/subx/058stream-equal.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-06-30 22:28:19 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-01 23:09:58 -0700
commit51c311d5f9bf028c7a3967525062a96bd4b13b40 (patch)
tree6be0d67968844070b868241912d03375f28a2f6e /subx/058stream-equal.subx
parent954133e200df32415bbfd435ebe6d01a0c3c0c03 (diff)
downloadmu-51c311d5f9bf028c7a3967525062a96bd4b13b40.tar.gz
unsigned comparison for addresses in more places
Diffstat (limited to 'subx/058stream-equal.subx')
-rw-r--r--subx/058stream-equal.subx6
1 files changed, 3 insertions, 3 deletions
diff --git a/subx/058stream-equal.subx b/subx/058stream-equal.subx
index b9ab889b..c65112cc 100644
--- a/subx/058stream-equal.subx
+++ b/subx/058stream-equal.subx
@@ -19,7 +19,7 @@ stream-data-equal?:  # f : (address stream), s : (address string) -> EAX : boole
     8b/copy                         1/mod/*+disp8   5/rm32/EBP    .           .             .           6/r32/ESI   8/disp8         .                 # copy *(EBP+8) to ESI
     # EAX = f->write
     8b/copy                         0/mod/indirect  6/rm32/ESI    .           .             .           0/r32/EAX   .               .                 # copy *ESI to EAX
-    # max/EDX = f->data + f->write
+    # maxf/EDX = f->data + f->write
     8d/copy-address                 1/mod/*+disp8   4/rm32/sib    6/base/ESI  0/index/EAX   .           2/r32/EDX   0xc/disp8       .                 # copy ESI+EAX+12 to EDX
     # currf/ESI = f->data
     81          0/subop/add         3/mod/direct    6/rm32/ESI    .           .             .           .           .               0xc/imm32         # add to ESI
@@ -34,9 +34,9 @@ stream-data-equal?:  # f : (address stream), s : (address string) -> EAX : boole
     31/xor                          3/mod/direct    0/rm32/EAX    .           .             .           0/r32/EAX   .               .                 # clear EAX
     31/xor                          3/mod/direct    1/rm32/ECX    .           .             .           1/r32/ECX   .               .                 # clear ECX
 $stream-data-equal?:loop:
-    # if (curr >= max) return true
+    # if (currf >= maxf) return true
     39/compare                      3/mod/direct    6/rm32/ESI    .           .             .           2/r32/EDX   .               .                 # compare ESI with EDX
-    7d/jump-if-greater-or-equal  $stream-data-equal?:true/disp8
+    73/jump-if-greater-or-equal-unsigned  $stream-data-equal?:true/disp8
     # AL = *currs
     8a/copy-byte                    0/mod/indirect  6/rm32/ESI    .           .             .           0/r32/AL    .               .                 # copy byte at *ESI to AL
     # CL = *curr