about summary refs log tree commit diff stats
path: root/subx/072slice.subx
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 /subx/072slice.subx
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.
Diffstat (limited to 'subx/072slice.subx')
-rw-r--r--subx/072slice.subx4
1 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