about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-03-09 21:31:32 -0800
committerKartik Agaram <vc@akkartik.com>2019-03-10 13:30:53 -0700
commit24c0e27b1bb9d46aa6e4c9fbe8a414fe90c48f8c (patch)
treee1ed55de0be352e30f4cd522b2f0377f549c2c8f
parentc0d37cee02ad48160d1a5a9e187bc4721c3684be (diff)
downloadmu-24c0e27b1bb9d46aa6e4c9fbe8a414fe90c48f8c.tar.gz
4999
Fix CI. pack.subx was passing in emulation but not natively.

Commit 4954 on Feb 10 was a real dud. First I find I forgot to reclaim
space for locals (commit 4996). Now I find I haven't been tracking registers
properly either.
-rw-r--r--subx/072slice.subx4
-rwxr-xr-xsubx/apps/crenshaw2-1bin17760 -> 17762 bytes
-rwxr-xr-xsubx/apps/crenshaw2-1bbin18319 -> 18321 bytes
-rwxr-xr-xsubx/apps/factorialbin16678 -> 16680 bytes
-rwxr-xr-xsubx/apps/handlebin17453 -> 17455 bytes
-rwxr-xr-xsubx/apps/hexbin20739 -> 20741 bytes
-rwxr-xr-xsubx/apps/packbin21169 -> 21171 bytes
7 files changed, 3 insertions, 1 deletions
diff --git a/subx/072slice.subx b/subx/072slice.subx
index a47ef493..d9576d89 100644
--- a/subx/072slice.subx
+++ b/subx/072slice.subx
@@ -800,12 +800,13 @@ test-write-slice:
 #   - construct a 'maximal slice' and pass it to write-slice
 #   - flush the buffered-file and pass the stream directly to its fd (disabling buffering)
 # we'll go with the first way for now
-write-stream-buffered:  # f : (address buffered-file), s : (address stream)
+write-stream-buffered:  # f : (address buffered-file), s : (address stream) -> <void>
     # . prolog
     55/push-EBP
     89/copy                         3/mod/direct    5/rm32/EBP    .           .             .           4/r32/ESP   .               .                 # copy ESP to EBP
     # . save registers
     50/push-EAX
+    51/push-ECX
     56/push-ESI
     # ESI = s
     8b/copy                         1/mod/*+disp8   5/rm32/EBP    .           .             .           6/r32/ESI   0xc/disp8       .                 # copy *(EBP+12) to ESI
@@ -832,6 +833,7 @@ $write-stream-buffered:end:
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . restore registers
     5e/pop-to-ESI
+    59/pop-to-ECX
     58/pop-to-EAX
     # . epilog
     89/copy                         3/mod/direct    4/rm32/ESP    .           .             .           5/r32/EBP   .               .                 # copy EBP to ESP
diff --git a/subx/apps/crenshaw2-1 b/subx/apps/crenshaw2-1
index 0a3d59ee..919ebb8a 100755
--- a/subx/apps/crenshaw2-1
+++ b/subx/apps/crenshaw2-1
Binary files differdiff --git a/subx/apps/crenshaw2-1b b/subx/apps/crenshaw2-1b
index 931bff4c..b9867201 100755
--- a/subx/apps/crenshaw2-1b
+++ b/subx/apps/crenshaw2-1b
Binary files differdiff --git a/subx/apps/factorial b/subx/apps/factorial
index 9bef95a7..39ce244a 100755
--- a/subx/apps/factorial
+++ b/subx/apps/factorial
Binary files differdiff --git a/subx/apps/handle b/subx/apps/handle
index 84b1bcf1..724d1f02 100755
--- a/subx/apps/handle
+++ b/subx/apps/handle
Binary files differdiff --git a/subx/apps/hex b/subx/apps/hex
index 3b183506..abbdfb23 100755
--- a/subx/apps/hex
+++ b/subx/apps/hex
Binary files differdiff --git a/subx/apps/pack b/subx/apps/pack
index 69af4226..e3e7ea66 100755
--- a/subx/apps/pack
+++ b/subx/apps/pack
Binary files differ