This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: sorry again:)->extended asm problem
# 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;
}