From 6c8c63f7b14e083c753dddb6cd7824772028deaa Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sun, 6 Dec 2020 11:46:31 +0100 Subject: [PATCH] Optimized tests from @IcePic. Closes #514 --- .../mos6502-common/pwuc1_derefidx_vbuxx_neq_0_then_la1.asm | 3 +-- .../mos6502-common/pwuc1_derefidx_vbuyy_eq_0_then_la1.asm | 3 +-- .../mos6502-common/pwuc1_derefidx_vbuyy_neq_0_then_la1.asm | 3 +-- src/main/fragment/mos6502-common/vwsm1_neq_0_then_la1.asm | 3 +-- src/main/fragment/mos6502-common/vwum1_eq_0_then_la1.asm | 6 ++---- src/main/fragment/mos6502-common/vwum1_neq_0_then_la1.asm | 3 +-- 6 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/main/fragment/mos6502-common/pwuc1_derefidx_vbuxx_neq_0_then_la1.asm b/src/main/fragment/mos6502-common/pwuc1_derefidx_vbuxx_neq_0_then_la1.asm index 28b19e48f..2323e5870 100644 --- a/src/main/fragment/mos6502-common/pwuc1_derefidx_vbuxx_neq_0_then_la1.asm +++ b/src/main/fragment/mos6502-common/pwuc1_derefidx_vbuxx_neq_0_then_la1.asm @@ -1,4 +1,3 @@ lda {c1}+1,x -bne {la1} -lda {c1},x +ora {c1},x bne {la1} diff --git a/src/main/fragment/mos6502-common/pwuc1_derefidx_vbuyy_eq_0_then_la1.asm b/src/main/fragment/mos6502-common/pwuc1_derefidx_vbuyy_eq_0_then_la1.asm index b9f37752e..b5b446859 100644 --- a/src/main/fragment/mos6502-common/pwuc1_derefidx_vbuyy_eq_0_then_la1.asm +++ b/src/main/fragment/mos6502-common/pwuc1_derefidx_vbuyy_eq_0_then_la1.asm @@ -1,4 +1,3 @@ lda {c1},y ora {c1}+1,y -cmp #0 -beq {la1} \ No newline at end of file +beq {la1} diff --git a/src/main/fragment/mos6502-common/pwuc1_derefidx_vbuyy_neq_0_then_la1.asm b/src/main/fragment/mos6502-common/pwuc1_derefidx_vbuyy_neq_0_then_la1.asm index 46e1e8901..e5187ecd0 100644 --- a/src/main/fragment/mos6502-common/pwuc1_derefidx_vbuyy_neq_0_then_la1.asm +++ b/src/main/fragment/mos6502-common/pwuc1_derefidx_vbuyy_neq_0_then_la1.asm @@ -1,4 +1,3 @@ lda {c1}+1,y -bne {la1} -lda {c1},y +ora {c1},y bne {la1} diff --git a/src/main/fragment/mos6502-common/vwsm1_neq_0_then_la1.asm b/src/main/fragment/mos6502-common/vwsm1_neq_0_then_la1.asm index 8907bbae7..35e31cbda 100644 --- a/src/main/fragment/mos6502-common/vwsm1_neq_0_then_la1.asm +++ b/src/main/fragment/mos6502-common/vwsm1_neq_0_then_la1.asm @@ -1,4 +1,3 @@ lda {m1}+1 -bne {la1} -lda {m1} +ora {m1} bne {la1} diff --git a/src/main/fragment/mos6502-common/vwum1_eq_0_then_la1.asm b/src/main/fragment/mos6502-common/vwum1_eq_0_then_la1.asm index 510bd0866..9c2f0b382 100644 --- a/src/main/fragment/mos6502-common/vwum1_eq_0_then_la1.asm +++ b/src/main/fragment/mos6502-common/vwum1_eq_0_then_la1.asm @@ -1,5 +1,3 @@ lda {m1} -bne !+ -lda {m1}+1 -beq {la1} -!: +ora {m1}+1 +beq {la1} \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vwum1_neq_0_then_la1.asm b/src/main/fragment/mos6502-common/vwum1_neq_0_then_la1.asm index c29faa16b..085536d3e 100644 --- a/src/main/fragment/mos6502-common/vwum1_neq_0_then_la1.asm +++ b/src/main/fragment/mos6502-common/vwum1_neq_0_then_la1.asm @@ -1,4 +1,3 @@ lda {m1} -bne {la1} -lda {m1}+1 +ora {m1}+1 bne {la1}