From b1635a5c8e25650a19999c246be321a0794eb58a Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Thu, 17 Oct 2019 22:03:35 -0700 Subject: 5701 --- html/apps/pack.subx.html | 228 +++++++++++++++++++++++------------------------ 1 file changed, 114 insertions(+), 114 deletions(-) (limited to 'html/apps/pack.subx.html') diff --git a/html/apps/pack.subx.html b/html/apps/pack.subx.html index d9c90ebc..cedc0bef 100644 --- a/html/apps/pack.subx.html +++ b/html/apps/pack.subx.html @@ -81,7 +81,7 @@ if ('onhashchange' in window) { 19 # . 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 20 21 Entry: # run tests if necessary, convert stdin if not - 22 # . prolog + 22 # . prologue 23 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 24 25 # initialize heap @@ -159,7 +159,7 @@ if ('onhashchange' in window) { 97 # next-token-from-slice(start, end, delim char) -> slice 98 # slice-equal?(slice, string) 99 - 100 subx-pack: # in : (address buffered-file), out : (address buffered-file) -> <void> + 100 subx-pack: # in : (address buffered-file), out : (address buffered-file) 101 # pseudocode: 102 # var line = new-stream(512, 1) 103 # var in-code? = false @@ -182,7 +182,7 @@ if ('onhashchange' in window) { 120 # convert-data(line, out) 121 # flush(out) 122 # - 123 # . prolog + 123 # . prologue 124 55/push-ebp 125 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 126 # . save registers @@ -339,14 +339,14 @@ if ('onhashchange' in window) { 384 5a/pop-to-edx 385 59/pop-to-ecx 386 58/pop-to-eax - 387 # . epilog + 387 # . epilogue 388 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 389 5d/pop-to-ebp 390 c3/return 391 392 test-subx-pack-passes-empty-lines-through: 393 # if a line is empty, pass it along unchanged - 394 # . prolog + 394 # . prologue 395 55/push-ebp 396 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 397 # setup @@ -408,14 +408,14 @@ if ('onhashchange' in window) { 453 e8/call check-stream-equal/disp32 454 # . . discard args 455 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - 456 # . epilog + 456 # . epilogue 457 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 458 5d/pop-to-ebp 459 c3/return 460 461 test-subx-pack-passes-lines-with-just-whitespace-through: 462 # if a line is empty, pass it along unchanged - 463 # . prolog + 463 # . prologue 464 55/push-ebp 465 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 466 # setup @@ -485,14 +485,14 @@ if ('onhashchange' in window) { 530 e8/call check-next-stream-line-equal/disp32 531 # . . discard args 532 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - 533 # . epilog + 533 # . epilogue 534 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 535 5d/pop-to-ebp 536 c3/return 537 538 test-subx-pack-passes-segment-headers-through: 539 # if a line starts with '==', pass it along unchanged - 540 # . prolog + 540 # . prologue 541 55/push-ebp 542 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 543 # setup @@ -562,14 +562,14 @@ if ('onhashchange' in window) { 607 e8/call check-stream-equal/disp32 608 # . . discard args 609 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - 610 # . epilog + 610 # . epilogue 611 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 612 5d/pop-to-ebp 613 c3/return 614 615 test-subx-pack-in-data-segment: 616 # correctly process lines in the data segment - 617 # . prolog + 617 # . prologue 618 55/push-ebp 619 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 620 # setup @@ -677,14 +677,14 @@ if ('onhashchange' in window) { 747 e8/call check-next-stream-line-equal/disp32 748 # . . discard args 749 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - 750 # . epilog + 750 # . epilogue 751 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 752 5d/pop-to-ebp 753 c3/return 754 755 test-subx-pack-code-and-data-segments: 756 # correctly process lines in both code and data segments - 757 # . prolog + 757 # . prologue 758 55/push-ebp 759 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 760 # setup @@ -833,12 +833,12 @@ if ('onhashchange' in window) { 928 e8/call check-next-stream-line-equal/disp32 929 # . . discard args 930 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - 931 # . epilog + 931 # . epilogue 932 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 933 5d/pop-to-ebp 934 c3/return 935 - 936 convert-data: # line : (address stream byte), out : (address buffered-file) -> <void> + 936 convert-data: # line : (address stream byte), out : (address buffered-file) 937 # pseudocode: 938 # var word-slice = {0, 0} 939 # while true @@ -858,7 +858,7 @@ if ('onhashchange' in window) { 953 # emit(out, word-slice, 1) 954 # write-buffered(out, "\n") 955 # - 956 # . prolog + 956 # . prologue 957 55/push-ebp 958 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 959 # . save registers @@ -985,14 +985,14 @@ if ('onhashchange' in window) { 1146 5a/pop-to-edx 1147 59/pop-to-ecx 1148 58/pop-to-eax -1149 # . epilog +1149 # . epilogue 1150 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 1151 5d/pop-to-ebp 1152 c3/return 1153 1154 test-convert-data-passes-comments-through: 1155 # if a line starts with '#', pass it along unchanged -1156 # . prolog +1156 # . prologue 1157 55/push-ebp 1158 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 1159 # setup @@ -1054,14 +1054,14 @@ if ('onhashchange' in window) { 1240 e8/call check-stream-equal/disp32 1241 # . . discard args 1242 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -1243 # . epilog +1243 # . epilogue 1244 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 1245 5d/pop-to-ebp 1246 c3/return 1247 1248 test-convert-data-passes-labels-through: 1249 # if the first word ends with ':', pass along the entire line unchanged -1250 # . prolog +1250 # . prologue 1251 55/push-ebp 1252 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 1253 # setup @@ -1122,7 +1122,7 @@ if ('onhashchange' in window) { 1308 e8/call check-stream-equal/disp32 1309 # . . discard args 1310 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -1311 # . epilog +1311 # . epilogue 1312 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 1313 5d/pop-to-ebp 1314 c3/return @@ -1130,7 +1130,7 @@ if ('onhashchange' in window) { 1316 test-convert-data-passes-names-through: 1317 # If a word is a valid name, just emit it unchanged. 1318 # Later phases will deal with it. -1319 # . prolog +1319 # . prologue 1320 55/push-ebp 1321 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 1322 # setup @@ -1191,14 +1191,14 @@ if ('onhashchange' in window) { 1377 e8/call check-stream-equal/disp32 1378 # . . discard args 1379 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -1380 # . epilog +1380 # . epilogue 1381 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 1382 5d/pop-to-ebp 1383 c3/return 1384 1385 test-convert-data-handles-imm32: 1386 # If a word has the /imm32 metadata, emit it in 4 bytes. -1387 # . prolog +1387 # . prologue 1388 55/push-ebp 1389 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 1390 # setup @@ -1259,7 +1259,7 @@ if ('onhashchange' in window) { 1445 e8/call check-stream-equal/disp32 1446 # . . discard args 1447 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -1448 # . epilog +1448 # . epilogue 1449 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 1450 5d/pop-to-ebp 1451 c3/return @@ -1267,7 +1267,7 @@ if ('onhashchange' in window) { 1453 test-convert-data-handles-single-byte: 1454 # Any metadata but /imm32 will emit a single byte. 1455 # Data segments can't have /disp32, and SubX doesn't support 16-bit operands. -1456 # . prolog +1456 # . prologue 1457 55/push-ebp 1458 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 1459 # setup @@ -1328,14 +1328,14 @@ if ('onhashchange' in window) { 1514 e8/call check-stream-equal/disp32 1515 # . . discard args 1516 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -1517 # . epilog +1517 # . epilogue 1518 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 1519 5d/pop-to-ebp 1520 c3/return 1521 1522 test-convert-data-multiple-bytes: 1523 # Multiple single-byte words in input stream get processed one by one. -1524 # . prolog +1524 # . prologue 1525 55/push-ebp 1526 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 1527 # setup @@ -1396,14 +1396,14 @@ if ('onhashchange' in window) { 1582 e8/call check-stream-equal/disp32 1583 # . . discard args 1584 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -1585 # . epilog +1585 # . epilogue 1586 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 1587 5d/pop-to-ebp 1588 c3/return 1589 1590 test-convert-data-byte-then-name: 1591 # Single-byte word followed by valid name get processed one by one. -1592 # . prolog +1592 # . prologue 1593 55/push-ebp 1594 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 1595 # setup @@ -1464,14 +1464,14 @@ if ('onhashchange' in window) { 1650 e8/call check-stream-equal/disp32 1651 # . . discard args 1652 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -1653 # . epilog +1653 # . epilogue 1654 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 1655 5d/pop-to-ebp 1656 c3/return 1657 1658 test-convert-data-multiple-words: 1659 # Multiple words in input stream get processed one by one. -1660 # . prolog +1660 # . prologue 1661 55/push-ebp 1662 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 1663 # setup @@ -1533,14 +1533,14 @@ if ('onhashchange' in window) { 1744 e8/call check-stream-equal/disp32 1745 # . . discard args 1746 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -1747 # . epilog +1747 # . epilogue 1748 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 1749 5d/pop-to-ebp 1750 c3/return 1751 1752 test-convert-data-trailing-comment: 1753 # Trailing comments in data segment get appropriately ignored. -1754 # . prolog +1754 # . prologue 1755 55/push-ebp 1756 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 1757 # setup @@ -1602,7 +1602,7 @@ if ('onhashchange' in window) { 1838 e8/call check-stream-equal/disp32 1839 # . . discard args 1840 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -1841 # . epilog +1841 # . epilogue 1842 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 1843 5d/pop-to-ebp 1844 c3/return @@ -1617,7 +1617,7 @@ if ('onhashchange' in window) { 1853 # unceremoniously abort on non-numeric operands except disp or imm 1854 # opcodes must be lowercase and zero padded 1855 # opcodes with misleading operand metadata may get duplicated as operands as well. don't rely on this. -1856 convert-instruction: # line : (address stream byte), out : (address buffered-file) -> <void> +1856 convert-instruction: # line : (address stream byte), out : (address buffered-file) 1857 # pseudocode: 1858 # # some early exits 1859 # var word-slice = next-word(line) @@ -1638,7 +1638,7 @@ if ('onhashchange' in window) { 1874 # emit-imm(line, out) 1875 # emit-line-in-comment(line, out) 1876 # -1877 # . prolog +1877 # . prologue 1878 55/push-ebp 1879 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 1880 # . save registers @@ -1756,12 +1756,12 @@ if ('onhashchange' in window) { 1992 5a/pop-to-edx 1993 59/pop-to-ecx 1994 58/pop-to-eax -1995 # . epilog +1995 # . epilogue 1996 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 1997 5d/pop-to-ebp 1998 c3/return 1999 -2000 emit-opcodes: # line : (address stream byte), out : (address buffered-file) -> <void> +2000 emit-opcodes: # line : (address stream byte), out : (address buffered-file) 2001 # opcodes occupy 1-3 bytes: 2002 # xx 2003 # 0f xx @@ -1794,7 +1794,7 @@ if ('onhashchange' in window) { 2030 # op3 = next-token-from-slice(op3->start, op3->end, "/") 2031 # write-slice-buffered(out, op3) 2032 # -2033 # . prolog +2033 # . prologue 2034 55/push-ebp 2035 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 2036 # . save registers @@ -2052,12 +2052,12 @@ if ('onhashchange' in window) { 2288 5a/pop-to-edx 2289 59/pop-to-ecx 2290 58/pop-to-eax -2291 # . epilog +2291 # . epilogue 2292 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 2293 5d/pop-to-ebp 2294 c3/return 2295 -2296 emit-modrm: # line : (address stream byte), out : (address buffered-file) -> <void> +2296 emit-modrm: # line : (address stream byte), out : (address buffered-file) 2297 # pseudocode: 2298 # rewind-stream(line) 2299 # var has-modrm? = false, mod = 0, rm32 = 0, r32 = 0 @@ -2083,7 +2083,7 @@ if ('onhashchange' in window) { 2319 # modrm |= rm32 & 0b111 2320 # emit-hex(out, modrm, 1) 2321 # -2322 # . prolog +2322 # . prologue 2323 55/push-ebp 2324 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 2325 # . save registers @@ -2298,12 +2298,12 @@ if ('onhashchange' in window) { 2607 5a/pop-to-edx 2608 59/pop-to-ecx 2609 58/pop-to-eax -2610 # . epilog +2610 # . epilogue 2611 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 2612 5d/pop-to-ebp 2613 c3/return 2614 -2615 emit-sib: # line : (address stream byte), out : (address buffered-file) -> <void> +2615 emit-sib: # line : (address stream byte), out : (address buffered-file) 2616 # pseudocode: 2617 # var has-sib? = false, base = 0, index = 0, scale = 0 2618 # var word-slice = {0, 0} @@ -2328,7 +2328,7 @@ if ('onhashchange' in window) { 2637 # sib |= base & 0b111 2638 # emit-hex(out, sib, 1) 2639 # -2640 # . prolog +2640 # . prologue 2641 55/push-ebp 2642 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 2643 # . save registers @@ -2515,12 +2515,12 @@ if ('onhashchange' in window) { 2890 5a/pop-to-edx 2891 59/pop-to-ecx 2892 58/pop-to-eax -2893 # . epilog +2893 # . epilogue 2894 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 2895 5d/pop-to-ebp 2896 c3/return 2897 -2898 emit-disp: # line : (address stream byte), out : (address buffered-file) -> <void> +2898 emit-disp: # line : (address stream byte), out : (address buffered-file) 2899 # pseudocode: 2900 # rewind-stream(line) 2901 # var word-slice = {0, 0} @@ -2538,7 +2538,7 @@ if ('onhashchange' in window) { 2913 # emit(out, word-slice, 1) 2914 # break 2915 # -2916 # . prolog +2916 # . prologue 2917 55/push-ebp 2918 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 2919 # . save registers @@ -2670,12 +2670,12 @@ if ('onhashchange' in window) { 3111 5a/pop-to-edx 3112 59/pop-to-ecx 3113 58/pop-to-eax -3114 # . epilog +3114 # . epilogue 3115 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 3116 5d/pop-to-ebp 3117 c3/return 3118 -3119 emit-imm: # line : (address stream byte), out : (address buffered-file) -> <void> +3119 emit-imm: # line : (address stream byte), out : (address buffered-file) 3120 # pseudocode: 3121 # rewind-stream(line) 3122 # var word-slice = {0, 0} @@ -2693,7 +2693,7 @@ if ('onhashchange' in window) { 3134 # emit(out, word-slice, 1) 3135 # break 3136 # -3137 # . prolog +3137 # . prologue 3138 55/push-ebp 3139 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 3140 # . save registers @@ -2825,13 +2825,13 @@ if ('onhashchange' in window) { 3332 5a/pop-to-edx 3333 59/pop-to-ecx 3334 58/pop-to-eax -3335 # . epilog +3335 # . epilogue 3336 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 3337 5d/pop-to-ebp 3338 c3/return 3339 -3340 emit-line-in-comment: # line : (address stream byte), out : (address buffered-file) -> <void> -3341 # . prolog +3340 emit-line-in-comment: # line : (address stream byte), out : (address buffered-file) +3341 # . prologue 3342 55/push-ebp 3343 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 3344 # write-buffered(out, " # ") @@ -2851,14 +2851,14 @@ if ('onhashchange' in window) { 3358 # . . discard args 3359 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 3360 $emit-line-in-comment:end: -3361 # . epilog +3361 # . epilogue 3362 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 3363 5d/pop-to-ebp 3364 c3/return 3365 3366 test-convert-instruction-passes-comments-through: 3367 # if a line starts with '#', pass it along unchanged -3368 # . prolog +3368 # . prologue 3369 55/push-ebp 3370 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 3371 # setup @@ -2919,14 +2919,14 @@ if ('onhashchange' in window) { 3426 e8/call check-stream-equal/disp32 3427 # . . discard args 3428 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -3429 # . epilog +3429 # . epilogue 3430 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 3431 5d/pop-to-ebp 3432 c3/return 3433 3434 test-convert-instruction-passes-labels-through: 3435 # if the first word ends with ':', pass along the entire line unchanged -3436 # . prolog +3436 # . prologue 3437 55/push-ebp 3438 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 3439 # setup @@ -2987,14 +2987,14 @@ if ('onhashchange' in window) { 3494 e8/call check-stream-equal/disp32 3495 # . . discard args 3496 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -3497 # . epilog +3497 # . epilogue 3498 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 3499 5d/pop-to-ebp 3500 c3/return 3501 3502 test-convert-instruction-handles-single-opcode: 3503 # if the instruction consists of a single opcode, strip its metadata and pass it along -3504 # . prolog +3504 # . prologue 3505 55/push-ebp 3506 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 3507 # setup @@ -3056,14 +3056,14 @@ if ('onhashchange' in window) { 3588 e8/call check-stream-equal/disp32 3589 # . . discard args 3590 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -3591 # . epilog +3591 # . epilogue 3592 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 3593 5d/pop-to-ebp 3594 c3/return 3595 3596 test-convert-instruction-handles-0f-opcode: 3597 # if the instruction starts with 0f opcode, include a second opcode -3598 # . prolog +3598 # . prologue 3599 55/push-ebp 3600 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 3601 # setup @@ -3125,14 +3125,14 @@ if ('onhashchange' in window) { 3682 e8/call check-stream-equal/disp32 3683 # . . discard args 3684 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -3685 # . epilog +3685 # . epilogue 3686 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 3687 5d/pop-to-ebp 3688 c3/return 3689 3690 test-convert-instruction-handles-f2-opcode: 3691 # if the instruction starts with f2 opcode, include a second opcode -3692 # . prolog +3692 # . prologue 3693 55/push-ebp 3694 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 3695 # setup @@ -3194,14 +3194,14 @@ if ('onhashchange' in window) { 3776 e8/call check-stream-equal/disp32 3777 # . . discard args 3778 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -3779 # . epilog +3779 # . epilogue 3780 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 3781 5d/pop-to-ebp 3782 c3/return 3783 3784 test-convert-instruction-handles-f3-opcode: 3785 # if the instruction starts with f3 opcode, include a second opcode -3786 # . prolog +3786 # . prologue 3787 55/push-ebp 3788 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 3789 # setup @@ -3263,14 +3263,14 @@ if ('onhashchange' in window) { 3870 e8/call check-stream-equal/disp32 3871 # . . discard args 3872 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -3873 # . epilog +3873 # . epilogue 3874 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 3875 5d/pop-to-ebp 3876 c3/return 3877 3878 test-convert-instruction-handles-f2-0f-opcode: 3879 # if the instruction starts with f2 0f opcode, include a second opcode -3880 # . prolog +3880 # . prologue 3881 55/push-ebp 3882 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 3883 # setup @@ -3332,14 +3332,14 @@ if ('onhashchange' in window) { 3964 e8/call check-stream-equal/disp32 3965 # . . discard args 3966 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -3967 # . epilog +3967 # . epilogue 3968 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 3969 5d/pop-to-ebp 3970 c3/return 3971 3972 test-convert-instruction-handles-f3-0f-opcode: 3973 # if the instruction starts with f3 0f opcode, include a second opcode -3974 # . prolog +3974 # . prologue 3975 55/push-ebp 3976 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 3977 # setup @@ -3401,14 +3401,14 @@ if ('onhashchange' in window) { 4058 e8/call check-stream-equal/disp32 4059 # . . discard args 4060 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -4061 # . epilog +4061 # . epilogue 4062 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 4063 5d/pop-to-ebp 4064 c3/return 4065 4066 test-convert-instruction-handles-unused-opcodes: 4067 # if the instruction doesn't start with f2, f3 or 0f, don't include other opcodes -4068 # . prolog +4068 # . prologue 4069 55/push-ebp 4070 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 4071 # setup @@ -3470,14 +3470,14 @@ if ('onhashchange' in window) { 4152 e8/call check-stream-equal/disp32 4153 # . . discard args 4154 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -4155 # . epilog +4155 # . epilogue 4156 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 4157 5d/pop-to-ebp 4158 c3/return 4159 4160 test-convert-instruction-handles-unused-second-opcodes: 4161 # if the second opcode isn't 0f, don't include further opcodes -4162 # . prolog +4162 # . prologue 4163 55/push-ebp 4164 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 4165 # setup @@ -3539,14 +3539,14 @@ if ('onhashchange' in window) { 4246 e8/call check-stream-equal/disp32 4247 # . . discard args 4248 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -4249 # . epilog +4249 # . epilogue 4250 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 4251 5d/pop-to-ebp 4252 c3/return 4253 4254 test-convert-instruction-handles-unused-second-opcodes-2: 4255 # if the second opcode isn't 0f, don't include further opcodes -4256 # . prolog +4256 # . prologue 4257 55/push-ebp 4258 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 4259 # setup @@ -3608,14 +3608,14 @@ if ('onhashchange' in window) { 4340 e8/call check-stream-equal/disp32 4341 # . . discard args 4342 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -4343 # . epilog +4343 # . epilogue 4344 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 4345 5d/pop-to-ebp 4346 c3/return 4347 4348 test-convert-instruction-emits-modrm-byte: 4349 # pack mod, rm32 and r32 operands into ModR/M byte -4350 # . prolog +4350 # . prologue 4351 55/push-ebp 4352 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 4353 # setup @@ -3677,13 +3677,13 @@ if ('onhashchange' in window) { 4434 e8/call check-stream-equal/disp32 4435 # . . discard args 4436 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -4437 # . epilog +4437 # . epilogue 4438 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 4439 5d/pop-to-ebp 4440 c3/return 4441 4442 test-convert-instruction-emits-modrm-byte-with-non-zero-mod: -4443 # . prolog +4443 # . prologue 4444 55/push-ebp 4445 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 4446 # setup @@ -3745,14 +3745,14 @@ if ('onhashchange' in window) { 4527 e8/call check-stream-equal/disp32 4528 # . . discard args 4529 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -4530 # . epilog +4530 # . epilogue 4531 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 4532 5d/pop-to-ebp 4533 c3/return 4534 4535 test-convert-instruction-emits-modrm-byte-from-subop: 4536 # pack mod, rm32 and subop operands into ModR/M byte -4537 # . prolog +4537 # . prologue 4538 55/push-ebp 4539 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 4540 # setup @@ -3814,14 +3814,14 @@ if ('onhashchange' in window) { 4621 e8/call check-stream-equal/disp32 4622 # . . discard args 4623 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -4624 # . epilog +4624 # . epilogue 4625 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 4626 5d/pop-to-ebp 4627 c3/return 4628 4629 test-convert-instruction-emits-modrm-byte-with-missing-mod: 4630 # pack rm32 and r32 operands into ModR/M byte -4631 # . prolog +4631 # . prologue 4632 55/push-ebp 4633 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 4634 # setup @@ -3883,14 +3883,14 @@ if ('onhashchange' in window) { 4715 e8/call check-stream-equal/disp32 4716 # . . discard args 4717 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -4718 # . epilog +4718 # . epilogue 4719 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 4720 5d/pop-to-ebp 4721 c3/return 4722 4723 test-convert-instruction-emits-modrm-byte-with-missing-rm32: 4724 # pack mod and r32 operands into ModR/M byte -4725 # . prolog +4725 # . prologue 4726 55/push-ebp 4727 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 4728 # setup @@ -3952,14 +3952,14 @@ if ('onhashchange' in window) { 4809 e8/call check-stream-equal/disp32 4810 # . . discard args 4811 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -4812 # . epilog +4812 # . epilogue 4813 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 4814 5d/pop-to-ebp 4815 c3/return 4816 4817 test-convert-instruction-emits-modrm-byte-with-missing-r32: 4818 # pack mod and rm32 operands into ModR/M byte -4819 # . prolog +4819 # . prologue 4820 55/push-ebp 4821 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 4822 # setup @@ -4021,14 +4021,14 @@ if ('onhashchange' in window) { 4903 e8/call check-stream-equal/disp32 4904 # . . discard args 4905 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -4906 # . epilog +4906 # . epilogue 4907 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 4908 5d/pop-to-ebp 4909 c3/return 4910 4911 test-convert-instruction-emits-sib-byte: 4912 # pack base, index and scale operands into SIB byte -4913 # . prolog +4913 # . prologue 4914 55/push-ebp 4915 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 4916 # setup @@ -4090,14 +4090,14 @@ if ('onhashchange' in window) { 4997 e8/call check-stream-equal/disp32 4998 # . . discard args 4999 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -5000 # . epilog +5000 # . epilogue 5001 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5002 5d/pop-to-ebp 5003 c3/return 5004 5005 test-convert-instruction-emits-sib-byte-with-missing-base: 5006 # pack index and scale operands into SIB byte -5007 # . prolog +5007 # . prologue 5008 55/push-ebp 5009 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 5010 # setup @@ -4159,14 +4159,14 @@ if ('onhashchange' in window) { 5091 e8/call check-stream-equal/disp32 5092 # . . discard args 5093 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -5094 # . epilog +5094 # . epilogue 5095 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5096 5d/pop-to-ebp 5097 c3/return 5098 5099 test-convert-instruction-emits-sib-byte-with-missing-index: 5100 # pack base and scale operands into SIB byte -5101 # . prolog +5101 # . prologue 5102 55/push-ebp 5103 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 5104 # setup @@ -4228,14 +4228,14 @@ if ('onhashchange' in window) { 5185 e8/call check-stream-equal/disp32 5186 # . . discard args 5187 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -5188 # . epilog +5188 # . epilogue 5189 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5190 5d/pop-to-ebp 5191 c3/return 5192 5193 test-convert-instruction-emits-sib-byte-with-missing-scale: 5194 # pack base and index operands into SIB byte -5195 # . prolog +5195 # . prologue 5196 55/push-ebp 5197 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 5198 # setup @@ -4297,14 +4297,14 @@ if ('onhashchange' in window) { 5279 e8/call check-stream-equal/disp32 5280 # . . discard args 5281 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -5282 # . epilog +5282 # . epilogue 5283 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5284 5d/pop-to-ebp 5285 c3/return 5286 5287 test-convert-instruction-handles-disp32-operand: 5288 # expand /disp32 operand into 4 bytes -5289 # . prolog +5289 # . prologue 5290 55/push-ebp 5291 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 5292 # setup @@ -4366,14 +4366,14 @@ if ('onhashchange' in window) { 5373 e8/call check-stream-equal/disp32 5374 # . . discard args 5375 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -5376 # . epilog +5376 # . epilogue 5377 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5378 5d/pop-to-ebp 5379 c3/return 5380 5381 test-convert-instruction-handles-disp16-operand: 5382 # expand /disp16 operand into 2 bytes -5383 # . prolog +5383 # . prologue 5384 55/push-ebp 5385 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 5386 # setup @@ -4435,14 +4435,14 @@ if ('onhashchange' in window) { 5467 e8/call check-stream-equal/disp32 5468 # . . discard args 5469 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -5470 # . epilog +5470 # . epilogue 5471 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5472 5d/pop-to-ebp 5473 c3/return 5474 5475 test-convert-instruction-handles-disp8-operand: 5476 # expand /disp8 operand into 1 byte -5477 # . prolog +5477 # . prologue 5478 55/push-ebp 5479 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 5480 # setup @@ -4504,14 +4504,14 @@ if ('onhashchange' in window) { 5561 e8/call check-stream-equal/disp32 5562 # . . discard args 5563 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -5564 # . epilog +5564 # . epilogue 5565 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5566 5d/pop-to-ebp 5567 c3/return 5568 5569 test-convert-instruction-handles-disp8-name: 5570 # pass /disp8 name directly through -5571 # . prolog +5571 # . prologue 5572 55/push-ebp 5573 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 5574 # setup @@ -4573,14 +4573,14 @@ if ('onhashchange' in window) { 5655 e8/call check-stream-equal/disp32 5656 # . . discard args 5657 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -5658 # . epilog +5658 # . epilogue 5659 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5660 5d/pop-to-ebp 5661 c3/return 5662 5663 test-convert-instruction-handles-imm32-operand: 5664 # expand /imm32 operand into 4 bytes -5665 # . prolog +5665 # . prologue 5666 55/push-ebp 5667 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 5668 # setup @@ -4642,7 +4642,7 @@ if ('onhashchange' in window) { 5749 e8/call check-stream-equal/disp32 5750 # . . discard args 5751 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -5752 # . epilog +5752 # . epilogue 5753 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5754 5d/pop-to-ebp 5755 c3/return @@ -4650,7 +4650,7 @@ if ('onhashchange' in window) { 5757 test-convert-instruction-handles-imm16-operand: 5758 # expand /imm16 operand into 2 bytes 5759 # we don't have one of these at the moment, so this expands to an invalid instruction -5760 # . prolog +5760 # . prologue 5761 55/push-ebp 5762 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 5763 # setup @@ -4712,7 +4712,7 @@ if ('onhashchange' in window) { 5844 e8/call check-stream-equal/disp32 5845 # . . discard args 5846 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -5847 # . epilog +5847 # . epilogue 5848 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5849 5d/pop-to-ebp 5850 c3/return @@ -4720,7 +4720,7 @@ if ('onhashchange' in window) { 5852 test-convert-instruction-handles-imm8-operand: 5853 # expand /imm8 operand into 1 byte 5854 # we don't have one of these at the moment, so this expands to an invalid instruction -5855 # . prolog +5855 # . prologue 5856 55/push-ebp 5857 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 5858 # setup @@ -4782,14 +4782,14 @@ if ('onhashchange' in window) { 5939 e8/call check-stream-equal/disp32 5940 # . . discard args 5941 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -5942 # . epilog +5942 # . epilogue 5943 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5944 5d/pop-to-ebp 5945 c3/return 5946 5947 # shortcut for parse-hex-int(next-token-from-slice(word->start, word->end, '/')) 5948 parse-datum-of-word: # word : (address slice) -> value/eax -5949 # . prolog +5949 # . prologue 5950 55/push-ebp 5951 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 5952 # . save registers @@ -4824,7 +4824,7 @@ if ('onhashchange' in window) { 5981 # . restore registers 5982 5e/pop-to-esi 5983 59/pop-to-ecx -5984 # . epilog +5984 # . epilogue 5985 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5986 5d/pop-to-ebp 5987 c3/return -- cgit 1.4.1-2-gfad0