shithub: sl

Download patch

ref: 5765093ba41599b90e9b4b32ac885cff9e9f8262
parent: c2b864c7185a983b3ec16f7e38332a6518521e30
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Feb 25 23:19:09 EST 2025

disassemble: fix branch destination addresses

binary files a/boot/flisp.boot.builtin b/boot/flisp.boot.builtin differ
--- a/src/compiler.lsp
+++ b/src/compiler.lsp
@@ -826,12 +826,12 @@
 
                  ((jmp brne brnn brn)
                   (print-inst inst i 2)
-                  (princ "@" (hex5 (+ i -4 (ref-int16-LE code i))))
+                  (princ "@" (hex5 (+ i (ref-int16-LE code i))))
                   (set! i (+ i 2)))
 
                  ((jmp.l brne.l brnn.l brn.l)
                   (print-inst inst i 4)
-                  (princ "@" (hex5 (+ i -4 (ref-int32-LE code i))))
+                  (princ "@" (hex5 (+ i (ref-int32-LE code i))))
                   (set! i (+ i 4)))
 
                  (else (print-inst inst i 0))))))))