From 2104d1a75b76dbffc0b15a96c98d94e7a16594e8 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 27 Jan 2020 00:39:46 -0800 Subject: 5925 --- html/058stream-equal.subx.html | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'html/058stream-equal.subx.html') diff --git a/html/058stream-equal.subx.html b/html/058stream-equal.subx.html index 231f300e..2d38ddef 100644 --- a/html/058stream-equal.subx.html +++ b/html/058stream-equal.subx.html @@ -65,7 +65,7 @@ if ('onhashchange' in window) { 6 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 7 8 # compare all the data in a stream (ignoring the read pointer) - 9 stream-data-equal?: # f : (addr stream byte), s : (addr array byte) -> eax : boolean + 9 stream-data-equal?: # f: (addr stream byte), s: (addr array byte) -> eax: boolean 10 # . prologue 11 55/push-ebp 12 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -78,9 +78,9 @@ if ('onhashchange' in window) { 19 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi 20 # eax = f->write 21 8b/copy 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . . # copy *esi to eax - 22 # var maxf/edx : (addr byte) = &f->data[f->write] + 22 # var maxf/edx: (addr byte) = &f->data[f->write] 23 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 - 24 # var currf/esi : (addr byte) = f->data + 24 # var currf/esi: (addr byte) = f->data 25 81 0/subop/add 3/mod/direct 6/rm32/esi . . . . . 0xc/imm32 # add to esi 26 # edi = s 27 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 7/r32/edi 0xc/disp8 . # copy *(ebp+12) to edi @@ -88,11 +88,11 @@ if ('onhashchange' in window) { 29 # if (f->write != s->length) return false 30 39/compare 0/mod/indirect 7/rm32/edi . . . 0/r32/eax . . # compare *edi and eax 31 75/jump-if-!= $stream-data-equal?:false/disp8 - 32 # var currs/edi : (addr byte) = s->data + 32 # var currs/edi: (addr byte) = s->data 33 81 0/subop/add 3/mod/direct 7/rm32/edi . . . . . 4/imm32 # add to edi - 34 # var eax : byte = 0 + 34 # var eax: byte = 0 35 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax - 36 # var ecx : byte = 0 + 36 # var ecx: byte = 0 37 31/xor 3/mod/direct 1/rm32/ecx . . . 1/r32/ecx . . # clear ecx 38 $stream-data-equal?:loop: 39 # if (currf >= maxf) return true @@ -250,7 +250,7 @@ if ('onhashchange' in window) { 191 c3/return 192 193 # helper for later tests -194 check-stream-equal: # f : (addr stream byte), s : (addr array byte), msg : (addr array byte) +194 check-stream-equal: # f: (addr stream byte), s: (addr array byte), msg: (addr array byte) 195 # . prologue 196 55/push-ebp 197 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -286,10 +286,10 @@ if ('onhashchange' in window) { 227 # on success, set f->read to after the next newline 228 # on failure, leave f->read unmodified 229 # this function is usually used only in tests, so we repeatedly write f->read -230 next-stream-line-equal?: # f : (addr stream byte), s : (addr array byte) -> eax : boolean +230 next-stream-line-equal?: # f: (addr stream byte), s: (addr array byte) -> eax: boolean 231 # pseudocode: 232 # currf = f->read # bound: f->write -233 # currs = 0 # bound : s->length +233 # currs = 0 # bound: s->length 234 # while true 235 # if currf >= f->write 236 # return currs >= s->length @@ -303,7 +303,7 @@ if ('onhashchange' in window) { 244 # 245 # collapsing the two branches that can return true: 246 # currf = f->read # bound: f->write -247 # currs = 0 # bound : s->length +247 # currs = 0 # bound: s->length 248 # while true 249 # if (currf >= f->write) break 250 # if (f[currf] == '\n') break @@ -333,15 +333,15 @@ if ('onhashchange' in window) { 274 57/push-edi 275 # esi = f 276 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi -277 # var currf/ecx : int = f->read +277 # var currf/ecx: int = f->read 278 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 . # copy *(esi+4) to ecx 279 # edi = s 280 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 7/r32/edi 0xc/disp8 . # copy *(ebp+12) to edi -281 # var currs/edx : int = 0 +281 # var currs/edx: int = 0 282 31/xor 3/mod/direct 2/rm32/edx . . . 2/r32/edx . . # clear edx -283 # var c1/eax : byte = 0 +283 # var c1/eax: byte = 0 284 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax -285 # var c2/ebx : byte = 0 +285 # var c2/ebx: byte = 0 286 31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . . # clear ebx 287 $next-stream-line-equal?:loop: 288 # if (currf >= f->write) break -- cgit 1.4.1-2-gfad0