From 6b5211ad12df36e881144771b501db0bbf7e219c Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sun, 6 Dec 2020 08:36:19 +0100 Subject: [PATCH] tweak word shift unroll --- .../codegen/assignment/AugmentableAssignmentAsmGen.kt | 2 +- examples/test.p8 | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/compiler/src/prog8/compiler/target/c64/codegen/assignment/AugmentableAssignmentAsmGen.kt b/compiler/src/prog8/compiler/target/c64/codegen/assignment/AugmentableAssignmentAsmGen.kt index 3a348bcdc..c5d16ccad 100644 --- a/compiler/src/prog8/compiler/target/c64/codegen/assignment/AugmentableAssignmentAsmGen.kt +++ b/compiler/src/prog8/compiler/target/c64/codegen/assignment/AugmentableAssignmentAsmGen.kt @@ -881,7 +881,7 @@ internal class AugmentableAssignmentAsmGen(private val program: Program, else asmgen.out(" lda #0 | sta $name") } - value>2 -> asmgen.out(""" + value>3 -> asmgen.out(""" ldy #$value - asl $name rol $name+1 diff --git a/examples/test.p8 b/examples/test.p8 index ddd2aa14e..feb2dda6a 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -5,16 +5,6 @@ main { sub start() { - uword uw - ubyte ub1 - ubyte ub2 - - uw = ub1 as uword + ub2 ; fairly ok asm.. but the next though...: - ub1++ - uw = ub1 + ub2 ; TODO horrible asm using the eval stack... fix - - uw *= 8 ; TODO is using a loop... unroll somewhat - txt.print("hello\n") } }