feat/support_fiber #2
@ -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'
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user