public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Mark Cuss" <mcuss@cdlsystems.com>
To: <grahams@redhat.com>
Cc: <gcc@gcc.gnu.org>
Subject: Embedded Assembly and MMX in GCC
Date: Tue, 11 Dec 2001 11:14:00 -0000	[thread overview]
Message-ID: <00cc01c18271$ef4c12a0$160e10ac@hades> (raw)
In-Reply-To: <3C0D3A05.6FE3602F@redhat.com>

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


  parent reply	other threads:[~2001-12-11 18:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-03 19:13 gcc-ss-20011203 is now available gccadmin
2001-12-04  7:11 ` Andreas Schwab
2001-12-04  7:59   ` Joseph S. Myers
2001-12-04 12:16     ` guerby
2001-12-04 12:24       ` Joseph S. Myers
2001-12-04 12:30         ` Phil Edwards
2001-12-04 12:36           ` Joseph S. Myers
2001-12-04 12:46             ` Phil Edwards
2001-12-04 12:50               ` Assembly in Gcc Mark Cuss
2001-12-04 13:03                 ` Graham Stott
2001-12-04 13:27                   ` Mark Cuss
2001-12-04 19:00                   ` Tim Prince
2001-12-11 11:14                   ` Mark Cuss [this message]
2001-12-11 12:35                     ` Embedded Assembly and MMX in GCC Alexandre Oliva
2001-12-11 13:00                       ` Mark Cuss
2001-12-11 13:18                         ` Alexandre Oliva
2001-12-11 14:09                           ` Mark Cuss
2001-12-12  3:48                       ` Andreas Schwab
2001-12-11 14:38                     ` Craig Rodrigues
2001-12-04 19:54           ` gcc-ss-20011203 is now available Mark Mitchell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='00cc01c18271$ef4c12a0$160e10ac@hades' \
    --to=mcuss@cdlsystems.com \
    --cc=gcc@gcc.gnu.org \
    --cc=grahams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).