mirror of
https://github.com/irmen/prog8.git
synced 2025-05-12 19:47:48 +00:00
fix regression for goto array[idx] on 6502 cpu which doesn't have jmp (ptr,x)
This commit is contained in:
parent
84026b105f
commit
2cb183c6d8
@ -1084,9 +1084,9 @@ $repeatLabel""")
|
||||
else {
|
||||
if(evaluateAddressExpression) {
|
||||
val arrayIdx = jump.target as? PtArrayIndexer
|
||||
if(arrayIdx!=null && !arrayIdx.splitWords) {
|
||||
if(isTargetCpu(CpuType.CPU65C02) && arrayIdx!=null && !arrayIdx.splitWords) {
|
||||
// if the jump target is an address in a non-split array (like a jump table of only pointers),
|
||||
// more optimal assembly can be generated using JMP address,X
|
||||
// on the 65c02, more optimal assembly can be generated using JMP address,X
|
||||
assignExpressionToRegister(arrayIdx.index, RegisterOrPair.A)
|
||||
out(" asl a | tax")
|
||||
return JumpTarget(asmSymbolName(arrayIdx.variable), true, true, false)
|
||||
|
@ -1,5 +1,4 @@
|
||||
%import textio
|
||||
%import diskio
|
||||
%zeropage basicsafe
|
||||
%option no_sysinit
|
||||
|
||||
|
@ -3,4 +3,4 @@ org.gradle.console=rich
|
||||
org.gradle.parallel=true
|
||||
org.gradle.daemon=true
|
||||
kotlin.code.style=official
|
||||
version=11.3
|
||||
version=11.3.1-SNAPSHOT
|
||||
|
Loading…
x
Reference in New Issue
Block a user