optimize simple word and byte addition/subtraction better

This commit is contained in:
Irmen de Jong
2024-06-29 14:23:17 +02:00
parent bbf621a8c4
commit 1c97c22eff
4 changed files with 172 additions and 54 deletions

View File

@@ -6,8 +6,6 @@ causes compiler error for virtual: just calling txt.cls() gives compile error un
https://github.com/irmen/prog8/issues/136 (string.find register order issue)
optimization: for 65c02 sometimes clc adc #1 is generated (for instance for: cx16.r0L = math.sin8u(cx16.r0L+1)), this can be optimized into inc a (always? or not? mind the carry flag!)
optimization: for 65c02 sometimes tya pha is generated, could be just phy (mind if A gets used afterwards though!) (same for pla tay etcetera?)
if-optimization: