Ariadne Conill
fb1d203677
everywhere: drop _GNU_SOURCE requirement
2021-03-09 00:25:13 -07:00
osy
5d66c194a7
x86_64: define reg names if not defined
...
_GNU_SOURCE can be defined without defining REG_X macros so it is not a
good indicator. (QEMU for example defines it in the build system.) x86
and x86_64 should have consistant looking defs.h so ifndef guards are
added to each REG_X definition.
2021-03-08 14:02:58 -08:00
osy
f3e1b876c7
project: move freestanding include headers
...
This is needed because in libucontext.h we include "libucontext/bits.h".
We therefore need to have bits.h in somepath/libucontext/bits.h. In the
Makefile, somepath/freestanding/bits.h was copied to the right path but
in the meson build system, the include copy happens at the end.
2021-03-08 13:02:27 -08:00
Ariadne Conill
09f78ddc28
alias __makecontext too
2021-01-08 10:37:27 +00:00
osy
f7eed30132
build: guard _GNU_SOURCE define if build system defines it
2021-01-08 03:16:05 -07:00
osy
d31c95a11a
build: remove -DLIBUCONTEXT_ASSEMBLY
...
Meson does not support separate defines for .S compile.
2021-01-08 03:11:25 -07:00
osy
73d5e101ad
build: respect EXPORT_UNPREFIXED for libucontext_makecontext
2021-01-08 03:02:43 -07:00
osy
e1e6508af2
defs: use register output only for FETCH_LINKPTR
2021-01-08 02:59:43 -07:00
Ariadne Conill
638770cfd0
x86_64: add static assert verifying memory layout
2021-01-08 02:56:45 -07:00
Ariadne Conill
39a2958561
add previous ABI symbols
2021-01-08 02:30:50 -07:00
Ariadne Conill
2d51d7bfa4
x86_64: add common trampoline code written in C, port to it
2020-12-11 23:04:47 -07:00
Ariadne Conill
9aef11752f
x86_64: add freestanding port
2020-12-06 03:22:27 -07:00
Ariadne Conill
c31decc3d4
build: use internal definitions to replace things pulled in from ucontext.h
2020-12-06 03:44:45 -06:00
Ariadne Conill
e65e485630
everywhere: rename __swapcontext to libucontext_swapcontext
2020-12-06 03:04:22 -06:00
Ariadne Conill
37fe7afd5f
everywhere: rename __setcontext to libucontext_setcontext
2020-12-06 03:03:07 -06:00
Ariadne Conill
99ed5bbe12
everywhere: rename __getcontext to libucontext_getcontext
2020-12-06 03:02:25 -06:00
Ariadne Conill
2f31efaa95
everywhere: rename __start_context to better descriptive libucontext_trampoline
2020-12-06 02:59:59 -06:00
Ariadne Conill
c693dc663c
rename __makecontext to libucontext_makecontext
2020-12-06 02:56:59 -06:00
Ariadne Conill
b1ea2ae83b
everywhere: use ucontext.h instead of signal.h for pulling in ucontext definitions
...
This allows building libucontext against newlib.
2020-12-04 11:19:02 -07:00
Ariadne Conill
d8cfe83e34
common: use REG_SZ, not SZ_REG in line with mips64 port for REG_OFFSET macro
2020-03-29 14:50:38 +00:00
Ariadne Conill
e00902b5b1
x86_64: modernize implementation
2020-03-29 14:27:40 +00:00
Ariadne Conill
d31eaabbaf
update copyright statements, add mailmap
2020-03-27 09:23:49 +00:00
A. Wilcox
6046eb47e4
Reorder registers in other x86_64 assembler files
...
This fixes the previous commit which changed the register order in
swapcontext only, which caused setcontext to subtly corrupt the stack.
2018-07-19 17:18:19 -05:00
Timo Teräs
790ed28aff
fix x86_64 register order for swapcontext
...
rbp and rsi were reversed causing argument passing to fail since
rsi is used to pass 2nd argument.
fixes #9
2018-07-18 15:47:27 +03:00
William Pitcock
0622245f06
x86_64: trampoline: do same cleanups as in x86
2018-02-15 04:34:37 +00:00
William Pitcock
556da6ce99
x86/x86_64: getcontext: no need to restore %ecx or %rcx
2018-02-14 05:12:09 +00:00
William Pitcock
da10e5a66d
implement ucontext functions on x86_64
2018-01-30 03:41:02 +00:00
William Pitcock
6062fc83b1
don't bother with glibc stuff afterall, kernel defines ABI to use
2018-01-29 21:50:49 +00:00