mirror of
https://github.com/irmen/prog8.git
synced 2025-11-03 04:17:16 +00:00
fix the missing cases in certain expressions that need the address of a split word array
This commit is contained in:
@@ -904,10 +904,10 @@ internal class AssignmentGen(private val codeGen: IRCodeGen, private val express
|
||||
}
|
||||
return result
|
||||
} else {
|
||||
return null // TODO("inplace split word array +")
|
||||
return null // TODO("inplace split word array -")
|
||||
}
|
||||
}
|
||||
return null // TODO("inplace split word array +")
|
||||
return null // TODO("inplace split word array -")
|
||||
}
|
||||
|
||||
private fun operatorPlusInplace(symbol: String?, array: PtArrayIndexer?, constAddress: Int?, memory: PtMemoryByte?, vmDt: IRDataType, operand: PtExpression): IRCodeChunks? {
|
||||
|
||||
@@ -133,7 +133,8 @@ internal class ExpressionGen(private val codeGen: IRCodeGen) {
|
||||
val result = mutableListOf<IRCodeChunkBase>()
|
||||
val resultRegister = codeGen.registers.nextFree()
|
||||
if(expr.isFromArrayElement) {
|
||||
require(!expr.identifier.type.isSplitWordArray)
|
||||
if(expr.identifier.type.isSplitWordArray)
|
||||
TODO("address of element of a split word array")
|
||||
addInstr(result, IRInstruction(Opcode.LOAD, vmDt, reg1 = resultRegister, labelSymbol = symbol), null)
|
||||
val indexTr2 = translateExpression(expr.arrayIndexExpr!!)
|
||||
addToResult(result, indexTr2, indexTr2.resultReg, -1)
|
||||
|
||||
Reference in New Issue
Block a user