On Fri, Jan 04, 2013 at 10:39:05PM +0100, Leif Ekblad wrote: > I just tried the patch, but it seems to produce some problems for > me. The other patch which used a 64-bit specific register (r15) > instead of rbx was easier to adapt to. The problem for me is that > syscalls might clobber higher-half of all 32-bit registers, and that > I cannot use the stack to preserve rbx in the call because of the > red-zone.
Of course you can use the stack, just subtract the red zone size (plus whatever you need) from %rsp first, then save to stack, do syscall, then restore from stack and finally increment %rsp back. Jakub