All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maciej Hrebien <m_hrebien@wp.pl>
To: linux-assembly@vger.kernel.org
Subject: Re: paddw vs paddb
Date: Wed, 29 Dec 2004 23:40:25 +0100	[thread overview]
Message-ID: <41D33259.79A348C4@wp.pl> (raw)
In-Reply-To: 20041229121244.27226.qmail@web52908.mail.yahoo.com

Ankit Jain wrote:
> 
> hi
> 
> i know about movd but i want to move 16bit atr a time

You can't move a word to a mmx register directly. You have to
simulate it ie. with a temp ored with the destination register:

pxor %mm7,%mm7
xor  %eax,%eax

movw your_word,%ax

movd %eax,%mm7
por  %mm7,%mm0

which moves your_word to the lowest part of mm0 and you have
to be sure that low word of mm0 is zeroed before the operation.
Or you can:

movd %mm0,%eax
movw your_word,%ax
movd %eax,%mm0

etc. but i don't recomend this kind of coding. Keep your words
together and use movq.

-- 
Maciej Hrebien


      reply	other threads:[~2004-12-29 22:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-23 10:59 paddw vs paddb Ankit Jain
2004-12-24  9:01 ` Maciej Hrebien
2004-12-25  7:21   ` Ankit Jain
2004-12-25 10:40     ` Maciej Hrebien
2004-12-29 12:12       ` Ankit Jain
2004-12-29 22:40         ` Maciej Hrebien [this message]

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=41D33259.79A348C4@wp.pl \
    --to=m_hrebien@wp.pl \
    --cc=linux-assembly@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.