Fix starting off with the wrong stack index
authorLuke Lau <luke_lau@icloud.com>
Tue, 30 Jul 2019 22:57:23 +0000 (23:57 +0100)
committerLuke Lau <luke_lau@icloud.com>
Tue, 30 Jul 2019 22:57:23 +0000 (23:57 +0100)
And thus fix botched backtraces

codegen.scm

index 52df26ece76527068fd89a7c397c3ca632aeaef4..7a12fc2228795b588cfbf117d3f1e7712f282be6 100644 (file)
 
     (emit "movq %rsp, %rbp")            ; set up the base pointer
     
-    (codegen-expr xform-prog wordsize '())
+    (codegen-expr xform-prog (- wordsize) '())
 
                                        ; exit syscall
     (emit "mov %rax, %rdi")