Changeset 381fdee for src/libcfa/concurrency/invoke.h
- Timestamp:
- Feb 9, 2018, 4:33:29 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- bede27b
- Parents:
- 539cdfe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/invoke.h
r539cdfe r381fdee 10 10 // Created On : Tue Jan 17 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jan 23 14:55:46201813 // Update Count : 312 // Last Modified On : Fri Feb 9 14:41:55 2018 13 // Update Count : 6 14 14 // 15 15 … … 202 202 void CtxSwitch( void * from, void * to ) asm ("CtxSwitch"); 203 203 204 #if defined( __x86_64__ ) 204 #if defined( __i386 ) 205 #define CtxGet( ctx ) __asm__ ( \ 206 "movl %%esp,%0\n" \ 207 "movl %%ebp,%1\n" \ 208 : "=rm" (ctx.SP), "=rm" (ctx.FP) ) 209 #elif defined( __x86_64 ) 205 210 #define CtxGet( ctx ) __asm__ ( \ 206 211 "movq %%rsp,%0\n" \ 207 212 "movq %%rbp,%1\n" \ 208 : "=rm" (ctx.SP), "=rm" (ctx.FP) )209 #elif defined( __i386__ )210 #define CtxGet( ctx ) __asm__ ( \211 "movl %%esp,%0\n" \212 "movl %%ebp,%1\n" \213 213 : "=rm" (ctx.SP), "=rm" (ctx.FP) ) 214 214 #elif defined( __ARM_ARCH ) … … 217 217 "mov %1,%%r11\n" \ 218 218 : "=rm" (ctx.SP), "=rm" (ctx.FP) ) 219 #else 220 #error unknown hardware architecture 219 221 #endif 220 222
Note: See TracChangeset
for help on using the changeset viewer.