Skip to content

added assembly include files for <errno.h> <fenv.h> and <math.h>#775

Merged
mateoconlechuga merged 1 commit intomasterfrom
errno_fenv_inc
May 1, 2026
Merged

added assembly include files for <errno.h> <fenv.h> and <math.h>#775
mateoconlechuga merged 1 commit intomasterfrom
errno_fenv_inc

Conversation

@ZERICO2005
Copy link
Copy Markdown
Contributor

@ZERICO2005 ZERICO2005 commented Apr 8, 2026

I need to fix some things after reading Mateos comment
#672

This should allow better portability in case some <errno.h> or <fenv.h> values differ on other platforms/toolchains.

One issue I did encounter is that a lot of assembly routines assume that EDOM and ERANGE are between 1 and 255 (meaning bits 8-23 are zero). The C standard only states that EDOM and ERANGE must be unique and positive, so some assembly routines will need to be modified if a platform defines EDOM or ERANGE to be greater than 255. For now I have just placed an assert which will error if EDOM/ERANGE is greater than 255.

@ZERICO2005 ZERICO2005 marked this pull request as ready for review April 29, 2026 23:52
@mateoconlechuga mateoconlechuga merged commit 5d77f06 into master May 1, 2026
9 checks passed
@mateoconlechuga mateoconlechuga deleted the errno_fenv_inc branch May 1, 2026 14:52
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.

2 participants