Commit Graph

9 Commits

Author SHA1 Message Date
Jiajie Chen ce8039c327 libcontext: Initial support for Apple Silicon
The assembly for apple_arm64 is adapted from linux_arm64 target with small modifications:

1. Re-enable FPU conditional save/restore as apple_x86_64 does
2. Workaround limitation in relocation in assembly for clang
2021-01-08 19:51:28 +00:00
Ian McInerney 580293c7fa libcontext: Call exit instead of random memory address on MSW x86_64
The original call would jump to a meaningless low address on error,
but the upstream Boost context and 32bit version of this function
call exit to properly terminate the code when this error occurs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6820
2020-12-23 23:40:56 +00:00
Marek Roszko f9e379c82a Minor format 2020-08-28 02:30:04 +00:00
Marek Roszko cb013604a9 jump_fcontext should set the outValue of fiber being switched to rather the one being switched from
Fixes #5162
2020-08-28 02:30:04 +00:00
Marek Roszko 3b1f1f7b6a Use CreateFiberEx instead of CreateFiber, ConvertThreadToFiberEx instead of ConvertThreadToFiber
- Allows specifying FIBER_FLAG_FLOAT_SWITCH to save FP registers (it doesnt by default on win32 but does on win64)
- Specify a commit stack size one byte less than the reserve stack size or else Windows rounds up to the nearest allocation size above the desired size
2020-08-28 02:30:04 +00:00
Seth Hillbrand acf4756e73 Remove extraneous build warning 2020-07-25 14:10:53 -07:00
Tomasz Wlostowski 151b4e4e5e libcontext: clean up own's shit when coroutine call is over (MSVC only) 2020-07-22 16:57:54 +02:00
Ian McInerney 3342055af6 Remove section changes inside libcontext _asm calls
Changing the section like this in inline assembly
is not supported, and leads to issues because code
following the inline assembly macro ends up in the
wrong assembly section. This was causing linking
errors on gcc.

The files appear to be compiled so that the stack
isn't executable anyway, so we don't need to manually
create the section to say that.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93190
2020-01-07 18:53:35 +00:00
Ian McInerney 5c0656d97f Move potrace and libcontext into thirdparty directory
Part of the cleanup in #3637
2019-12-28 18:17:55 +00:00
Renamed from common/system/libcontext.cpp (Browse further)