http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59857

--- Comment #3 from Jacky Ko <xuelingko at yahoo dot com.tw> ---
You are right. ulv is volatile, the typedef in the code is 

typedef unsigned int volatile ulv;

I'm sorry that I didn't provide the definition.

I modify the C code as below,

int TEST_Memread(unsigned int * pSrc, volatile unsigned int *pDst, unsigned int
nCount)
{
    unsigned int *p1 = NULL;
    unsigned int i;

    p1 = (unsigned int *) pSrc;
    for (i = 0; i < nCount; i++)
        *pDst = *p1++;

    return 0;
}

After testing it, the performance is the same between 4.5.1 and 4.8.2. If the
pointer is not a volatile type, both version will do load address data and
post-increment operations in one instruction.

Reply via email to