genode/base-foc/src
Christian Prochaska 4b420f6e71 Fix stack pointer alignment for x86_64 platforms
The x86_64 ABI requires the stack pointer to be 16-byte aligned before the
call of a function and decreased by 8 at the function entrypoint (after
the return address has been pushed to the stack).

Currently, when a new Genode thread gets created, the initial stack
pointer is aligned to 16 byte. On Genode/Linux, the thread entry function
is entered by a 'call' instruction, so the stack pointer alignment at the
function entrypoint is correct. On Fiasco.OC and NOVA, however, the thread
entry function gets executed without a return address being pushed to the
stack, so at the function entrypoint the stack pointer is still aligned to
16 byte, which can cause problems with compiler-generated SSE
instructions.

With this patch, the stack pointer given to a new thread gets aligned to
16 bytes and decreased by 8 by default, since most of the currently
supported base platforms execute the thread entry function without pushing
a return address to the stack. For base-linux, the stack pointer gets
realigned to 16 bytes before the thread entry function gets called.

Fixes #1043.
2014-02-03 11:34:30 +01:00
..
base Fix stack pointer alignment for x86_64 platforms 2014-02-03 11:34:30 +01:00
bootstrap Fiasco.OC: update to recent version (svn rev. 40) 2012-09-18 10:53:16 +02:00
core thread: rearrange thread context management 2014-01-27 18:54:09 +01:00
kernel foc: Arndale kernel configuration 2013-02-25 16:45:48 +01:00
platform Move main bootstrap to platform-specific object 2013-09-26 15:00:16 +02:00
sigma0 Imported Genode release 11.11 2011-12-22 16:19:25 +01:00
test/cap_integrity Merge base libraries into a single library 2013-02-19 14:45:55 +01:00