diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-07 20:10:31 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-07 20:10:31 +0100 |
| commit | fc00c656c96528112d05cf0edf8631bd5eaea446 (patch) | |
| tree | a6e0e6c588191a8bd1c64afc3b7a258e3e66c236 /include/arch/x86_64/bits | |
Add build system scaffolding and libc headers
Diffstat (limited to 'include/arch/x86_64/bits')
| -rw-r--r-- | include/arch/x86_64/bits/fenv.h | 34 | ||||
| -rw-r--r-- | include/arch/x86_64/bits/setjmp.h | 6 | ||||
| -rw-r--r-- | include/arch/x86_64/bits/signal.h | 11 |
3 files changed, 51 insertions, 0 deletions
diff --git a/include/arch/x86_64/bits/fenv.h b/include/arch/x86_64/bits/fenv.h new file mode 100644 index 00000000..40bc9e25 --- /dev/null +++ b/include/arch/x86_64/bits/fenv.h @@ -0,0 +1,34 @@ +#define FE_INVALID 1 +#define __FE_DENORM 2 +#define FE_DIVBYZERO 4 +#define FE_OVERFLOW 8 +#define FE_UNDERFLOW 16 +#define FE_INEXACT 32 + +#define FE_ALL_EXCEPT 63 + +#define FE_TONEAREST 0 +#define FE_DOWNWARD 0x400 +#define FE_UPWARD 0x800 +#define FE_TOWARDZERO 0xc00 + +typedef unsigned short fexcept_t; + +typedef struct { + unsigned short __control_word; + unsigned short __unused1; + unsigned short __status_word; + unsigned short __unused2; + unsigned short __tags; + unsigned short __unused3; + unsigned int __eip; + unsigned short __cs_selector; + unsigned int __opcode : 11; + unsigned int __unused4 : 5; + unsigned int __data_offset; + unsigned short __data_selector; + unsigned short __unused5; + unsigned int __mxcsr; +} fenv_t; + +#define FE_DFL_ENV ((const fenv_t *)-1) diff --git a/include/arch/x86_64/bits/setjmp.h b/include/arch/x86_64/bits/setjmp.h new file mode 100644 index 00000000..4d118c40 --- /dev/null +++ b/include/arch/x86_64/bits/setjmp.h @@ -0,0 +1,6 @@ +#ifndef __BITS_SETJMP_H +#define __BITS_SETJMP_H + +typedef unsigned long jmp_buf[8]; + +#endif diff --git a/include/arch/x86_64/bits/signal.h b/include/arch/x86_64/bits/signal.h new file mode 100644 index 00000000..b71c9fc0 --- /dev/null +++ b/include/arch/x86_64/bits/signal.h @@ -0,0 +1,11 @@ +#ifndef __BITS_SIGNAL_H +#define __BITS_SIGNAL_H + +#ifndef __SIGNAL_H +#error "Never include <bits/signal.h> directly; use <signal.h> instead." +#endif + +#define SIGSTKSZ 8192 +#define MINSIGSTKSZ 2048 + +#endif |
