------- Comment #2 from valery_reznic at yahoo dot com  2009-02-06 07:12 -------
(In reply to comment #1)
> r11 is saved by the caller so this is the generated code is valid. 
> Since nothing else uses r11 in the inline-asm, the code is correct.
The problem is not that r11 not saved at stack, but that saved on the stack
value of r15 ALWAYS will be overwritten - by the 'call my_syscall' instruction
and saved on the stack values of rbx, r12, r13 and r14 MAY BE overritten if
my_syscall function wrote something to the stack

> From the i386.h header:
>    The value is zero if the register is not call used on either 32 or
>    64 bit targets, one if the register if call used on both 32 and 64
>    bit targets, two if it is only call used on 32bit targets and three
>    if its only call used on 64bit targets.
> /*  r8,  r9, r10, r11, r12, r13, r14, r15*/                     \
>      1,   1,   1,   1,   2,   2,   2,   2,                      \
> 


-- 

valery_reznic at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39078

Reply via email to