From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29827 invoked by alias); 23 Dec 2004 11:00:48 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 29747 invoked from network); 23 Dec 2004 11:00:31 -0000 Received: from unknown (HELO web52905.mail.yahoo.com) (206.190.39.182) by sourceware.org with SMTP; 23 Dec 2004 11:00:31 -0000 Received: (qmail 95227 invoked by uid 60001); 23 Dec 2004 11:00:31 -0000 Message-ID: <20041223110031.95225.qmail@web52905.mail.yahoo.com> Received: from [202.164.100.133] by web52905.mail.yahoo.com via HTTP; Thu, 23 Dec 2004 11:00:31 GMT Date: Thu, 23 Dec 2004 11:00:00 -0000 From: Ankit Jain Subject: paddb vs paddw To: gcc MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2004-12/txt/msg00218.txt.bz2 1 #include 2 #include 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 2 #include 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