"\tpushl %eax\n"
"\tcall _start_in_C\n"
"\thlt\n"
+ ".previous\n"
);
#elif defined(VGP_amd64_linux)
asm("\n"
/* call _start_in_C, passing it the startup %rsp */
"\tcall _start_in_C\n"
"\thlt\n"
+ ".previous\n"
);
#elif defined(VGP_ppc32_linux)
asm("\n"
"\tmr 1,16\n"
"\tbl _start_in_C\n"
"\ttrap\n"
+ ".previous\n"
);
#else
#error "_start: needs implementation on this platform"
".text\n" \
"my_sigreturn:\n" \
" movl $" #name ", %eax\n" \
- " int $0x80\n"
+ " int $0x80\n" \
+ ".previous\n"
#elif defined(VGP_amd64_linux)
# define _MYSIG(name) \
".text\n" \
"my_sigreturn:\n" \
" movq $" #name ", %rax\n" \
- " syscall\n"
+ " syscall\n" \
+ ".previous\n"
#elif defined(VGP_ppc32_linux)
# define _MYSIG(name) \
".text\n" \
"my_sigreturn:\n" \
" li 0, " #name "\n" \
- " sc\n"
+ " sc\n" \
+ ".previous\n"
#else
# error Unknown platform
#endif
" popl %edi\n"
" popl %esi\n"
" ret\n"
+".previous\n"
);
#elif defined(VGP_amd64_linux)
/* Incoming args (syscall number + up to 6 args) come in %rdi, %rsi,
" movq 8(%rsp), %r9\n" /* last arg from stack */
" syscall\n"
" ret\n"
+".previous\n"
);
#elif defined(VGP_ppc32_linux)
/* Incoming args (syscall number + up to 6 args) come in %r0, %r3:%r8
" mfcr 4\n" /* %cr -> low word of return var */
" rlwinm 4,4,4,31,31\n" /* rotate flag bit so to lsb, and mask it */
" blr\n" /* and return */
+".previous\n"
);
#else
# error Unknown platform
" popq %rdi\n" // arg1 to correct arg reg
" ret\n" // jump to f
" ud2\n" // should never get here
+".previous\n"
);
/*
"1:\n" // PARENT or ERROR
" ret\n"
+".previous\n"
);
#undef __NR_CLONE
" mtcr 0\n\t" // CAB: Need this?
" bctr\n\t" // jump to dst
" trap\n" // should never get here
+".previous\n"
);
" lwz 31,28(1)\n"
" addi 1,1,32\n"
" blr\n"
+".previous\n"
);
#undef __NR_CLONE
" movl $0, %ebp\n"
" ret\n" // jump to f
" ud2\n" // should never get here
+".previous\n"
);
" pop %edi\n"
" pop %ebx\n"
" ret\n"
+".previous\n"
);
#undef FSZ