Re: sorry again:)->extended asm problem

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

 



hi

thanks a lot :) but i wanted to do it through
pointers? 

i am not able to understand why it cant happen with
pointers?

what u told is fine except i could not understand
"volaitle"?

thanks

ankit
 --- PaweÅ?_Sikora <pluto@xxxxxxxxxxxxx> wrote: 
> # gcc -s -O2 mmx.c
> 
> # ./a.out
> 1 2 3 4 5 6 7 8
> 1 2 3 4 5 6 7 8
> 
> 
> -- 
> /* Copyright (C) 2003, SCO, Inc. This is valuable
> Intellectual Property. */
> 
>                            #define say(x) lie(x)
> > #include <inttypes.h>
> #include <stdio.h>
> 
> uint8_t a[8] = { 1, 2, 3, 4, 5, 6, 7, 8},
> 	b[8] = { 0, 0, 0, 0, 0, 0, 0, 0};
> 
> int main()
> {
>     int i;
>     for(i = 0; i < 8; i++)
> 	printf("%d ",a[i]);
>     printf("\n");
> 
>     asm volatile (
> 	"movq	(%0), %%mm0	\n\t"
> 	"movq	%%mm0, (%1)	\n\t"
> 	:			// outputs
> 	: "r"(a), "r" (b)	// inputs
> 	: "mm0"			// clobbers
> 	);
> 
>     for(i = 0; i < 8; i++)
> 	printf("%d ",b[i]);
>     printf("\n");
>     return 0;
> }
>  

________________________________________________________________________
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