From 333525360b22f3d3ea31db46a4d2f1b4edbfebdb Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 26 Aug 2019 11:55:26 -0700 Subject: 5592 - switch register names to lowercase --- html/065write-buffered.subx.html | 142 +++++++++++++++++++-------------------- 1 file changed, 71 insertions(+), 71 deletions(-) (limited to 'html/065write-buffered.subx.html') diff --git a/html/065write-buffered.subx.html b/html/065write-buffered.subx.html index 6838c5c9..f63d0c75 100644 --- a/html/065write-buffered.subx.html +++ b/html/065write-buffered.subx.html @@ -80,89 +80,89 @@ if ('onhashchange' in window) { 19 # ++in 20 # 21 # registers: - 22 # in: ESI - 23 # inend: ECX - 24 # f: EDI - 25 # f->length: EDX - 26 # f->write: EBX (cached; need to keep in sync) - 27 # c: EAX + 22 # in: esi + 23 # inend: ecx + 24 # f: edi + 25 # f->length: edx + 26 # f->write: ebx (cached; need to keep in sync) + 27 # c: eax 28 # 29 # . prolog - 30 55/push-EBP - 31 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . . # copy ESP to EBP + 30 55/push-ebp + 31 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 32 # . save registers - 33 50/push-EAX - 34 51/push-ECX - 35 52/push-EDX - 36 53/push-EBX - 37 56/push-ESI - 38 57/push-EDI - 39 # EAX = msg - 40 8b/copy 1/mod/*+disp8 5/rm32/EBP . . 0/r32/EAX 0xc/disp8 . # copy *(EBP+12) to EAX - 41 # in/ESI = msg->data - 42 8d/copy-address 1/mod/*+disp8 0/rm32/EAX . . . 6/r32/ESI 4/disp8 . # copy EAX+4 to ESI - 43 # inend/ECX = &msg->data[msg->length] - 44 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . . # copy *EAX to ECX - 45 8d/copy-address 0/mod/indirect 4/rm32/sib 6/base/ESI 1/index/ECX . 1/r32/ECX . . # copy ESI+ECX to ECX - 46 # EDI = f - 47 8b/copy 1/mod/*+disp8 5/rm32/EBP . . 7/r32/EDI 8/disp8 . # copy *(EBP+8) to EDI - 48 # EDX = f->length - 49 8b/copy 1/mod/*+disp8 7/rm32/EDI . . . 2/r32/EDX 0xc/disp8 . # copy *(EDI+12) to EDX - 50 # EBX = f->write - 51 8b/copy 1/mod/*+disp8 7/rm32/EDI . . . 3/r32/EBX 4/disp8 . # copy *(EDI+4) to EBX + 33 50/push-eax + 34 51/push-ecx + 35 52/push-edx + 36 53/push-ebx + 37 56/push-esi + 38 57/push-edi + 39 # eax = msg + 40 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 0/r32/eax 0xc/disp8 . # copy *(ebp+12) to eax + 41 # in/esi = msg->data + 42 8d/copy-address 1/mod/*+disp8 0/rm32/eax . . . 6/r32/esi 4/disp8 . # copy eax+4 to esi + 43 # inend/ecx = &msg->data[msg->length] + 44 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx + 45 8d/copy-address 0/mod/indirect 4/rm32/sib 6/base/esi 1/index/ecx . 1/r32/ecx . . # copy esi+ecx to ecx + 46 # edi = f + 47 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 7/r32/edi 8/disp8 . # copy *(ebp+8) to edi + 48 # edx = f->length + 49 8b/copy 1/mod/*+disp8 7/rm32/edi . . . 2/r32/edx 0xc/disp8 . # copy *(edi+12) to edx + 50 # ebx = f->write + 51 8b/copy 1/mod/*+disp8 7/rm32/edi . . . 3/r32/ebx 4/disp8 . # copy *(edi+4) to ebx 52 $write-buffered:loop: 53 # if (in >= inend) break - 54 39/compare 3/mod/direct 6/rm32/ESI . . . 1/r32/ECX . . # compare ESI with ECX + 54 39/compare 3/mod/direct 6/rm32/esi . . . 1/r32/ecx . . # compare esi with ecx 55 73/jump-if-greater-or-equal-unsigned $write-buffered:loop-end/disp8 56 # if (f->write >= f->length) flush and clear f's stream - 57 39/compare 3/mod/direct 3/rm32/EBX . . . 2/r32/EDX . . # compare EBX with EDX + 57 39/compare 3/mod/direct 3/rm32/ebx . . . 2/r32/edx . . # compare ebx with edx 58 7c/jump-if-lesser $write-buffered:to-stream/disp8 59 # . persist f->write - 60 89/copy 1/mod/*+disp8 7/rm32/EDI . . . 3/r32/EBX 4/disp8 . # copy EBX to *(EDI+4) + 60 89/copy 1/mod/*+disp8 7/rm32/edi . . . 3/r32/ebx 4/disp8 . # copy ebx to *(edi+4) 61 # . flush(f) 62 # . . push args - 63 57/push-EDI + 63 57/push-edi 64 # . . call 65 e8/call flush/disp32 66 # . . discard args - 67 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP + 67 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 68 # . clear-stream(stream = f+4) 69 # . . push args - 70 8d/copy-address 1/mod/*+disp8 7/rm32/EDI . . . 0/r32/EAX 4/disp8 . # copy EDI+4 to EAX - 71 50/push-EAX + 70 8d/copy-address 1/mod/*+disp8 7/rm32/edi . . . 0/r32/eax 4/disp8 . # copy edi+4 to eax + 71 50/push-eax 72 # . . call 73 e8/call clear-stream/disp32 74 # . . discard args - 75 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP - 76 # . f->write must now be 0; update its cache at EBX - 77 31/xor 3/mod/direct 3/rm32/EBX . . . 3/r32/EBX . . # clear EBX + 75 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp + 76 # . f->write must now be 0; update its cache at ebx + 77 31/xor 3/mod/direct 3/rm32/ebx . . . 3/r32/ebx . . # clear ebx 78 $write-buffered:to-stream: 79 # write to stream 80 # f->data[f->write] = *in 81 # . AL = *in - 82 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . . # clear EAX - 83 8a/copy-byte 0/mod/indirect 6/rm32/ESI . . . 0/r32/AL . . # copy byte at *ESI to AL + 82 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax + 83 8a/copy-byte 0/mod/indirect 6/rm32/esi . . . 0/r32/AL . . # copy byte at *esi to AL 84 # . f->data[f->write] = AL - 85 88/copy-byte 1/mod/*+disp8 4/rm32/sib 7/base/EDI 3/index/EBX . 0/r32/AL 0x10/disp8 . # copy AL to *(EDI+EBX+16) + 85 88/copy-byte 1/mod/*+disp8 4/rm32/sib 7/base/edi 3/index/ebx . 0/r32/AL 0x10/disp8 . # copy AL to *(edi+ebx+16) 86 # ++f->write - 87 43/increment-EBX + 87 43/increment-ebx 88 # ++in - 89 46/increment-ESI + 89 46/increment-esi 90 eb/jump $write-buffered:loop/disp8 91 $write-buffered:loop-end: 92 # persist necessary variables from registers - 93 89/copy 1/mod/*+disp8 7/rm32/EDI . . . 3/r32/EBX 4/disp8 . # copy EBX to *(EDI+4) + 93 89/copy 1/mod/*+disp8 7/rm32/edi . . . 3/r32/ebx 4/disp8 . # copy ebx to *(edi+4) 94 $write-buffered:end: 95 # . restore registers - 96 5f/pop-to-EDI - 97 5e/pop-to-ESI - 98 5b/pop-to-EBX - 99 5a/pop-to-EDX -100 59/pop-to-ECX -101 58/pop-to-EAX + 96 5f/pop-to-edi + 97 5e/pop-to-esi + 98 5b/pop-to-ebx + 99 5a/pop-to-edx +100 59/pop-to-ecx +101 58/pop-to-eax 102 # . epilog -103 89/copy 3/mod/direct 4/rm32/ESP . . . 5/r32/EBP . . # copy EBP to ESP -104 5d/pop-to-EBP +103 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp +104 5d/pop-to-ebp 105 c3/return 106 107 test-write-buffered: @@ -174,16 +174,16 @@ if ('onhashchange' in window) { 113 # . . call 114 e8/call clear-stream/disp32 115 # . . discard args -116 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP +116 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 117 # . clear-stream(_test-buffered-file+4) 118 # . . push args -119 b8/copy-to-EAX _test-buffered-file/imm32 -120 05/add-to-EAX 4/imm32 -121 50/push-EAX +119 b8/copy-to-eax _test-buffered-file/imm32 +120 05/add-to-eax 4/imm32 +121 50/push-eax 122 # . . call 123 e8/call clear-stream/disp32 124 # . . discard args -125 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP +125 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 126 # write-buffered(_test-buffered-file, "Abc") 127 # . . push args 128 68/push "Abc"/imm32 @@ -191,14 +191,14 @@ if ('onhashchange' in window) { 130 # . . call 131 e8/call write-buffered/disp32 132 # . . discard args -133 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +133 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 134 # flush(_test-buffered-file) 135 # . . push args 136 68/push _test-buffered-file/imm32 137 # . . call 138 e8/call flush/disp32 139 # . . discard args -140 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP +140 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 141 # check-stream-equal(_test-stream, "Abc", msg) 142 # . . push args 143 68/push "F - test-write-buffered-single"/imm32 @@ -207,7 +207,7 @@ if ('onhashchange' in window) { 146 # . . call 147 e8/call check-stream-equal/disp32 148 # . . discard args -149 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP +149 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 150 # . end 151 c3/return 152 @@ -220,16 +220,16 @@ if ('onhashchange' in window) { 159 # . . call 160 e8/call clear-stream/disp32 161 # . . discard args -162 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP +162 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 163 # . clear-stream(_test-buffered-file+4) 164 # . . push args -165 b8/copy-to-EAX _test-buffered-file/imm32 -166 05/add-to-EAX 4/imm32 -167 50/push-EAX +165 b8/copy-to-eax _test-buffered-file/imm32 +166 05/add-to-eax 4/imm32 +167 50/push-eax 168 # . . call 169 e8/call clear-stream/disp32 170 # . . discard args -171 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP +171 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 172 # _test-stream can hold 8 bytes, but _test-buffered-file can hold only 6. 173 # Try to write 7 bytes. 174 # . write-buffered(_test-buffered-file, "Abcdefg") @@ -239,7 +239,7 @@ if ('onhashchange' in window) { 178 # . . call 179 e8/call write-buffered/disp32 180 # . . discard args -181 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +181 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 182 # don't flush 183 # 6 bytes should still have gotten to _test-stream 184 # . check-ints-equal(*_test-stream->write, 6, msg) @@ -247,24 +247,24 @@ if ('onhashchange' in window) { 186 68/push "F - test-write-buffered-with-intermediate-flush: flushed data"/imm32 187 68/push 6/imm32 188 # . . push *_test-stream->write -189 b8/copy-to-EAX _test-stream/imm32 -190 ff 6/subop/push 0/mod/indirect 0/rm32/EAX . . . . . . # push *EAX +189 b8/copy-to-eax _test-stream/imm32 +190 ff 6/subop/push 0/mod/indirect 0/rm32/eax . . . . . . # push *eax 191 # . . call 192 e8/call check-ints-equal/disp32 193 # . . discard args -194 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP +194 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 195 # and 1 byte should still be in _test-buffered-file 196 # . check-ints-equal(*_test-buffered-file->write, 1, msg) 197 # . . push args 198 68/push "F - test-write-buffered-with-intermediate-flush: unflushed bytes"/imm32 199 68/push 1/imm32 200 # . . push *_test-buffered-file->write -201 b8/copy-to-EAX _test-buffered-file/imm32 -202 ff 6/subop/push 1/mod/*+disp8 0/rm32/EAX . . . . 4/disp8 . # push *(EAX+4) +201 b8/copy-to-eax _test-buffered-file/imm32 +202 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 . # push *(eax+4) 203 # . . call 204 e8/call check-ints-equal/disp32 205 # . . discard args -206 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP +206 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp 207 # . end 208 c3/return 209 -- cgit 1.4.1-2-gfad0