https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80470
--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
 (In reply to Martin Liška from comment #3)
> (In reply to Uroš Bizjak from comment #2)
> > You should not clobber esp.
> 
> Works for me, thanks. Can you please explain me why it makes problem? Is it
> because not enough registers or?

Register allocator can't omit frame pointer (%ebp) to stack pointer (%esp) when
the latter is clobbered in the asm.

BTW, gcc7 allows you to use %ebx directly through "b" constraint, so:

    __asm__ __volatile__("int $0x80"
                         : "=a"(__res)
                         : "0"(114), "b"((long)(p)), "c"((long)(s)),
                           "d"((long)(o)), "S"((long)(r))
                         : "memory");

Reply via email to