about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xapps/mubin254249 -> 254249 bytes
-rw-r--r--apps/mu.subx2
-rwxr-xr-xtest_apps13
3 files changed, 14 insertions, 1 deletions
diff --git a/apps/mu b/apps/mu
index 9cb68c00..8db63c71 100755
--- a/apps/mu
+++ b/apps/mu
Binary files differdiff --git a/apps/mu.subx b/apps/mu.subx
index 4127b572..2e657c89 100644
--- a/apps/mu.subx
+++ b/apps/mu.subx
@@ -6532,7 +6532,7 @@ new-literal:  # ad: (addr allocation-descriptor), name: (addr slice), out: (addr
     # var s/ecx: (handle array byte)
     68/push 0/imm32
     68/push 0/imm32
-    89/<- %ecx 0/r32/eax
+    89/<- %ecx 4/r32/esp
     # s = slice-to-string(name)
     (slice-to-string Heap *(ebp+0xc) %ecx)
     # allocate to out
diff --git a/test_apps b/test_apps
index b2d10472..c6b1f3f2 100755
--- a/test_apps
+++ b/test_apps
@@ -395,4 +395,17 @@ test $NATIVE  &&  {
   test $ret -eq 55
 }
 
+echo factorial.mu
+./translate_mu apps/factorial.mu
+test $EMULATED  &&  {
+  ./bootstrap run a.elf  ||  ret=$?
+  test $ret -eq 120
+  ./bootstrap run a.elf test
+}
+test $NATIVE  &&  {
+  ./a.elf  ||  ret=$?
+  test $ret -eq 120
+  ./a.elf test
+}
+
 exit 0