about summary refs log tree commit diff stats
path: root/subx/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-12-04 00:29:06 -0800
committerKartik Agaram <vc@akkartik.com>2018-12-04 00:29:06 -0800
commitcf02c20bb02f5d2fbfee5557baf68c0e2ca5a042 (patch)
tree8f1d896a0134e8353ccf01add61fb6c732103861 /subx/apps
parent7cb326df5bb9739d948dd4f8b32019f1bf6e4ef3 (diff)
downloadmu-cf02c20bb02f5d2fbfee5557baf68c0e2ca5a042.tar.gz
4832
Let's start adding ':end' labels in all functions, just because it helps
us visualize where function calls end in traces, thanks to the '--map'
commandline argument.
Diffstat (limited to 'subx/apps')
-rw-r--r--subx/apps/crenshaw2-1.subx4
-rw-r--r--subx/apps/crenshaw2-1b.subx2
2 files changed, 6 insertions, 0 deletions
diff --git a/subx/apps/crenshaw2-1.subx b/subx/apps/crenshaw2-1.subx
index 73e08d50..a9838b65 100644
--- a/subx/apps/crenshaw2-1.subx
+++ b/subx/apps/crenshaw2-1.subx
@@ -185,6 +185,7 @@ compile:  # in : (address buffered-file), out : fd or (address stream), err : fd
     e8/call  write/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+$compile:end:
     # . restore registers
     59/pop-to-ECX
     58/pop-to-EAX
@@ -287,6 +288,7 @@ $get-num:stage2:
 $get-num:loop-end:
     # persist necessary variables from registers
     89/copy                         0/mod/indirect  7/rm32/EDI    .           .             .           1/r32/ECX   .               .                 # copy ECX to *EDI
+$get-num:end:
     # . restore registers
     5f/pop-to-EDI
     5e/pop-to-ESI
@@ -521,6 +523,7 @@ expected:  # ed : (address exit-descriptor), f : fd or (address stream), s : (ad
     # . . call
     e8/call  stop/disp32
     # should never get past this point
+$expected:dead-end:
     # . epilog
     89/copy                         3/mod/direct    4/rm32/ESP    .           .             .           5/r32/EBP   .               .                 # copy EBP to ESP
     5d/pop-to-EBP
@@ -542,6 +545,7 @@ get-char:  # f : (address buffered-file) -> <void>
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # save EAX to Look
     89/copy                         0/mod/indirect  5/rm32/.disp32            .             .           0/r32/EAX   Look/disp32     .                 # copy EAX to *Look
+$get-char:end:
     # . restore registers
     58/pop-to-EAX
     # . epilog
diff --git a/subx/apps/crenshaw2-1b.subx b/subx/apps/crenshaw2-1b.subx
index 77b262a7..14f93c5f 100644
--- a/subx/apps/crenshaw2-1b.subx
+++ b/subx/apps/crenshaw2-1b.subx
@@ -185,6 +185,7 @@ compile:  # in : (address buffered-file), out : fd or (address stream), err : fd
     e8/call  write/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+$compile:end:
     # . restore registers
     59/pop-to-ECX
     58/pop-to-EAX
@@ -304,6 +305,7 @@ $get-num:loop-stage2:
 $get-num:loop-end:
     # persist necessary variables from registers
     89/copy                         0/mod/indirect  7/rm32/EDI    .           .             .           1/r32/ECX   .               .                 # copy ECX to *EDI
+$get-num:end:
     # . restore registers
     5f/pop-to-EDI
     5e/pop-to-ESI