commit 11f8a0a7a24c0c72becd7c9cfb469cf665a74e99
parent 94ed657f9091c953eae796d6a13ae7a22a4c0839
Author: Gabriel G. de Brito <me@gboncoffee.dev.br>
Date: Tue, 14 Jul 2026 17:24:18 -0300
Fixed J instructions assembling in PIÁ.
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/main.go b/main.go
@@ -19,7 +19,7 @@ import (
"github.com/gboncoffee/egg/sagui"
)
-const VERSION = "3.5.0"
+const VERSION = "3.5.1"
// Put new architetures here... (main.go:/switch architeture)
func listArchs() {
diff --git a/pia/pia.go b/pia/pia.go
@@ -1005,13 +1005,13 @@ func assembleJ32Instruction(mnemonic string, t assembler.ResolvedToken, addr uin
bit16 = 1
return encodeJ32(imm, bit16, 0xD), nil
case "lrj":
- offset := target - int32(addr) - 4
+ offset := target - int32(addr)
offset = offset >> 1
imm := uint32(offset) & 0xFFFFFFF
bit16 = 0
return encodeJ32(imm, bit16, 0xE), nil
case "lrjl":
- offset := target - int32(addr) - 4
+ offset := target - int32(addr)
offset = offset >> 1
imm := uint32(offset) & 0xFFFFFFF
bit16 = 1