1
0
mirror of https://github.com/KarolS/millfork.git synced 2025-08-15 19:27:22 +00:00

Let the optimizer optimize the multiplication routine

This commit is contained in:
Karol Stasiak
2018-07-01 19:07:47 +02:00
parent 86b12bd5f9
commit 2b6315f15b

View File

@@ -3,13 +3,13 @@ inline asm byte __mul_u8u8u8() {
? LDA #0 ? LDA #0
? JMP __mul_u8u8u8_start ? JMP __mul_u8u8u8_start
__mul_u8u8u8_add: __mul_u8u8u8_add:
CLC ? CLC
ADC __reg.lo ? ADC __reg.lo
__mul_u8u8u8_loop: __mul_u8u8u8_loop:
ASL __reg.lo ? ASL __reg.lo
__mul_u8u8u8_start: __mul_u8u8u8_start:
LSR __reg.hi ? LSR __reg.hi
BCS __mul_u8u8u8_add ? BCS __mul_u8u8u8_add
BNE __mul_u8u8u8_loop ? BNE __mul_u8u8u8_loop
? RTS ? RTS
} }