glibc/sysdeps
Sergey Bugaev 4a373ea7d6 mach: Define MACHINE_THREAD_STATE_SETUP_CALL
The existing two macros, MACHINE_THREAD_STATE_SET_PC and
MACHINE_THREAD_STATE_SET_SP, can be used to set program counter and the
stack pointer registers in a machine-specific thread state structure.

Useful as it is, this may not be enough to set up the thread to make a
function call, because the machine-specific ABI may impose additional
requirements. In particular, x86_64 ABI requires that upon function
entry, the stack pointer is 8 less than 16-byte aligned (sp & 15 == 8).

To deal with this, introduce a new macro,
MACHINE_THREAD_STATE_SETUP_CALL (), which sets both stack and
instruction pointers, and also applies any machine-specific requirements
to make a valid function call. The default implementation simply
forwards to MACHINE_THREAD_STATE_SET_PC and MACHINE_THREAD_STATE_SET_SP,
but on x86_64 we additionally align the stack pointer.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230517191436.73636-3-bugaevc@gmail.com>
2023-05-17 22:52:39 +02:00
..
aarch64 aarch64: More configure checks for libmvec 2023-05-05 11:34:44 +01:00
alpha
arc
arm
csky
generic elf: Stop including tls.h in ldsodefs.h 2023-04-10 23:26:28 +02:00
gnu hurd 64bit: Fix struct msqid_ds and shmid_ds fields 2023-05-01 15:07:51 +02:00
hppa hppa: Fix 'concurrency' typo in comment 2023-05-05 10:12:39 +01:00
htl hurd 64bit: Fix pthread_t/thread_t type to long 2023-05-01 15:05:09 +02:00
hurd
i386
ia64
ieee754 Added Redirects to longdouble error functions [BZ #29033] 2023-05-10 13:59:48 -05:00
loongarch
m68k
mach mach: Define MACHINE_THREAD_STATE_SETUP_CALL 2023-05-17 22:52:39 +02:00
microblaze
mips
nios2
nptl hurd 64bit: Add missing libanl 2023-05-01 13:36:14 +02:00
or1k
posix
powerpc Added Redirects to longdouble error functions [BZ #29033] 2023-05-10 13:59:48 -05:00
pthread nptl: Reformat Makefile. 2023-05-10 13:15:13 -04:00
riscv Revert "riscv: Resolve symbols directly for symbols with STO_RISCV_VARIANT_CC." 2023-05-07 14:16:03 +02:00
s390
sh
sparc
unix Update kernel version to 6.3 in header constant tests 2023-05-16 23:15:13 +00:00
wordsize-32
wordsize-64 hurd: Fix tst-writev test 2023-05-01 13:01:30 +02:00
x86 <sys/platform/x86.h>: Add PREFETCHI support 2023-04-05 14:46:10 -07:00
x86_64 Enable libmvec support for AArch64 2023-05-03 12:09:49 +01:00