------- Additional Comments From pinskia at physics dot uc dot edu  2005-08-05 
01:35 -------
Subject: Re:  New: Invalid %sil register chosen when dereferenced pointer used 
in inline asm with -O0


On Aug 4, 2005, at 8:32 PM, ianw at gelato dot unsw dot edu dot au 
wrote:

>   /* this one doesn't */
>     __asm__ __volatile__("xchgb %0, %1"
>   : "=r"(old), "=m"(*newp)
>   : "0"(0xff), "m"(*newp) : "memory");


This is not a bug.

r is selecting %sil which is a valid register for x86_64.

"r" is assuming that it is a full size register.

Use "Q" instead.

-- Pinski

PS The reason why I am CC you instead of writing this into bugzilla is 
because
bugzilla seems dead.



-- 


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

Reply via email to