Changeset 88cafe7
- Timestamp:
- Aug 20, 2020, 11:39:01 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 67ca73e
- Parents:
- 442b624
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel/startup.cfa
r442b624 r88cafe7 33 33 // Some assembly required 34 34 #if defined( __i386 ) 35 #define CtxGet( ctx ) \ 36 __asm__ volatile ( \ 37 "movl %%esp,%0\n"\ 38 "movl %%ebp,%1\n"\ 39 : "=rm" (ctx.SP),\ 40 "=rm" (ctx.FP) \ 41 ) 35 #define CtxGet( ctx ) __asm__ volatile ( \ 36 "movl %%esp,%0\n" \ 37 "movl %%ebp,%1\n" \ 38 : "=rm" (ctx.SP), \ 39 "=rm" (ctx.FP) \ 40 ) 42 41 #elif defined( __x86_64 ) 43 #define CtxGet( ctx ) \ 44 __asm__ volatile ( \ 45 "movq %%rsp,%0\n"\ 46 "movq %%rbp,%1\n"\ 47 : "=rm" (ctx.SP),\ 48 "=rm" (ctx.FP) \ 49 ) 50 #elif defined( __ARM_ARCH ) 51 #define CtxGet( ctx ) __asm__ ( \ 52 "mov %0,%%sp\n" \ 53 "mov %1,%%r11\n" \ 54 : "=rm" (ctx.SP), "=rm" (ctx.FP) ) 42 #define CtxGet( ctx ) __asm__ volatile ( \ 43 "movq %%rsp,%0\n" \ 44 "movq %%rbp,%1\n" \ 45 : "=rm" (ctx.SP), \ 46 "=rm" (ctx.FP) \ 47 ) 48 #elif defined( __aarch64__ ) 49 #define CtxGet( ctx ) __asm__ volatile ( \ 50 "mov %0, sp\n" \ 51 "mov %1, fp\n" \ 52 : "=rm" (ctx.SP), \ 53 "=rm" (ctx.FP) \ 54 ) 55 55 #else 56 56 #error unknown hardware architecture
Note: See TracChangeset
for help on using the changeset viewer.