This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/21398] New: gcc emits invalid operands for xchgb %b0, %h0
- From: "pluto at pld-linux dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 May 2005 13:44:55 -0000
- Subject: [Bug other/21398] New: gcc emits invalid operands for xchgb %b0, %h0
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
the code like this:
unsigned short swap16(unsigned short x)
{
asm volatile ("xchgb %b0, %h0" : "=q" (x) : "0" (x));
return x;
}
produces:
swap16: xchgb %dil, %di <== %di isn't valid high 8-bit form.
movzwl %di, %eax
ret
IIRC the %rdi, %rsi, %rsp, %rbp haven't a high 8-bit form.
--
Summary: gcc emits invalid operands for xchgb %b0, %h0
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at pld-linux dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: amd64-pld-linux
GCC host triplet: amd64-pld-linux
GCC target triplet: amd64-pld-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21398