From 09492d3867b5da6d0b2f21b139d097cd481a8fa1 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Wed, 10 Apr 2019 21:18:55 -0700 Subject: 5077 --- html/subx/056trace.subx.html | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'html/subx/056trace.subx.html') diff --git a/html/subx/056trace.subx.html b/html/subx/056trace.subx.html index 2b0b7596..37f7a043 100644 --- a/html/subx/056trace.subx.html +++ b/html/subx/056trace.subx.html @@ -154,7 +154,7 @@ if ('onhashchange' in window) { 92 # . . discard args 93 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP 94 # if (EAX == 0) return - 95 81 7/subop/compare 3/mod/direct 0/rm32/EAX . . . . . 0/imm32 # compare EDX + 95 3d/compare-EAX-and 0/imm32 96 74/jump-if-equal $trace:end/disp8 97 # t->write += EAX 98 01/add 0/mod/indirect 7/rm32/EDI . . . 0/r32/EAX . . # add EAX to *EDI @@ -334,7 +334,7 @@ if ('onhashchange' in window) { 272 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . . # copy ESP to EBP 273 # . save registers 274 51/push-ECX -275 # _append-4(out, outend, &s->data[0], &s->data[s->length]) -> num_bytes_appended/EAX +275 # EAX = _append-4(out, outend, &s->data[0], &s->data[s->length]) 276 # . . push &s->data[s->length] 277 8b/copy 1/mod/*+disp8 5/rm32/EBP . . 0/r32/EAX 0x10/disp8 . # copy *(EBP+16) to EAX 278 8b/copy 0/mod/indirect 0/rm32/EAX . . . 1/r32/ECX . . # copy *EAX to ECX @@ -384,9 +384,9 @@ if ('onhashchange' in window) { 322 # if (in >= inend) break 323 39/compare 3/mod/direct 6/rm32/ESI . . . 1/r32/ECX . . # compare ESI with ECX 324 7d/jump-if-greater-or-equal $_append-4:end/disp8 -325 # if (out >= outend) break # for now silently ignore filled up buffer +325 # if (out >= outend) abort # just to catch test failures fast 326 39/compare 3/mod/direct 7/rm32/EDI . . . 2/r32/EDX . . # compare EDI with EDX -327 7d/jump-if-greater-or-equal $_append-4:end/disp8 +327 7d/jump-if-greater-or-equal $_append-4:abort/disp8 328 # *out = *in 329 8a/copy-byte 0/mod/indirect 6/rm32/ESI . . . 3/r32/BL . . # copy byte at *ESI to BL 330 88/copy-byte 0/mod/indirect 7/rm32/EDI . . . 3/r32/BL . . # copy byte at BL to *EDI @@ -409,7 +409,22 @@ if ('onhashchange' in window) { 347 5d/pop-to-EBP 348 c3/return 349 -350 # . . vim:nowrap:textwidth=0 +350 $_append-4:abort: +351 # . _write(2/stderr, error) +352 # . . push args +353 68/push "stream overflow"/imm32 +354 68/push 2/imm32/stderr +355 # . . call +356 e8/call _write/disp32 +357 # . . discard args +358 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP +359 # . syscall(exit, 1) +360 bb/copy-to-EBX 1/imm32 +361 b8/copy-to-EAX 1/imm32/exit +362 cd/syscall 0x80/imm8 +363 # never gets here +364 +365 # . . vim:nowrap:textwidth=0 -- cgit 1.4.1-2-gfad0