This commit is contained in:
Brooke Vibber 2024-12-30 20:38:33 -08:00
parent 0a7293d8bc
commit b56dc1e98b

View file

@ -417,19 +417,20 @@ viewport_oy:
neg 4, arg neg 4, arg
.endmacro .endmacro
; 23 * shift ; 11-27 + 23 * shift cycles
; 103-119 cycles for shift=4
.macro shift_round_16 arg, shift .macro shift_round_16 arg, shift
.repeat shift .repeat shift
shl32 arg ; 23 cycles shl32 arg ; 23 cycles
.endrepeat .endrepeat
round16 arg round16 arg ; 11-27 cycles
.endmacro .endmacro
.macro imul16_round dest, arg1, arg2, shift .macro imul16_round dest, arg1, arg2, shift
copy16 FR0, arg1 ; 12 cyc copy16 FR0, arg1 ; 12 cyc
copy16 FR1, arg2 ; 12 cyc copy16 FR1, arg2 ; 12 cyc
jsr imul16_func ; ? cyc jsr imul16_func ; ? cyc
shift_round_16 FR2, shift shift_round_16 FR2, shift ; 103-119 cycles for shift=4
copy16 dest, FR2 + 2 ; 12 cyc copy16 dest, FR2 + 2 ; 12 cyc
.endmacro .endmacro
@ -437,7 +438,7 @@ viewport_oy:
;imul16_round dest, arg, arg, shift ;imul16_round dest, arg, arg, shift
copy16 FR0, arg ; 12 cyc copy16 FR0, arg ; 12 cyc
jsr sqr16_func ; ? cyc jsr sqr16_func ; ? cyc
shift_round_16 FR2, shift shift_round_16 FR2, shift ; 103-119 cycles for shift=4
copy16 dest, FR2 + 2 ; 12 cyc copy16 dest, FR2 + 2 ; 12 cyc
.endmacro .endmacro