linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maciej Hrebien <m_hrebien@wp.pl>
To: linux-assembly@vger.kernel.org
Subject: Re: paddw vs paddb
Date: Fri, 24 Dec 2004 10:01:01 +0100	[thread overview]
Message-ID: <41CBDACD.1C92968D@wp.pl> (raw)
In-Reply-To: 20041223105949.5295.qmail@web52903.mail.yahoo.com

Ankit Jain wrote:
> 
>       1 #include<stdio.h>
>       2 #include<inttypes.h>
>       3 int main()
>       4 {
>       5         uint8_t
> a[8]={1,2,3,4,5,6,7,8},b[8]={1,2,3,4,5,6,7,8},i;
>       6         asm("movq (%1), %%mm0 \n"
>       7             "paddb (%0), %%mm0 \n"
>       8             "movq  %%mm0, (%0) \n"
>       9                 :
>      10                 :"r"(b),"r"(a)
>      11                 :"%mm0"
>      12         );
>      13         for(i=0;i<8;i++)
>      14         printf("%d ",b[i]);
>      15         return 0;
>      16 }
>      17
> Both the programs give the same output
> 
> WHY IS IT SO? i am using paddb and paddw. it dosent
> make any diff?

Insert to a or b value for which a[i]+b[i]>255 where i is odd
and you will see the difference, ie. a[7]=255.

-- 
Maciej Hrebien


  reply	other threads:[~2004-12-24  9:01 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 [this message]
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

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=41CBDACD.1C92968D@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 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 NNTP newsgroup(s).