mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-25 11:04:35 +00:00
aarch64: TLS register checkpoint/restore implementation by Christopher Covington. Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by: Christopher Covington <cov@codeaurora.org> Reviewed-by: Christopher Covington <cov@codeaurora.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
28 lines
601 B
C
28 lines
601 B
C
#ifndef __CR_ASM_RESTORE_H__
|
|
#define __CR_ASM_RESTORE_H__
|
|
|
|
#include "asm/restorer.h"
|
|
|
|
#include "protobuf/core.pb-c.h"
|
|
|
|
#define JUMP_TO_RESTORER_BLOB(new_sp, restore_task_exec_start, \
|
|
task_args) \
|
|
asm volatile( \
|
|
"and sp, %0, #~15 \n" \
|
|
"mov x0, %2 \n" \
|
|
"br %1 \n" \
|
|
: \
|
|
: "r"(new_sp), \
|
|
"r"(restore_task_exec_start), \
|
|
"r"(task_args) \
|
|
: "sp", "x0", "memory")
|
|
|
|
static inline void core_get_tls(CoreEntry *pcore, tls_t *ptls)
|
|
{
|
|
*ptls = pcore->ti_aarch64->tls;
|
|
}
|
|
|
|
|
|
int restore_fpu(struct rt_sigframe *sigframe, CoreEntry *core);
|
|
|
|
#endif
|