mirror of
https://github.com/irmen/prog8.git
synced 2025-02-20 03:29:01 +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()
|
val amount = expr.right.constValue(program)?.number?.toInt()
|
||||||
if(amount!=null) {
|
if(amount!=null) {
|
||||||
|
translateExpression(expr.left)
|
||||||
when (leftDt) {
|
when (leftDt) {
|
||||||
DataType.UBYTE -> {
|
DataType.UBYTE -> {
|
||||||
if (amount <= 2)
|
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()
|
val amount = expr.right.constValue(program)?.number?.toInt()
|
||||||
if(amount!=null) {
|
if(amount!=null) {
|
||||||
|
translateExpression(expr.left)
|
||||||
if (leftDt in ByteDatatypes) {
|
if (leftDt in ByteDatatypes) {
|
||||||
if (amount <= 2)
|
if (amount <= 2)
|
||||||
repeat(amount) { asmgen.out(" asl P8ESTACK_LO+1,x") }
|
repeat(amount) { asmgen.out(" asl P8ESTACK_LO+1,x") }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user