extended asm problem->pointers->m1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



      1 #include<inttypes.h>
      2
      3
      4 int main()
      5 {
      6   uint8_t
a[8]={1,2,3,4,5,6,7,8},b[8]={0,0,0,0,0,0},i;
      7   uint8_t *m,*m1;
      8 
      9   m=a;
     10 
     11   for(i=0;i<8;i++)
     12      printf("%d ",a[i]);
     13   printf("\n");
     14   asm("movq (%1), %%mm0 \n"
     15       "movq %%mm0, (%1) \n"
     16       :"=r"(m1)
     17       :"r"(m)
     18       );
     19 
     20   for(i=0;i<8;i++)
     21      printf("%d ",b[i]);
     22   return 0;
     23 }
the problem in this code is it is printing array b as
00000000
it is not moving the values
WHY?

ankit


________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux