diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-10-15 19:35:19 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-10-15 19:35:19 -0700 |
commit | 7a5832204a80ff43d23c3a384c26e2217ef5908b (patch) | |
tree | 5d3dce95369bf30b84735afd6e21bf1a43db16b7 /apps | |
parent | 6a51218e12ce75e51301b834e1c48e86aefedc1e (diff) | |
download | mu-7a5832204a80ff43d23c3a384c26e2217ef5908b.tar.gz |
5698
Thanks Andrew Owen for reporting this typo.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/assort.subx | 18 | ||||
-rw-r--r-- | apps/braces.subx | 18 | ||||
-rw-r--r-- | apps/calls.subx | 66 | ||||
-rw-r--r-- | apps/crenshaw2-1.subx | 22 | ||||
-rw-r--r-- | apps/crenshaw2-1b.subx | 22 | ||||
-rw-r--r-- | apps/dquotes.subx | 82 | ||||
-rw-r--r-- | apps/factorial.subx | 6 | ||||
-rw-r--r-- | apps/handle.subx | 24 | ||||
-rw-r--r-- | apps/hex.subx | 40 | ||||
-rw-r--r-- | apps/mulisp.subx | 22 | ||||
-rw-r--r-- | apps/pack.subx | 210 | ||||
-rw-r--r-- | apps/sigils.subx | 218 | ||||
-rw-r--r-- | apps/survey.subx | 138 | ||||
-rw-r--r-- | apps/tests.subx | 6 |
14 files changed, 446 insertions, 446 deletions
diff --git a/apps/assort.subx b/apps/assort.subx index 6b3eadba..1898d832 100644 --- a/apps/assort.subx +++ b/apps/assort.subx @@ -24,7 +24,7 @@ # . 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 Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -92,7 +92,7 @@ subx-assort: # in : (address buffered-file), out : (address buffered-file) -> < # read-segments(in, table) # write-segments(out, table) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -151,13 +151,13 @@ $subx-assort:end: 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x5c/imm32 # add to esp # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-assort: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -449,7 +449,7 @@ test-subx-assort: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -489,7 +489,7 @@ read-segments: # in : (address buffered-file), table : (address stream {string, # word-slice->start: esi # temporary: eax # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -844,7 +844,7 @@ $read-segments:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -859,7 +859,7 @@ write-segments: # out : (address buffered-file), table : (address stream {strin # curr += 8 # flush(out) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -905,7 +905,7 @@ $write-segments:end: 5e/pop-to-esi 5a/pop-to-edx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/braces.subx b/apps/braces.subx index 32042539..87907b95 100644 --- a/apps/braces.subx +++ b/apps/braces.subx @@ -51,7 +51,7 @@ == code Entry: # run tests if necessary, a REPL if not - # . prolog + # . prologue 89/<- %ebp 4/r32/esp # initialize heap (new-segment Heap-size Heap) @@ -111,7 +111,7 @@ subx-braces: # in : (address buffered-file), out : (address buffered-file) -> < # print(out, word-slice " ") # print(out, "\n") # flush(out) - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -251,13 +251,13 @@ $subx-braces:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-subx-braces-passes-most-words-through: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -282,7 +282,7 @@ test-subx-braces-passes-most-words-through: #? (write 2 "$\n") #? # }}} (check-stream-equal _test-output-stream "== abcd 0x1 \n" "F - test-subx-braces-passes-most-words-through") - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -300,7 +300,7 @@ test-subx-braces-1: # cd _loop1/imm32 # _break1: # - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -325,7 +325,7 @@ test-subx-braces-1: #? (write 2 "$\n") #? # }}} (check-stream-equal _test-output-stream "_loop0x00000001:\nab _break0x00000001/imm32 \ncd _loop0x00000001/imm32 \n_break0x00000001:\n" "F - test-subx-braces-1") - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -347,7 +347,7 @@ test-subx-braces-2: # cd _loop1/imm32 # _break1: # - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -372,7 +372,7 @@ test-subx-braces-2: #? (write 2 "$\n") #? # }}} (check-stream-equal _test-output-stream "_loop0x00000001:\n_loop0x00000002:\nab _break0x00000002/imm32 \n_break0x00000002:\ncd _loop0x00000001/imm32 \n_break0x00000001:\n" "F - test-subx-braces-2") - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return diff --git a/apps/calls.subx b/apps/calls.subx index 4747d4c5..88e963a5 100644 --- a/apps/calls.subx +++ b/apps/calls.subx @@ -25,7 +25,7 @@ == code Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/<- %ebp 4/r32/esp # initialize heap @@ -97,7 +97,7 @@ subx-calls: # in : (address buffered-file), out : (address buffered-file) -> <v # emit-call(out, words) # flush(out) # - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -226,7 +226,7 @@ $subx-calls:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -241,7 +241,7 @@ parse-line: # line : (address stream byte), words : (address stream slice) # write-int(words, word-slice->start) # write-int(words, word-slice->end) # - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -341,7 +341,7 @@ $parse-line:end: 81 0/subop/add %esp 8/imm32 # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -372,7 +372,7 @@ emit-call: # out : (address buffered-file), words : (address stream slice) # print-int32-buffered(out, words->write >> 1 - 4) # write-buffered(out, "/imm32\n") # - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -517,7 +517,7 @@ $emit-call:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -546,7 +546,7 @@ $emit-call:error1: # never gets here test-subx-calls-passes-most-lines-through: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -615,13 +615,13 @@ test-subx-calls-passes-most-lines-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-subx-calls-processes-calls: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -750,7 +750,7 @@ test-subx-calls-processes-calls: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -812,7 +812,7 @@ next-word-string-or-expression-without-metadata: # line : (address stream), out # ecx: often line->read # eax: often line->data[line->read] # - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -993,7 +993,7 @@ $next-word-string-or-expression-without-metadata:end: 5e/pop-to-esi 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -1194,7 +1194,7 @@ $next-word-string-or-expression-without-metadata:error5: # never gets here test-next-word-string-or-expression-without-metadata: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1261,13 +1261,13 @@ test-next-word-string-or-expression-without-metadata: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-whole-comment: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1334,13 +1334,13 @@ test-next-word-string-or-expression-without-metadata-returns-whole-comment: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-empty-slice-on-eof: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1376,13 +1376,13 @@ test-next-word-string-or-expression-without-metadata-returns-empty-slice-on-eof: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-string-literal: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1439,13 +1439,13 @@ test-next-word-string-or-expression-without-metadata-returns-string-literal: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-string-with-escapes: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1502,13 +1502,13 @@ test-next-word-string-or-expression-without-metadata-returns-string-with-escapes e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-whole-expression: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1565,13 +1565,13 @@ test-next-word-string-or-expression-without-metadata-returns-whole-expression: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-eol-on-trailing-close-paren: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1620,13 +1620,13 @@ test-next-word-string-or-expression-without-metadata-returns-eol-on-trailing-clo e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-handles-comment-after-trailing-close-paren: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1675,13 +1675,13 @@ test-next-word-string-or-expression-without-metadata-handles-comment-after-trail e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-handles-newline-after-trailing-close-paren: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1730,13 +1730,13 @@ test-next-word-string-or-expression-without-metadata-handles-newline-after-trail e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-stops-at-close-paren: - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # setup @@ -1793,7 +1793,7 @@ test-next-word-string-or-expression-without-metadata-stops-at-close-paren: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add %esp 0xc/imm32 - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return diff --git a/apps/crenshaw2-1.subx b/apps/crenshaw2-1.subx index f78f03ae..9fc2cb08 100644 --- a/apps/crenshaw2-1.subx +++ b/apps/crenshaw2-1.subx @@ -31,7 +31,7 @@ # . 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 Entry: # run tests if necessary, call 'compile' if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -91,7 +91,7 @@ $main:end: # the main entry point compile: # in : (address buffered-file), out : fd or (address stream), err : fd or (address stream), ed : (address exit-descriptor) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -182,7 +182,7 @@ $compile:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -210,7 +210,7 @@ get-num: # in : (address buffered-file), out : (address stream), err : fd or (a # get-char in each iteration of the loop. (Thereby demonstrating that it's # not the right interface for us. But we'll keep it just to follow Crenshaw.) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # - if (is-digit?(Look)) expected(ed, err, "integer") @@ -288,7 +288,7 @@ $get-num:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -473,7 +473,7 @@ test-get-num-aborts-on-non-digit-in-Look: # write(f, "Error: "+s+" expected\n") then stop(ed, 1) expected: # ed : (address exit-descriptor), f : fd or (address stream), s : (address array byte) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write(f, "Error: ") @@ -508,14 +508,14 @@ expected: # ed : (address exit-descriptor), f : fd or (address stream), s : (ad e8/call stop/disp32 # should never get past this point $expected:dead-end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # read a byte from 'f', and save it in 'Look' get-char: # f : (address buffered-file) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -532,13 +532,13 @@ get-char: # f : (address buffered-file) -> <void> $get-char:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return is-digit?: # c : int -> eax : boolean - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # eax = false @@ -552,7 +552,7 @@ is-digit?: # c : int -> eax : boolean # otherwise return true b8/copy-to-eax 1/imm32 $is-digit?:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/crenshaw2-1b.subx b/apps/crenshaw2-1b.subx index 2956e396..2a321281 100644 --- a/apps/crenshaw2-1b.subx +++ b/apps/crenshaw2-1b.subx @@ -31,7 +31,7 @@ # . 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 Entry: # run tests if necessary, call 'compile' if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -91,7 +91,7 @@ $main:end: # the main entry point compile: # in : (address buffered-file), out : fd or (address stream), err : fd or (address stream), ed : (address exit-descriptor) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -182,7 +182,7 @@ $compile:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -216,7 +216,7 @@ get-num: # in : (address buffered-file), out : (address stream), err : fd or (a # get-char in each iteration of the loop. (Thereby demonstrating that it's # not the right interface for us. But we'll keep it just to follow Crenshaw.) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # - if (is-digit?(Look)) expected(ed, err, "integer") @@ -306,7 +306,7 @@ $get-num:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -673,7 +673,7 @@ test-get-num-reads-multiple-digits-followed-by-nondigit: # write(f, "Error: "+s+" expected\n") then stop(ed, 1) expected: # ed : (address exit-descriptor), f : fd or (address stream), s : (address array byte) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write(f, "Error: ") @@ -708,14 +708,14 @@ expected: # ed : (address exit-descriptor), f : fd or (address stream), s : (ad e8/call stop/disp32 # should never get past this point $expected:dead-end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # read a byte from 'f', and save it in 'Look' get-char: # f : (address buffered-file) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -732,13 +732,13 @@ get-char: # f : (address buffered-file) -> <void> $get-char:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return is-digit?: # c : int -> eax : boolean - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # eax = false @@ -752,7 +752,7 @@ is-digit?: # c : int -> eax : boolean # otherwise return true b8/copy-to-eax 1/imm32 $is-digit?:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/dquotes.subx b/apps/dquotes.subx index 7146a8d3..8d85b45b 100644 --- a/apps/dquotes.subx +++ b/apps/dquotes.subx @@ -20,7 +20,7 @@ # . 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 Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -106,7 +106,7 @@ subx-dquotes: # in : (address buffered-file), out : (address buffered-file) -> # write-stream-data(out, new-data-segment) # flush(out) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -271,7 +271,7 @@ $subx-dquotes:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -286,7 +286,7 @@ process-string-literal: # string-literal : (address slice), out : (address buff # emit-metadata(out, string-literal) # ++ *Next-string-literal # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -378,13 +378,13 @@ $process-string-literal:end: 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x16/imm32 # add to esp # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-dquotes-is-idempotent-by-default: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -635,13 +635,13 @@ test-subx-dquotes-is-idempotent-by-default: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-dquotes-processes-string-literals: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -839,7 +839,7 @@ test-subx-dquotes-processes-string-literals: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -873,7 +873,7 @@ emit-string-literal-data: # out : (address stream), word : (address slice) # idx = 0 # write(out, "\n") # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1015,13 +1015,13 @@ $emit-string-literal-data:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return is-alphanumeric?: # c : int -> eax : boolean - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # eax = c @@ -1051,13 +1051,13 @@ $is-alphanumeric?:false: $is-alphanumeric?:true: b8/copy-to-eax 1/imm32/true $is-alphanumeric?:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-string-literal-data: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1115,13 +1115,13 @@ test-emit-string-literal-data: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-string-literal-data-empty: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1179,14 +1179,14 @@ test-emit-string-literal-data-empty: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # just to keep things simple test-emit-string-literal-data-no-metadata-for-non-alphanumerics: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1244,13 +1244,13 @@ test-emit-string-literal-data-no-metadata-for-non-alphanumerics: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-string-literal-data-handles-escape-sequences: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1308,13 +1308,13 @@ test-emit-string-literal-data-handles-escape-sequences: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-string-literal-data-handles-newline-escape: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1372,7 +1372,7 @@ test-emit-string-literal-data-handles-newline-escape: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1394,7 +1394,7 @@ emit-metadata: # out : (address buffered-file), word : (address slice) # slice->start = curr # write-slice-buffered(out, slice) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1464,13 +1464,13 @@ $emit-metadata:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-metadata: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1523,13 +1523,13 @@ test-emit-metadata: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-metadata-none: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1582,13 +1582,13 @@ test-emit-metadata-none: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-metadata-multiple: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1641,13 +1641,13 @@ test-emit-metadata-multiple: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-metadata-when-no-datum: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1702,13 +1702,13 @@ test-emit-metadata-when-no-datum: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-metadata-in-string-literal: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1782,13 +1782,13 @@ test-emit-metadata-in-string-literal: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return string-length-at-start-of-slice: # curr : (address byte), end : (address byte) -> length/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1833,13 +1833,13 @@ $string-length-at-start-of-slice:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-string-length-at-start-of-slice: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup: (eax..ecx) = "\"abc\" def" @@ -1864,13 +1864,13 @@ test-string-length-at-start-of-slice: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-string-length-at-start-of-slice-escaped: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup: (eax..ecx) = "\"ab\\c\" def" @@ -1895,7 +1895,7 @@ test-string-length-at-start-of-slice-escaped: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/factorial.subx b/apps/factorial.subx index 66fc4be0..b6635016 100644 --- a/apps/factorial.subx +++ b/apps/factorial.subx @@ -19,7 +19,7 @@ # . 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 Entry: # run tests if necessary, compute `factorial(5)` if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -69,7 +69,7 @@ $main:end: cd/syscall 0x80/imm8 factorial: # n : int -> int/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp 53/push-ebx @@ -91,7 +91,7 @@ factorial: # n : int -> int/eax f7 4/subop/multiply 1/mod/*+disp8 5/rm32/ebp . . 8/disp8 . # multiply *(ebp+8) into eax # TODO: check for overflow $factorial:end: - # . epilog + # . epilogue 5b/pop-to-ebx 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp diff --git a/apps/handle.subx b/apps/handle.subx index 6ebf35b2..7df44741 100644 --- a/apps/handle.subx +++ b/apps/handle.subx @@ -45,7 +45,7 @@ $handle-main:end: cd/syscall 0x80/imm8 new: # ad : (address allocation-descriptor), n : int, out : (address handle) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -87,13 +87,13 @@ $new:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-new: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var heap/edx : (address allocation-descriptor) = {0, 0} @@ -154,13 +154,13 @@ test-new: # clean up # . *Next-alloc-id = 1 c7 0/subop/copy 0/mod/indirect 5/rm32/.disp32 . . . Next-alloc-id/disp32 1/imm32 # copy to *Next-alloc-id - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return _pending-test-new-failure: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . *Next-alloc-id = 0x34 @@ -216,13 +216,13 @@ _pending-test-new-failure: # clean up # . *Next-alloc-id = 1 c7 0/subop/copy 0/mod/indirect 5/rm32/.disp32 . . . Next-alloc-id/disp32 1/imm32 # copy to *Next-alloc-id - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return lookup: # h : (handle T) -> eax : (address T) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # - as a proof of concept for future inlining, uses no general-purpose registers besides the output (eax) @@ -258,7 +258,7 @@ lookup: # h : (handle T) -> eax : (address T) #? # add 4 to eax #? 05/add-to-eax 4/imm32 # - } - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -278,7 +278,7 @@ $lookup:abort: cd/syscall 0x80/imm8 test-lookup-success: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -341,13 +341,13 @@ test-lookup-success: # . restore registers 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-lookup-failure: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var heap/esi : (address allocation-descriptor) = {0, 0} @@ -414,7 +414,7 @@ test-lookup-failure: # clean up # . *Next-alloc-id = 1 c7 0/subop/copy 0/mod/indirect 5/rm32/.disp32 . . . Next-alloc-id/disp32 1/imm32 # copy to *Next-alloc-id - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/hex.subx b/apps/hex.subx index e5f13077..98e14a25 100644 --- a/apps/hex.subx +++ b/apps/hex.subx @@ -18,7 +18,7 @@ # . 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 Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -85,7 +85,7 @@ subx-hex: # in : (address buffered-file), out : (address buffered-file), err : # write-byte-buffered(out, AL) # flush(out) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -124,7 +124,7 @@ $subx-hex:loop-end: $subx-hex:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -146,7 +146,7 @@ convert-next-octet: # in : (address buffered-file), err : (address buffered-fil # eax = (ecx << 4) | eax # return # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -198,7 +198,7 @@ $convert-next-octet:convert: $convert-next-octet:end: # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -299,7 +299,7 @@ test-convert-next-octet: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-convert-next-octet:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -393,7 +393,7 @@ test-convert-next-octet-handles-Eof: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-convert-next-octet-handles-Eof:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -483,7 +483,7 @@ test-convert-next-octet-aborts-on-single-hex-byte: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-convert-next-octet-aborts-on-single-hex-byte:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -503,7 +503,7 @@ scan-next-byte: # in : (address buffered-file), err : (address buffered-file), # if (eax == '#') skip-until-newline(in) # else error-byte(ed, err, "invalid byte: " eax) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -567,7 +567,7 @@ $scan-next-byte:check3: e8/call error-byte/disp32 # never returns $scan-next-byte:end: # . restore registers - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -668,7 +668,7 @@ test-scan-next-byte: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -770,7 +770,7 @@ test-scan-next-byte-skips-whitespace: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte-skips-whitespace:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -880,7 +880,7 @@ test-scan-next-byte-skips-comment: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte-skips-comment:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -990,7 +990,7 @@ test-scan-next-byte-skips-comment-and-whitespace: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte-skips-comment-and-whitespace:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -1100,7 +1100,7 @@ test-scan-next-byte-skips-whitespace-and-comment: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte-skips-whitespace-and-comment:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -1202,7 +1202,7 @@ test-scan-next-byte-reads-final-byte: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte-reads-final-byte:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -1296,7 +1296,7 @@ test-scan-next-byte-handles-Eof: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte-handles-Eof:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -1386,7 +1386,7 @@ test-scan-next-byte-aborts-on-invalid-byte: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp $test-scan-next-byte-aborts-on-invalid-byte:end: - # . epilog + # . epilogue # don't restore esp from ebp; manually reclaim locals 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp 5d/pop-to-ebp @@ -1400,7 +1400,7 @@ skip-until-newline: # in : (address buffered-file) -> <void> # if (eax == Eof) break # if (eax == 0x0a) break # pop eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1422,7 +1422,7 @@ $skip-until-newline:loop: $skip-until-newline:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/mulisp.subx b/apps/mulisp.subx index e1365e60..226042c2 100644 --- a/apps/mulisp.subx +++ b/apps/mulisp.subx @@ -11,7 +11,7 @@ == code Entry: # run tests if necessary, a REPL if not - # . prolog + # . prologue 89/<- %ebp 4/r32/esp # initialize heap (new-segment Heap-size Heap) @@ -75,7 +75,7 @@ $main:end: # tag for them all repl: # in : (address buffered-file), out : (address buffered-file) -> <void> - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -93,7 +93,7 @@ repl: # in : (address buffered-file), out : (address buffered-file) -> <void> $repl:end: # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -105,7 +105,7 @@ $repl:end: # symbols start with anything else but quote, backquote, unquote or splice # only one s-expression per line lisp-read: # in : (address buffered-file) -> eax : (address cell) - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -137,7 +137,7 @@ $lisp-read:end: 81 0/subop/add %esp 0x20c/imm32 # . restore registers 59/pop-to-ecx - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -182,14 +182,14 @@ next-mulisp-token: # in : (address buffered-file), line : (address stream), res # result->en = &line->data[line->read] # return # - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers $next-mulisp-token:end: # . reclaim locals # . restore registers - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return @@ -199,20 +199,20 @@ new-int-cell: # in : (address slice) -> eax : (address cell) new-string-cell: # in : (address slice) -> eax : (address cell) lisp-eval: # in : (address cell) -> eax : (address cell) - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers 8b/-> *(ebp+8) 0/r32/eax $lisp-eval:end: # . restore registers - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return lisp-print: # out : (address buffered-file), x : (address cell) - # . prolog + # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp # . save registers @@ -222,7 +222,7 @@ lisp-print: # out : (address buffered-file), x : (address cell) (flush Stdout) $lisp-print:end: # . restore registers - # . epilog + # . epilogue 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return diff --git a/apps/pack.subx b/apps/pack.subx index 1be0c4c4..3f300f3a 100644 --- a/apps/pack.subx +++ b/apps/pack.subx @@ -19,7 +19,7 @@ # . 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 Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -120,7 +120,7 @@ subx-pack: # in : (address buffered-file), out : (address buffered-file) -> <vo # convert-data(line, out) # flush(out) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -384,14 +384,14 @@ $subx-pack:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-pack-passes-empty-lines-through: # if a line is empty, pass it along unchanged - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -453,14 +453,14 @@ test-subx-pack-passes-empty-lines-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-pack-passes-lines-with-just-whitespace-through: # if a line is empty, pass it along unchanged - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -530,14 +530,14 @@ test-subx-pack-passes-lines-with-just-whitespace-through: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-pack-passes-segment-headers-through: # if a line starts with '==', pass it along unchanged - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -607,14 +607,14 @@ test-subx-pack-passes-segment-headers-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-pack-in-data-segment: # correctly process lines in the data segment - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -747,14 +747,14 @@ test-subx-pack-in-data-segment: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-pack-code-and-data-segments: # correctly process lines in both code and data segments - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -928,7 +928,7 @@ test-subx-pack-code-and-data-segments: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -953,7 +953,7 @@ convert-data: # line : (address stream byte), out : (address buffered-file) -> # emit(out, word-slice, 1) # write-buffered(out, "\n") # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1146,14 +1146,14 @@ $convert-data:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-data-passes-comments-through: # if a line starts with '#', pass it along unchanged - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1240,14 +1240,14 @@ test-convert-data-passes-comments-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-data-passes-labels-through: # if the first word ends with ':', pass along the entire line unchanged - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1308,7 +1308,7 @@ test-convert-data-passes-labels-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1316,7 +1316,7 @@ test-convert-data-passes-labels-through: test-convert-data-passes-names-through: # If a word is a valid name, just emit it unchanged. # Later phases will deal with it. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1377,14 +1377,14 @@ test-convert-data-passes-names-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-data-handles-imm32: # If a word has the /imm32 metadata, emit it in 4 bytes. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1445,7 +1445,7 @@ test-convert-data-handles-imm32: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1453,7 +1453,7 @@ test-convert-data-handles-imm32: test-convert-data-handles-single-byte: # Any metadata but /imm32 will emit a single byte. # Data segments can't have /disp32, and SubX doesn't support 16-bit operands. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1514,14 +1514,14 @@ test-convert-data-handles-single-byte: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-data-multiple-bytes: # Multiple single-byte words in input stream get processed one by one. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1582,14 +1582,14 @@ test-convert-data-multiple-bytes: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-data-byte-then-name: # Single-byte word followed by valid name get processed one by one. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1650,14 +1650,14 @@ test-convert-data-byte-then-name: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-data-multiple-words: # Multiple words in input stream get processed one by one. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1744,14 +1744,14 @@ test-convert-data-multiple-words: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-data-trailing-comment: # Trailing comments in data segment get appropriately ignored. - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1838,7 +1838,7 @@ test-convert-data-trailing-comment: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1874,7 +1874,7 @@ convert-instruction: # line : (address stream byte), out : (address buffered-fi # emit-imm(line, out) # emit-line-in-comment(line, out) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1992,7 +1992,7 @@ $convert-instruction:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2030,7 +2030,7 @@ emit-opcodes: # line : (address stream byte), out : (address buffered-file) -> # op3 = next-token-from-slice(op3->start, op3->end, "/") # write-slice-buffered(out, op3) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -2288,7 +2288,7 @@ $emit-opcodes:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2319,7 +2319,7 @@ emit-modrm: # line : (address stream byte), out : (address buffered-file) -> <v # modrm |= rm32 & 0b111 # emit-hex(out, modrm, 1) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -2607,7 +2607,7 @@ $emit-modrm:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2637,7 +2637,7 @@ emit-sib: # line : (address stream byte), out : (address buffered-file) -> <voi # sib |= base & 0b111 # emit-hex(out, sib, 1) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -2890,7 +2890,7 @@ $emit-sib:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2913,7 +2913,7 @@ emit-disp: # line : (address stream byte), out : (address buffered-file) -> <vo # emit(out, word-slice, 1) # break # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -3111,7 +3111,7 @@ $emit-disp:break: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3134,7 +3134,7 @@ emit-imm: # line : (address stream byte), out : (address buffered-file) -> <voi # emit(out, word-slice, 1) # break # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -3332,13 +3332,13 @@ $emit-imm:break: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return emit-line-in-comment: # line : (address stream byte), out : (address buffered-file) -> <void> - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write-buffered(out, " # ") @@ -3358,14 +3358,14 @@ emit-line-in-comment: # line : (address stream byte), out : (address buffered-f # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp $emit-line-in-comment:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-passes-comments-through: # if a line starts with '#', pass it along unchanged - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3426,14 +3426,14 @@ test-convert-instruction-passes-comments-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-passes-labels-through: # if the first word ends with ':', pass along the entire line unchanged - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3494,14 +3494,14 @@ test-convert-instruction-passes-labels-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-single-opcode: # if the instruction consists of a single opcode, strip its metadata and pass it along - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3588,14 +3588,14 @@ test-convert-instruction-handles-single-opcode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-0f-opcode: # if the instruction starts with 0f opcode, include a second opcode - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3682,14 +3682,14 @@ test-convert-instruction-handles-0f-opcode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-f2-opcode: # if the instruction starts with f2 opcode, include a second opcode - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3776,14 +3776,14 @@ test-convert-instruction-handles-f2-opcode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-f3-opcode: # if the instruction starts with f3 opcode, include a second opcode - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3870,14 +3870,14 @@ test-convert-instruction-handles-f3-opcode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-f2-0f-opcode: # if the instruction starts with f2 0f opcode, include a second opcode - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3964,14 +3964,14 @@ test-convert-instruction-handles-f2-0f-opcode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-f3-0f-opcode: # if the instruction starts with f3 0f opcode, include a second opcode - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4058,14 +4058,14 @@ test-convert-instruction-handles-f3-0f-opcode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-unused-opcodes: # if the instruction doesn't start with f2, f3 or 0f, don't include other opcodes - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4152,14 +4152,14 @@ test-convert-instruction-handles-unused-opcodes: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-unused-second-opcodes: # if the second opcode isn't 0f, don't include further opcodes - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4246,14 +4246,14 @@ test-convert-instruction-handles-unused-second-opcodes: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-unused-second-opcodes-2: # if the second opcode isn't 0f, don't include further opcodes - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4340,14 +4340,14 @@ test-convert-instruction-handles-unused-second-opcodes-2: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-modrm-byte: # pack mod, rm32 and r32 operands into ModR/M byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4434,13 +4434,13 @@ test-convert-instruction-emits-modrm-byte: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-modrm-byte-with-non-zero-mod: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4527,14 +4527,14 @@ test-convert-instruction-emits-modrm-byte-with-non-zero-mod: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-modrm-byte-from-subop: # pack mod, rm32 and subop operands into ModR/M byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4621,14 +4621,14 @@ test-convert-instruction-emits-modrm-byte-from-subop: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-modrm-byte-with-missing-mod: # pack rm32 and r32 operands into ModR/M byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4715,14 +4715,14 @@ test-convert-instruction-emits-modrm-byte-with-missing-mod: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-modrm-byte-with-missing-rm32: # pack mod and r32 operands into ModR/M byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4809,14 +4809,14 @@ test-convert-instruction-emits-modrm-byte-with-missing-rm32: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-modrm-byte-with-missing-r32: # pack mod and rm32 operands into ModR/M byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4903,14 +4903,14 @@ test-convert-instruction-emits-modrm-byte-with-missing-r32: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-sib-byte: # pack base, index and scale operands into SIB byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4997,14 +4997,14 @@ test-convert-instruction-emits-sib-byte: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-sib-byte-with-missing-base: # pack index and scale operands into SIB byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5091,14 +5091,14 @@ test-convert-instruction-emits-sib-byte-with-missing-base: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-sib-byte-with-missing-index: # pack base and scale operands into SIB byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5185,14 +5185,14 @@ test-convert-instruction-emits-sib-byte-with-missing-index: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-emits-sib-byte-with-missing-scale: # pack base and index operands into SIB byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5279,14 +5279,14 @@ test-convert-instruction-emits-sib-byte-with-missing-scale: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-disp32-operand: # expand /disp32 operand into 4 bytes - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5373,14 +5373,14 @@ test-convert-instruction-handles-disp32-operand: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-disp16-operand: # expand /disp16 operand into 2 bytes - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5467,14 +5467,14 @@ test-convert-instruction-handles-disp16-operand: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-disp8-operand: # expand /disp8 operand into 1 byte - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5561,14 +5561,14 @@ test-convert-instruction-handles-disp8-operand: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-disp8-name: # pass /disp8 name directly through - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5655,14 +5655,14 @@ test-convert-instruction-handles-disp8-name: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-convert-instruction-handles-imm32-operand: # expand /imm32 operand into 4 bytes - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5749,7 +5749,7 @@ test-convert-instruction-handles-imm32-operand: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -5757,7 +5757,7 @@ test-convert-instruction-handles-imm32-operand: test-convert-instruction-handles-imm16-operand: # expand /imm16 operand into 2 bytes # we don't have one of these at the moment, so this expands to an invalid instruction - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5844,7 +5844,7 @@ test-convert-instruction-handles-imm16-operand: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -5852,7 +5852,7 @@ test-convert-instruction-handles-imm16-operand: test-convert-instruction-handles-imm8-operand: # expand /imm8 operand into 1 byte # we don't have one of these at the moment, so this expands to an invalid instruction - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -5939,14 +5939,14 @@ test-convert-instruction-handles-imm8-operand: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # shortcut for parse-hex-int(next-token-from-slice(word->start, word->end, '/')) parse-datum-of-word: # word : (address slice) -> value/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -5981,7 +5981,7 @@ $parse-datum-of-word:end: # . restore registers 5e/pop-to-esi 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/sigils.subx b/apps/sigils.subx index 6e6e76a5..76a956b7 100644 --- a/apps/sigils.subx +++ b/apps/sigils.subx @@ -52,7 +52,7 @@ # . 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 Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -133,7 +133,7 @@ subx-sigils: # in : (address buffered-file), out : (address buffered-file) -> < # write(out, "\n") # flush(out) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -376,7 +376,7 @@ $subx-sigils:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -437,7 +437,7 @@ $subx-sigils:error1: # never gets here test-subx-sigils-passes-most-words-through: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -533,13 +533,13 @@ test-subx-sigils-passes-most-words-through: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-direct-mode: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -635,13 +635,13 @@ test-subx-sigils-direct-mode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-direct-mode-with-metadata: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -711,13 +711,13 @@ test-subx-sigils-direct-mode-with-metadata: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-register-indirect-mode: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -813,13 +813,13 @@ test-subx-sigils-register-indirect-mode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-register-indirect-mode-with-metadata: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -889,13 +889,13 @@ test-subx-sigils-register-indirect-mode-with-metadata: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-register-indirect-mode-without-displacement: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -991,13 +991,13 @@ test-subx-sigils-register-indirect-mode-without-displacement: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-register-indirect-mode-with-displacement: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1093,14 +1093,14 @@ test-subx-sigils-register-indirect-mode-with-displacement: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return # boss level test-subx-sigils-register-indirect-mode-with-sib-byte: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1196,13 +1196,13 @@ test-subx-sigils-register-indirect-mode-with-sib-byte: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-register-indirect-mode-with-sib-byte-negative-displacement: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1298,13 +1298,13 @@ test-subx-sigils-register-indirect-mode-with-sib-byte-negative-displacement: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-subx-sigils-indirect-mode-without-register: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1400,13 +1400,13 @@ test-subx-sigils-indirect-mode-without-register: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return emit-direct-mode: # out : (address buffered-file), word-slice : (address slice) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1468,13 +1468,13 @@ $emit-direct-mode:end: 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp # . restore registers 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-direct-mode: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1553,13 +1553,13 @@ test-emit-direct-mode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-direct-mode-2: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1638,7 +1638,7 @@ test-emit-direct-mode-2: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1676,7 +1676,7 @@ next-word-or-expression: # line : (address stream byte), out : (address slice) # ecx: often line->read # eax: often line->data[line->read] # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1789,7 +1789,7 @@ $next-word-or-expression:end: 5e/pop-to-esi 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1873,7 +1873,7 @@ $next-word-or-expression:error2: # never gets here test-next-word-or-expression: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1940,13 +1940,13 @@ test-next-word-or-expression: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-or-expression-returns-whole-comment: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -2013,13 +2013,13 @@ test-next-word-or-expression-returns-whole-comment: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-or-expression-returns-empty-slice-on-eof: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -2055,13 +2055,13 @@ test-next-word-or-expression-returns-empty-slice-on-eof: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-or-expression-returns-string-literal: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -2118,13 +2118,13 @@ test-next-word-or-expression-returns-string-literal: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-or-expression-returns-string-with-escapes: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -2181,13 +2181,13 @@ test-next-word-or-expression-returns-string-with-escapes: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-word-or-expression-returns-whole-expression: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -2244,7 +2244,7 @@ test-next-word-or-expression-returns-whole-expression: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2294,7 +2294,7 @@ parse-effective-address: # word-slice : (address slice) -> base/eax, index/ecx, # read integer into disp # skip whitespace # if (*local-slice->start != ')') goto error4 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -2557,7 +2557,7 @@ $parse-effective-address:end: # . restore registers 5f/pop-to-edi 5e/pop-to-esi - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2721,7 +2721,7 @@ $parse-effective-address:error4: # assumes 'in' starts with a register name, and returns pointer to its code # side-effect: modifies 'in' to scan past the initial register name next-register: # in : (address slice) -> reg/eax : int - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -2753,13 +2753,13 @@ $next-register:end: # . restore registers 5e/pop-to-esi 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-effective-address-simple: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = "*esi" @@ -2815,13 +2815,13 @@ test-parse-effective-address-simple: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-effective-address-base: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = "*(esi )" @@ -2877,13 +2877,13 @@ test-parse-effective-address-base: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-effective-address-base-displacement: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = "*(esi+3)" @@ -2939,13 +2939,13 @@ test-parse-effective-address-base-displacement: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-effective-address-base-negative-displacement: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = "*(esi-3)" @@ -3001,13 +3001,13 @@ test-parse-effective-address-base-negative-displacement: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-effective-address-base-index: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = "*(esi+ecx)" @@ -3063,13 +3063,13 @@ test-parse-effective-address-base-index: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-effective-address-base-index-scale: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = "*(esi+ecx<<2)" @@ -3125,13 +3125,13 @@ test-parse-effective-address-base-index-scale: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-parse-effective-address-base-index-scale-displacement: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # var slice/ecx = "*(esi + ecx<<2 - 0x34)" @@ -3187,7 +3187,7 @@ test-parse-effective-address-base-index-scale-displacement: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3200,7 +3200,7 @@ test-parse-effective-address-base-index-scale-displacement: # emit-sib: # if index is not none, then mod = 2 and rm32 = 4 and base = base and index = index and disp32 = disp emit-indirect-mode: # out : (address buffered-file), base : int, index : int, scale : int, disp : int - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp $emit-indirect-mode:check-for-ebp: @@ -3364,13 +3364,13 @@ $emit-indirect-mode:emit-indirect: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp $emit-indirect-mode:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-indirect-mode: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3443,13 +3443,13 @@ test-emit-indirect-mode: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-indirect-mode-2: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3522,13 +3522,13 @@ test-emit-indirect-mode-2: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-indirect-mode-with-disp: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3601,13 +3601,13 @@ test-emit-indirect-mode-with-disp: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-indirect-mode-with-disp-negative: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3680,13 +3680,13 @@ test-emit-indirect-mode-with-disp-negative: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-indirect-mode-with-sib: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3759,13 +3759,13 @@ test-emit-indirect-mode-with-sib: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-indirect-mode-ebp: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3838,13 +3838,13 @@ test-emit-indirect-mode-ebp: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-emit-indirect-mode-esp: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3917,13 +3917,13 @@ test-emit-indirect-mode-esp: e8/call check-stream-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return disp32-mode?: # in : (address slice) -> reg/eax : boolean - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -3976,13 +3976,13 @@ $disp32-mode?:end: # . restore registers 5f/pop-to-edi 5e/pop-to-esi - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return emit-indirect-disp32: # out : (address buffered-file), word-slice : (address slice) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -4023,7 +4023,7 @@ $emit-indirect-disp32:end: 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp # . restore registers 5e/pop-to-esi - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -4032,7 +4032,7 @@ $emit-indirect-disp32:end: # returns the value of the integer # side-effect: modifies 'in' to skip past the integer next-hex-int: # in : (address slice) -> result/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -4150,7 +4150,7 @@ $next-hex-int:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -4207,7 +4207,7 @@ $next-hex-int:abort: # never gets here test-next-hex-int-single-digit: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "+a)" @@ -4235,13 +4235,13 @@ test-next-hex-int-single-digit: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-hex-int-multi-digit: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "+ 34a)" @@ -4269,13 +4269,13 @@ test-next-hex-int-multi-digit: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-hex-int-0x-prefix: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "+0x34)" @@ -4303,13 +4303,13 @@ test-next-hex-int-0x-prefix: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-hex-int-zero: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "+0)" @@ -4337,13 +4337,13 @@ test-next-hex-int-zero: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-hex-int-0-prefix: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "+ 03)" @@ -4371,13 +4371,13 @@ test-next-hex-int-0-prefix: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-hex-int-negative: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "-03)" @@ -4405,13 +4405,13 @@ test-next-hex-int-negative: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-hex-int-negative-with-space: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "- 03)" @@ -4439,7 +4439,7 @@ test-next-hex-int-negative-with-space: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -4448,7 +4448,7 @@ test-next-hex-int-negative-with-space: # returns the value of the integer # side-effect: modifies 'in' to skip past the integer next-positive-hex-int: # in : (address slice) -> result/eax - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -4529,13 +4529,13 @@ $next-positive-hex-int:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-positive-hex-int-single-digit: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "a)" @@ -4563,13 +4563,13 @@ test-next-positive-hex-int-single-digit: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-positive-hex-int-multi-digit: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "34a)" @@ -4597,13 +4597,13 @@ test-next-positive-hex-int-multi-digit: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-positive-hex-int-0x-prefix: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "0x34)" @@ -4631,13 +4631,13 @@ test-next-positive-hex-int-0x-prefix: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-positive-hex-int-zero: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "0" @@ -4665,13 +4665,13 @@ test-next-positive-hex-int-zero: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-next-positive-hex-int-0-prefix: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # (eax..ecx) = "03)" @@ -4699,7 +4699,7 @@ test-next-positive-hex-int-0-prefix: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/survey.subx b/apps/survey.subx index b943fe72..08e7775a 100644 --- a/apps/survey.subx +++ b/apps/survey.subx @@ -42,7 +42,7 @@ # . 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 Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # Heap = new-segment(Heap-size) @@ -124,7 +124,7 @@ subx-survey: # infile : (address buffered-file), out : (address buffered-file) # rewind-stream(in) # emit-output(in, out, segments, labels) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -447,7 +447,7 @@ $subx-survey:end: 5e/pop-to-esi 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -467,7 +467,7 @@ test-subx-survey-computes-addresses: # segment code has size 5 # segment data starts at address 0x1079 # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -619,7 +619,7 @@ test-subx-survey-computes-addresses: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -694,7 +694,7 @@ compute-offsets: # in : (address stream), segments : (address stream {string, s # *segment-offset += width # *file-offset += width # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1212,7 +1212,7 @@ $compute-offsets:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1249,7 +1249,7 @@ test-compute-offsets: # label 'x' is in segment 'data'. # label 'x' is at segment offset 0x1. # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1414,7 +1414,7 @@ test-compute-offsets: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1442,7 +1442,7 @@ compute-addresses: # segments : (address stream {string, segment-info}), labels # trace-sssns("label " lrow->key " is at address " lrow->address) # lrow += 16 # row-size # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -1636,7 +1636,7 @@ $compute-addresses:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1658,7 +1658,7 @@ test-compute-addresses: # label 'l1' is at address 0x00001097. (0x1094 + segment-offset 3) # label 'l2' is at address 0x00002099. (0x2099 + segment-offset 0) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1809,7 +1809,7 @@ test-compute-addresses: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1827,7 +1827,7 @@ test-compute-addresses-large-segments: # segment 'b' starts at address 0x00002678. (0x018 discarded; last 3 nibbles from 0x1074 + 0x5604) # label 'l1' is at address 0x00001077. (0x1074 + segment-offset 3) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -1907,7 +1907,7 @@ test-compute-addresses-large-segments: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -1917,7 +1917,7 @@ emit-output: # in : (address stream), out : (address buffered-file), segments : # emit-headers(out, segments, labels) # emit-segments(in, out, segments, labels) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp #? # write(2/stderr, "emit-headers\n") {{{ @@ -1958,7 +1958,7 @@ emit-output: # in : (address stream), out : (address buffered-file), segments : # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32 # add to esp $emit-output:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2018,7 +2018,7 @@ emit-segments: # in : (address stream), out : (address buffered-file), segments # info: esi (inner loop only) # temporaries: eax, esi (outer loop) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -2503,7 +2503,7 @@ $emit-segments:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2593,7 +2593,7 @@ test-emit-segments-global-variable: # 00 # 34 # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -2807,7 +2807,7 @@ test-emit-segments-global-variable: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -2832,7 +2832,7 @@ test-emit-segments-code-label: # ef gh # ij f9 ff ff ff # -7 # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3011,7 +3011,7 @@ test-emit-segments-code-label: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3036,7 +3036,7 @@ test-emit-segments-code-label-absolute: # ef gh # ij 56 10 00 00 # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3215,7 +3215,7 @@ test-emit-segments-code-label-absolute: e8/call check-next-stream-line-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3230,7 +3230,7 @@ emit-headers: # out : (address buffered-file), segments : (address stream {stri # emit-elf-program-header-entry(out, curr-segment) # curr-segment += 16 # size of a row # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -3359,7 +3359,7 @@ $emit-headers:end: # . restore registers 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3371,7 +3371,7 @@ emit-elf-header: # out : (address buffered-file), segments : (address stream {s # emit-hex-array(out, Elf_header) # write-buffered(out, "\n") # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -3427,7 +3427,7 @@ $emit-elf-header:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3446,7 +3446,7 @@ emit-elf-program-header-entry: # out : (address buffered-file), curr-segment : # emit-hex-array(out, Elf_program_header_entry) # write-buffered(out, "\n") # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -3514,7 +3514,7 @@ $emit-elf-program-header-entry:end: # . restore registers 5e/pop-to-esi 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3522,7 +3522,7 @@ $emit-elf-program-header-entry:end: # - some helpers for tests stream-add4: # in : (address stream byte), key : address, val1 : address, val2 : address, val3 : address - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -3580,7 +3580,7 @@ $stream-add4:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -3608,7 +3608,7 @@ $stream-add4:abort: # one gotcha: 's5' must not be empty trace-sssns: # s1 : (address string), s2 : (address string), s3 : (address string), n4 : int, s5 : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write(*Trace-stream, s1) @@ -3651,13 +3651,13 @@ trace-sssns: # s1 : (address string), s2 : (address string), s3 : (address stri # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp $trace-sssns:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-trace-sssns: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3709,13 +3709,13 @@ test-trace-sssns: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return trace-snsns: # s1 : (address string), n2 : int, s3 : (address string), n4 : int, s5 : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write(*Trace-stream, s1) @@ -3758,13 +3758,13 @@ trace-snsns: # s1 : (address string), n2 : int, s3 : (address string), n4 : int # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp $trace-snsns:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-trace-snsns: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3816,13 +3816,13 @@ test-trace-snsns: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return trace-slsls: # s1 : (address string), l2 : (address slice), s3 : (address string), l4 : (address slice), s5 : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write(*Trace-stream, s1) @@ -3865,13 +3865,13 @@ trace-slsls: # s1 : (address string), l2 : (address slice), s3 : (address strin # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp $trace-slsls:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-trace-slsls: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -3941,13 +3941,13 @@ test-trace-slsls: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return trace-slsns: # s1 : (address string), l2 : (address slice), s3 : (address string), n4 : int, s5 : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write(*Trace-stream, s1) @@ -3990,13 +3990,13 @@ trace-slsns: # s1 : (address string), l2 : (address slice), s3 : (address strin # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp $trace-slsns:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-trace-slsns: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4057,13 +4057,13 @@ test-trace-slsns: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return trace-slsss: # s1 : (address string), l2 : (address slice), s3 : (address string), s4 : (address string), s5 : (address string) - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # write(*Trace-stream, s1) @@ -4106,13 +4106,13 @@ trace-slsss: # s1 : (address string), l2 : (address slice), s3 : (address strin # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp $trace-slsss:end: - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-trace-slsss: - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4173,7 +4173,7 @@ test-trace-slsss: e8/call check-trace-contains/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return @@ -4194,7 +4194,7 @@ num-bytes: # line : (address stream) -> eax : int # result += compute-width(word-slice) # return result # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -4376,14 +4376,14 @@ $num-bytes:end: 5b/pop-to-ebx 5a/pop-to-edx 59/pop-to-ecx - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-num-bytes-handles-empty-string: # if a line starts with '#', return 0 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4418,14 +4418,14 @@ test-num-bytes-handles-empty-string: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-num-bytes-ignores-comments: # if a line starts with '#', return 0 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4468,14 +4468,14 @@ test-num-bytes-ignores-comments: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-num-bytes-ignores-labels: # if the first word ends with ':', return 0 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4518,14 +4518,14 @@ test-num-bytes-ignores-labels: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-num-bytes-ignores-segment-headers: # if the first word is '==', return 0 - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4568,14 +4568,14 @@ test-num-bytes-ignores-segment-headers: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-num-bytes-counts-words-by-default: # without metadata, count words - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4618,14 +4618,14 @@ test-num-bytes-counts-words-by-default: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-num-bytes-ignores-trailing-comment: # trailing comments appropriately ignored - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4668,14 +4668,14 @@ test-num-bytes-ignores-trailing-comment: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return test-num-bytes-handles-imm32: # if a word has the /imm32 metadata, count it as 4 bytes - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # setup @@ -4718,7 +4718,7 @@ test-num-bytes-handles-imm32: e8/call check-ints-equal/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return diff --git a/apps/tests.subx b/apps/tests.subx index 9f204198..cb2b5e2a 100644 --- a/apps/tests.subx +++ b/apps/tests.subx @@ -10,7 +10,7 @@ # . 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 Entry: # run tests if necessary, convert stdin if not - # . prolog + # . prologue 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # initialize heap @@ -92,7 +92,7 @@ subx-gen-run-tests: # in : (address buffered-file), out : (address buffered-fil # write-stream-data(out, new-code-segment) # flush(out) # - # . prolog + # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # . save registers @@ -276,7 +276,7 @@ $subx-gen-run-tests:end: 5a/pop-to-edx 59/pop-to-ecx 58/pop-to-eax - # . epilog + # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp c3/return |