* paddb vs paddw
@ 2004-12-23 11:00 Ankit Jain
2004-12-23 12:46 ` Eljay Love-Jensen
0 siblings, 1 reply; 2+ messages in thread
From: Ankit Jain @ 2004-12-23 11:00 UTC (permalink / raw)
To: gcc
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?
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 "paddd (%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
~
ankit jain
________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: paddb vs paddw
2004-12-23 11:00 paddb vs paddw Ankit Jain
@ 2004-12-23 12:46 ` Eljay Love-Jensen
0 siblings, 0 replies; 2+ messages in thread
From: Eljay Love-Jensen @ 2004-12-23 12:46 UTC (permalink / raw)
To: Ankit Jain, gcc
Hi Ankit,
>Both the programs give the same output. WHY IS IT SO? i am using paddb
and paddw. it dosent make any diff?
Try these number instead, and see if it makes a difference:
uint8_t a[8]={0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87};
uint8_t b[8]={0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8};
uint8_t i;
HTH,
--Eljay
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-12-23 12:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-23 11:00 paddb vs paddw Ankit Jain
2004-12-23 12:46 ` Eljay Love-Jensen
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).