Fix division and modulo for very large negative numbers (#1790)

This commit is contained in:
Rangi
2025-08-11 20:46:47 -04:00
committed by GitHub
parent 30a8503dcd
commit 7df9c12a6c
5 changed files with 91 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
def fzero equs "startof(\"test\")"
section "test", rom0
ld a, $8000_0000 / (fzero - 1)
ld a, $8000_0000 / (fzero - 2)
ld a, 1 << (fzero - 1)
ld a, 1 << (fzero + 32)
ld a, (fzero - 1) >> 1