mirror of
https://github.com/irmen/prog8.git
synced 2024-11-23 07:32:10 +00:00
fix stack corruption with bitshifts
This commit is contained in:
parent
09f25ffbd9
commit
a88b40d6c1
@ -1619,9 +1619,9 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
||||
}
|
||||
}
|
||||
">>" -> {
|
||||
translateExpression(expr.left)
|
||||
val amount = expr.right.constValue(program)?.number?.toInt()
|
||||
if(amount!=null) {
|
||||
translateExpression(expr.left)
|
||||
when (leftDt) {
|
||||
DataType.UBYTE -> {
|
||||
if (amount <= 2)
|
||||
@ -1669,9 +1669,9 @@ internal class ExpressionsAsmGen(private val program: Program, private val asmge
|
||||
}
|
||||
}
|
||||
"<<" -> {
|
||||
translateExpression(expr.left)
|
||||
val amount = expr.right.constValue(program)?.number?.toInt()
|
||||
if(amount!=null) {
|
||||
translateExpression(expr.left)
|
||||
if (leftDt in ByteDatatypes) {
|
||||
if (amount <= 2)
|
||||
repeat(amount) { asmgen.out(" asl P8ESTACK_LO+1,x") }
|
||||
|
Loading…
Reference in New Issue
Block a user