fix compiler crash on certain pointer type struct fields

added new compiler options for debugging purposes
This commit is contained in:
Irmen de Jong committed 2026-03-29 08:25:53 +02:00
1 parent cecf49b8e3
commit 5408a3ca68
13 files changed
+623 -24

No files matched your search

@@ -1555,7 +1555,7 @@ class IRCodeGen(
addToResult(result, leftTr, leftTr.resultReg, -1)
if (number!=null) {
val elseBranch: Opcode
var useCmpi = false // for the branch opcodes that have been converted to CMPI + BSTxx form already
var useCmpi: Boolean // for the branch opcodes that have been converted to CMPI + BSTxx form already
// Optimization: when comparing signed integer with 0, we can use direct status flag branches
// instead of CMPI #0 + branch, because the previous LOAD instruction already sets the N and Z flags.
@@ -2186,7 +2186,7 @@ class IRCodeGen(
}
// store with field offset
var valueRegister = existingValueRegister
val valueRegister = existingValueRegister
val irdt = irType(type)
if(valueIsZero && valueRegister<0) {
addInstr(result, IRInstruction(Opcode.STOREZI, irdt, reg1 = addressReg, immediate = offset.toInt()), null)