public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug inline-asm/20202] New: asm("movq %0, %mm0" : : "X"(*a)) generates invalid asm code
@ 2005-02-25 8:43 bero at arklinux dot org
2005-02-25 9:13 ` [Bug inline-asm/20202] " bero at arklinux dot org
2005-02-25 20:44 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: bero at arklinux dot org @ 2005-02-25 8:43 UTC (permalink / raw)
To: gcc-bugs
Compiling the following code results in invalid asm:
#include <stdint.h>
typedef union {
int64_t q;
} __attribute__ ((aligned (8))) mmx_t;
int main(int argc, char **argv)
{
mmx_t a;
mmx_t *b=&a;
__asm__ __volatile__("movq %0, %%mm0" : : "X" (*b)); /* produces
invalid asm code */
}
The equivalent
#include <stdint.h>
typedef union {
int64_t q;
} __attribute__ ((aligned (8))) mmx_t;
int main(int argc, char **argv)
{
mmx_t a;
__asm__ __volatile__("movq %0, %%mm0" : : "X" (a)); /* works */
}
works.
The invalid asm code being generated is "movq %eax,%mm0".
--
Summary: asm("movq %0, %mm0" : : "X"(*a)) generates invalid asm
code
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: inline-asm
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bero at arklinux dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-ark-linux
GCC host triplet: i686-ark-linux
GCC target triplet: i686-ark-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20202
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-02-25 15:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-25 8:43 [Bug inline-asm/20202] New: asm("movq %0, %mm0" : : "X"(*a)) generates invalid asm code bero at arklinux dot org
2005-02-25 9:13 ` [Bug inline-asm/20202] " bero at arklinux dot org
2005-02-25 20:44 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).