about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-02-01 23:52:36 -0800
committerKartik Agaram <vc@akkartik.com>2019-02-01 23:52:36 -0800
commit4cb7d1fb7724c27ba434a2ab29548452c09ebca2 (patch)
tree1eb7c99b115b8f4d1aeeccfeb5c30c237c890c7e
parent77aa333c3c89eaa5a1a8d695e03d3e553207587a (diff)
downloadmu-4cb7d1fb7724c27ba434a2ab29548452c09ebca2.tar.gz
4947
Bugfix: has-metadata? was corrupting registers

Seems uneconomic to write tests for stuff like this. Assembly is just not
the right layer to try to come up with a general solution or process. Keep
running your code and wait to find signs of breakage.
-rwxr-xr-xsubx/apps/packbin16512 -> 16518 bytes
-rw-r--r--subx/apps/pack.subx2
2 files changed, 2 insertions, 0 deletions
diff --git a/subx/apps/pack b/subx/apps/pack
index b48c40b2..54c40efc 100755
--- a/subx/apps/pack
+++ b/subx/apps/pack
Binary files differdiff --git a/subx/apps/pack.subx b/subx/apps/pack.subx
index 20116c2d..9ad17b7d 100644
--- a/subx/apps/pack.subx
+++ b/subx/apps/pack.subx
@@ -431,6 +431,8 @@ $has-metadata?:true:
 $has-metadata?:false:
     b8/copy-to-EAX  0/imm32/false
 $has-metadata?:end:
+    # . reclaim locals
+    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # . restore registers
     5f/pop-to-EDI
     5e/pop-to-ESI