Re: sorry again:)->extended asm problem

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

 



# 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;
}

[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