Re: GCC for xscale big-endian gives error: register specified for '__r1' isn't suitable for data type

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

 



I am using gcc 3.4.3 branch

Khem Raj wrote:

Hi

When compiling the following example with gcc with xscale big endian I am getting following error.

test.c: In function `foo':
test.c:6: error: register specified for '__r1' isn't suitable for data type
test.c:6: error: register name given for non-register variable '__r1'




typedef unsigned long long u64;
int foo(unsigned long arg)
{
 u64 ullval = 0;
 const register typeof(*((u64 *)arg)) __r1 asm("r1") = (ullval << 9);
 return 0;
}



But the same example compiles fine with xscale little endian gcc.

However if I use r0 instead of r1 then the program compiles fine on both big and little endian.

Why is error happening and what is the right way to code the above

Thanks for your help

-Khem


[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