ptrdiff_t is signed so unequality comparison between pointers would
compute wrong when the two operands are within opposite halves of the
memory space.
}
#else
/* Align destination at BLOCK_SIZE boundary */
- for(; ((ptrdiff_t)to & (BLOCK_SIZE-1)) && i>0; i--)
+ for(; ((uintptr_t)to & (BLOCK_SIZE-1)) && i>0; i--)
{
__asm__ __volatile__ (
#ifndef HAVE_MMX1
to = (void *) (((unsigned char *)to)+64);
}
-/* printf(" %p %p\n", (ptrdiff_t)from&1023, (ptrdiff_t)to&1023); */
+/* printf(" %p %p\n", (uintptr_t)from&1023, (uintptr_t)to&1023); */
/* Pure Assembly cuz gcc is a bit unpredictable ;) */
# if 0
if(i>=BLOCK_SIZE/64)
const uint8_t *p_s1 = (const uint8_t *)_p_s1;
const uint8_t *p_s2 = (const uint8_t *)_p_s2;
uint8_t* p_end;
- while( (ptrdiff_t)p_s1 % 16 )
+ while( (uintptr_t)p_s1 % 16 )
{
*p_dest++ = ( (uint16_t)(*p_s1++) + (uint16_t)(*p_s2++) ) >> 1;
}
p_in64 = (uint64_t*)p_in;
p_out64 = (uint64_t*)p_out;
- for( ; (ptrdiff_t)p_in64 < (ptrdiff_t)p_line_end ; )
+ while( p_in64 < p_line_end )
{
/* Do 64 pixels at a time */
*p_out64++ = ~*p_in64++; *p_out64++ = ~*p_in64++;