This is the mail archive of the gcc@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]

Embedded Assembly and MMX in GCC


Hello All,

I've been playing around with the MMX instructions with some inline code
(using GCC 2.96, AS v 2.11.90.0.8).

I'm able to do simple stuff (moves, adds, etc) between the 32 bit registers
on the CPU like eax, etc.

However, I can't seem to do any 64 bit stuff.  For example, The following
fails:

__asm__("movq $1, %mm0);

The assembler says "suffix or operands invalid for 'mov1' "

Also, If I create a 64 bit variable (like an unsigned long long int) and
move it into an mmx register, it seems that I only get the first 32 bits
moving into the register.  Also, the packed adding stuff (like PADDW)
doesn't seem to work.

I realize that "movq" is an actual intel assembly command, and all the other
movs in AT&T (movb, movw) were added to specify the size of the value being
moved, so I see where the "q" stuff could cause troubles.  I'm pretty sure
there just must be some configuration thing I need to set up or something,
but I can't seem to find it...

If anyone has any hints they would be greatly appreciated.

Thanks in Advance,

Mark



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