Skip to content

Fixed __ldvrmu calling convention and __ldiv (#793)#794

Open
ZERICO2005 wants to merge 1 commit intomasterfrom
fix_ldiv
Open

Fixed __ldvrmu calling convention and __ldiv (#793)#794
ZERICO2005 wants to merge 1 commit intomasterfrom
fix_ldiv

Conversation

@ZERICO2005
Copy link
Copy Markdown
Contributor

@ZERICO2005 ZERICO2005 commented Apr 21, 2026

Fixes #793

I also made it so __ldvrmu follows Zilog's calling conventions, with the exx __ldvrmu routine being renamed to __ldivu_lremu_common since it uses a completely different calling convention.

I also made it so __ldvrmu follows Zilog's calling conventions, with the exx __ldvrmu routine being renamed to __ldivu_lremu_common since it uses a completely different calling convention.

Zilog __ldvrmu:
; I: EUHL=dividend, AUBC=divisor
; O: a[uhl']=EUHL%AUBC, bcu=0, b=A, c=?, euhl=EUHL/AUBC, eubc'=AUBC, zf=!IEF2

exx __ldvrmu:
; I: EUHL=dividend, AUBC=divisor
; O: auhl=EUHL%AUBC, euix=EUHL/AUBC, iyh=A, iyl=0

…EFER_OS_CRT. Created __ldivu_lremu_common to allow for custom calling conventions to be used for implementing 32-bit division/remainder.
@ZERICO2005 ZERICO2005 changed the title Fixed __ldvrmu calling convention stability and fixed C ldiv under PR… Fixed __ldvrmu calling convention and __ldiv (#793) Apr 21, 2026
@ZERICO2005 ZERICO2005 marked this pull request as ready for review April 21, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

C ldiv_t ldiv(long, long) won't work with PREFER_OS_CRT

1 participant