This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/23242] Invalid %sil register chosen when dereferenced pointer used in inline asm with -O0
- From: "Hans dot Boehm at hp dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Aug 2005 18:51:09 -0000
- Subject: [Bug inline-asm/23242] Invalid %sil register chosen when dereferenced pointer used in inline asm with -O0
- References: <20050805003204.23242.ianw@gelato.unsw.edu.au>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From Hans dot Boehm at hp dot com 2005-08-12 18:51 -------
Could we reopen this as a documentation bug? I'm still confused, and the
amount of discussion suggests I'm not alone. Currently "r" is documented as
meaning "general register", with no comments about operand size. I naively
interpreted this to mean that the size is infered from the operand, which it
seems to be in other cases.
"Q" means "a, b, c, or d register for 8-bit instructions that do use upper
halves". I don't understand why this applies to xchg. Did you mean "q"?
Why are 8 bit registers treated separately, but not 16-bit registers? Why does
this only appear to be true for X86? This is unintuitive since it seems that
the compiler has enough information to get this right; it just choses not to.
Hans
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23242