about summary refs log tree commit diff stats
path: root/subx/apps/dquotes.subx
diff options
context:
space:
mode:
Diffstat (limited to 'subx/apps/dquotes.subx')
-rw-r--r--subx/apps/dquotes.subx60
1 files changed, 30 insertions, 30 deletions
diff --git a/subx/apps/dquotes.subx b/subx/apps/dquotes.subx
index 64742599..d4a1ae86 100644
--- a/subx/apps/dquotes.subx
+++ b/subx/apps/dquotes.subx
@@ -1032,7 +1032,7 @@ test-emit-string-literal-data:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # var slice/ECX = '"abc"/d'
-    68/push  _test-slice-abc-metadata-end/imm32
+    68/push  _test-slice-abc-end/imm32
     68/push  _test-slice-abc/imm32
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # emit-string-literal-data(_test-output-stream, slice)
@@ -1096,8 +1096,8 @@ test-emit-string-literal-data-empty:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # var slice/ECX = '""'
-    68/push  _test-slice-empty-string-literal-end/imm32
-    68/push  _test-slice-empty-string-literal/imm32
+    68/push  0/imm32/end
+    68/push  0/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # emit-string-literal-data(_test-output-stream, slice)
     # . . push args
@@ -1389,9 +1389,14 @@ test-emit-metadata:
     e8/call  clear-stream/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
-    # var slice/ECX = "abc/def"
-    68/push  _test-slice-word-end/imm32
-    68/push  _test-slice-word/imm32/start
+    # (EAX..ECX) = "abc/def"
+    b8/copy-to-EAX  "abc/def"/imm32
+    8b/copy                         0/mod/indirect  0/rm32/EAX    .           .             .           1/r32/ECX   .               .                 # copy *EAX to ECX
+    8d/copy-address                 1/mod/*+disp8   4/rm32/sib    0/base/EAX  1/index/ECX   .           1/r32/ECX   4/disp8         .                 # copy EAX+ECX+4 to ECX
+    05/add-to-EAX  4/imm32
+    # var slice/ECX = {EAX, ECX}
+    51/push-ECX
+    50/push-EAX
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # emit-metadata(_test-output-buffered-file, slice)
     # . . push args
@@ -1443,9 +1448,14 @@ test-emit-metadata-none:
     e8/call  clear-stream/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
-    # var slice/ECX = "abc"
-    68/push  _test-slice-word-datum-end/imm32
-    68/push  _test-slice-word/imm32/start
+    # (EAX..ECX) = "abc"
+    b8/copy-to-EAX  "abc"/imm32
+    8b/copy                         0/mod/indirect  0/rm32/EAX    .           .             .           1/r32/ECX   .               .                 # copy *EAX to ECX
+    8d/copy-address                 1/mod/*+disp8   4/rm32/sib    0/base/EAX  1/index/ECX   .           1/r32/ECX   4/disp8         .                 # copy EAX+ECX+4 to ECX
+    05/add-to-EAX  4/imm32
+    # var slice/ECX = {EAX, ECX}
+    51/push-ECX
+    50/push-EAX
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # emit-metadata(_test-output-buffered-file, slice)
     # . . push args
@@ -1497,9 +1507,14 @@ test-emit-metadata-multiple:
     e8/call  clear-stream/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
-    # var slice/ECX = "abc/def/ghi"
-    68/push  _test-slice-word-end2/imm32
-    68/push  _test-slice-word/imm32/start
+    # (EAX..ECX) = "abc/def/ghi"
+    b8/copy-to-EAX  "abc/def/ghi"/imm32
+    8b/copy                         0/mod/indirect  0/rm32/EAX    .           .             .           1/r32/ECX   .               .                 # copy *EAX to ECX
+    8d/copy-address                 1/mod/*+disp8   4/rm32/sib    0/base/EAX  1/index/ECX   .           1/r32/ECX   4/disp8         .                 # copy EAX+ECX+4 to ECX
+    05/add-to-EAX  4/imm32
+    # var slice/ECX = {EAX, ECX}
+    51/push-ECX
+    50/push-EAX
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # emit-metadata(_test-output-buffered-file, slice)
     # . . push args
@@ -1613,7 +1628,7 @@ test-emit-metadata-in-string-literal:
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # var slice/ECX = "\"abc/def\"/ghi"
-    68/push  _test-slice-literal-string-with-metadata-end/imm32
+    68/push  _test-slice-literal-string-with-end/imm32
     68/push  _test-slice-literal-string/imm32/start
     89/copy                         3/mod/direct    1/rm32/ECX    .           .             .           4/r32/ESP   .               .                 # copy ESP to ECX
     # emit-metadata(_test-output-buffered-file, slice)
@@ -2645,13 +2660,8 @@ Slash:
 
 _test-slice-abc:
   22/dquote 61/a 62/b 63/c 22/dquote  # "abc"
-_test-slice-abc-end:
   2f/slash 64/d
-_test-slice-abc-metadata-end:
-
-_test-slice-empty-string-literal:
-  22/dquote 22/dquote  # ""
-_test-slice-empty-string-literal-end:
+_test-slice-abc-end:
 
 _test-slice-a-space-b:
   22/dquote 61/a 20/space 62/b 22/dquote  # "a b"
@@ -2661,23 +2671,13 @@ _test-slice-a-dquote-b:
   22/dquote 61/a 5c/backslash 22/dquote 62/b 22/dquote  # "a\"b"
 _test-slice-a-dquote-b-end:
 
-# abc/def/ghi
-_test-slice-word:
-  61/a 62/b 63/c  # abc
-_test-slice-word-datum-end:
-  2f/slash 64/d 65/e 66/f  # /def
-_test-slice-word-end:
-  2f/slash 67/g 68/h 69/i  # /ghi
-_test-slice-word-end2:
-
 # "abc/def"/ghi
 _test-slice-literal-string:
   22/dquote
   61/a 62/b 63/c  # abc
   2f/slash 64/d 65/e 66/f  # /def
   22/dquote
-_test-slice-literal-string-end:
   2f/slash 67/g 68/h 69/i  # /ghi
-_test-slice-literal-string-with-metadata-end:
+_test-slice-literal-string-with-end:
 
 # . . vim:nowrap:textwidth=0