Go to the documentation of this file. 1 #ifndef SPECIFIC_INLINE_ASM_GCTXT 2 #define SPECIFIC_INLINE_ASM_GCTXT 7 #if 0 // ppc code unknown, so "inline asm" 10 #define icat(pre, base) pre ## base 11 #define lcl_label(txt) icat(L, txt) 15 #define INLINE_ASM_GCTXT(LABEL, uc) \ 16 extern void lcl_label(LABEL); \ 17 asm volatile (".globl " "L" #LABEL); \ 18 asm volatile ("L" #LABEL ":"); \ 19 UC_REG_IP(uc) = (greg_t) &lcl_label(LABEL); \ 20 // need equivalent ppc code here 21 asm volatile (
"movq %%rbp, %0" \
23 asm
volatile (
"movq %%rsp, %0" \
25 #else // for now, "inline asm" getcontext turns into syscall getcontext 26 #define INLINE_ASM_GCTXT(uc) getcontext(&uc) 27 #endif // ppc code unknown 30 #endif // SPECIFIC_INLINE_ASM_GCTXT