feat/support_fiber #2

Merged
tqcq merged 57 commits from feat/support_fiber into master 2024-06-21 10:33:52 +08:00
2 changed files with 7 additions and 5 deletions
Showing only changes of commit 5c89d3667c - Show all commits

View File

@ -50,7 +50,7 @@
// x1: to
.text
.global TILE_ASM_SYMBOL(tile_ucontext_swap)
.align 4
.balign 16
TILE_ASM_SYMBOL(tile_ucontext_swap):
// Save context 'from'

View File

@ -1,8 +1,7 @@
#ifndef TILE_FIBER_DETAIL_AARCH64_UCONTEXT_H
#define TILE_FIBER_DETAIL_AARCH64_UCONTEXT_H
#ifndef TILE_FIBER_DETAIL_ASM_UCONTEXT_AARCH64_H
#define TILE_FIBER_DETAIL_ASM_UCONTEXT_AARCH64_H
#pragma once
#define TILE_REG_r0 0x00
#define TILE_REG_r1 0x08
#define TILE_REG_r16 0x10
@ -37,6 +36,7 @@
#endif
#ifndef TILE_BUILD_ASM
#include <stdint.h>
// Procedure Call Standard for the ARM 64-bit Architecture
@ -76,6 +76,7 @@ struct tile_ucontext_t {
uintptr_t SP; // stack pointer
uintptr_t LR; // link register (R30)
};
#define TILE_UCONTEXT_ARG0(ctx, stack_top) (ctx)->LR
#define TILE_UCONTEXT_ARG1(ctx, stack_top) (ctx)->r0
#define TILE_UCONTEXT_ARG2(ctx, stack_top) (ctx)->r1
@ -138,4 +139,5 @@ static_assert(offsetof(tile_ucontext_t, LR) == TILE_REG_LR,
#endif // __cplusplus
#endif // TILE_BUILD_ASM
#endif // TILE_FIBER_DETAIL_AARCH64_UCONTEXT_H
#endif // TILE_FIBER_DETAIL_ASM_UCONTEXT_AARCH64_H