|
From: Jonathan P. <jon...@co...> - 2003-11-19 22:54:24
|
Hi there,
Thanks for implementing the MMX instruction set!
Now that we can run with mmx enabled we're seeing the "uninitialized
value" warning quite a bit. As far as we can tell everything works just
fine so this feels like a false positive. I've stepped into the
debugger when the errors occur and all the addresses look fine as well -
the pointers are well within the middle of a large array that has been
written to many times before the error starts showing up.
Has anybody else seen this?
Here's our memcpy_mmx routine that is causing the problem:
void memcpy_mmx(unsigned char *to, const unsigned char *from, size_t len)
{
register int i;
// align destination
for (i = (int)to & 0x3 ; i-- && len > 0 ; len--) {
*to++ = *from++;
}
// copy 64-byte chunks
i = len >> 6;
while (i--) {
__asm__ __volatile__ (
" movq (%0), %%mm0\n"
" movq 8(%0), %%mm1\n"
" movq 16(%0), %%mm2\n"
" movq 24(%0), %%mm3\n"
" movq %%mm0, (%1)\n"
" movq %%mm1, 8(%1)\n"
" movq %%mm2, 16(%1)\n"
" movq %%mm3, 24(%1)\n"
" movq 32(%0), %%mm0\n"
" movq 40(%0), %%mm1\n"
" movq 48(%0), %%mm2\n"
" movq 56(%0), %%mm3\n"
" movq %%mm0, 32(%1)\n"
" movq %%mm1, 40(%1)\n"
" movq %%mm2, 48(%1)\n"
" movq %%mm3, 56(%1)\n"
: : "r" (from), "r" (to) : "memory");
from += 64;
to += 64;
}
// copy 64-bits at a time
i = (len & 0x38) >> 3;
while (i--) {
__asm__ __volatile__ (
" movq (%0), %%mm0\n"
" movq %%mm0, (%1)\n"
: : "r" (from), "r" (to) : "memory");
to += 8;
from += 8;
}
// copy last few bytes if necessary
for (i = len & 7 ; i-- > 0 ;) {
*to++ = *from++;
}
}
Can you CC me directly since I am not on the mailing list? Thanks!
JP
|