Skip to content

Conversation

ZERICO2005
Copy link
Contributor

Added some CRT routines (along with _fast variants) for 32/24/16bit * 8bit unsigned multiplication.
imulu_b: UHL = UHL * A (same as Zilog's/Ti's imul_b)
smulu_b: HL = HL * A
lmulu_b: EUHL = EUHL * A

lmulu_b copies the calling convention of ladd_b. Not quite sure what calling convention would be used for i48mulu_b.

smulu       : 20*r(PC) +  6*r(SPL) +  3*w(SPL) + 13
smulu_b     : 15*r(PC) +  6*r(SPL) +  3*w(SPL) +  9

imulu       : 49*r(PC) + 15*r(SPL) + 12*w(SPL) + 25
imulu_b     : 32*r(PC) + 12*r(SPL) +  9*w(SPL) + 13

lmulu       : 93*r(PC) + 15*r(SPL) + 15*w(SPL) + 41
lmulu_b     : 43*r(PC) + 12*r(SPL) +  9*w(SPL) + 13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant