gcc 4.5 powerpc wants r31

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

 



Hi

Using a cross compiled gcc for PowerPC-CPUs: powerpc-eabi-gcc.exe --version
powerpc-eabi-gcc.exe (crosstool-NG-1.8.2) 4.5.2

I'm having a problem compiling some inline assembler code. This
works with older compilers but 4.5 doesn't like it.

register uint32 uFlags    asm("r20") = 0;
asm volatile ("mr		31,%0": : "r" (uFlags) : "31");

Compiling unoptimized I get

file.cpp:3271:1: error: 31 cannot be used in asm here

Compiling with -O2 works.

Seems like this problem is already old (2006):
https://bugs.gentoo.org/show_bug.cgi?format=multiple;id=133948
http://www.stackless.com/pipermail/stackless/2006-August/002415.html

Is there a solution apart from -fomit-frame-pointer or "don't do this"?

Thanks

bye  Fabi



[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