This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug inline-asm/23242] 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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]