about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-08-23 11:07:26 -0700
committerKartik Agaram <vc@akkartik.com>2019-08-23 11:07:26 -0700
commit4949dda5540b996e86c9efea619e091df9d095dc (patch)
tree56f9cfd3e08abbba7be996062a791f77c08d514e
parentba5a2eff2c2b4ab1fc5104b6d4f617759b019946 (diff)
downloadmu-4949dda5540b996e86c9efea619e091df9d095dc.tar.gz
.
-rw-r--r--apps/desugar.subx6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/desugar.subx b/apps/desugar.subx
index 01b1abcb..dd8737ee 100644
--- a/apps/desugar.subx
+++ b/apps/desugar.subx
@@ -86,7 +86,7 @@ convert:  # in : (address buffered-file), out : (address buffered-file) -> <void
     #         base, index, scale, disp = parse-effective-address(word-slice)
     #         emit-indirect-mode(out, base, index, scale, disp)
     #       else if slice-starts-with?(word-slice, '+')
-    #         abort("base+disp addressing must be within '()'")
+    #         abort("'+' only permitted within '*(...)'")
     #       else
     #         write-slice-buffered(out, word-slice)
     #       write(out, " ")
@@ -960,7 +960,7 @@ test-next-word-or-expression-returns-whole-expression:
 # Grammar:
 #   *reg                    -> 0/mod reg/rm32
 #   *(reg)                  -> 0/mod reg/rm32
-#   *(reg+disp)             -> 2/mod reg/rm32
+#   *(reg+disp)             -> 2/mod reg/rm32 disp/disp32
 #   *(reg1+reg2<<s)         -> 2/mod 4/rm32 reg1/base reg2/index s/scale 0/disp32
 #   *(reg1+reg2<<s+disp)    -> 2/mod 4/rm32 reg1/base reg2/index s/scale disp/disp32
 # Intermediate structure: base, index, scale, disp
@@ -974,7 +974,7 @@ parse-effective-address:  # word : (address slice) -> base/EAX, index/ECX, scale
     56/push-ESI
     # ESI = word
     8b/copy                         1/mod/*+disp8   5/rm32/EBP    .           .             .           0/r32/EAX   8/disp8         .                 # copy *(EBP+8) to ESI
-    # ++word->start
+    # skip '*'
     ff          0/subop/increment   0/mod/indirect  0/rm32/EAX    .           .             .           .           .               .                 # increment *ESI
     # initialize defaults
     b8/copy-to-EAX  0/imm32