This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
PPC GCC Inline assembly help
- From: eija_flight <ajie dot dirgantara at flightfocus dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 6 May 2009 02:22:45 -0700 (PDT)
- Subject: PPC GCC Inline assembly help
Hello,
I'm using GCC inline assembly on PowerPc.
Below codes is works :
int reg_gpr()
{
int Rx = 0;
__asm__ (
"mr 31,%0\n"
:
:"i"(Rx)
);
}
But not with this one :
reg_gpr(0);
int reg_gpr(int Rx)
{
__asm__ (
"mr 31,%0\n"
:
:"i"(Rx)
);
}
It will send error messages "impossible constraints in asm"
Is there any other method to modify Rx value from outside functions?
thanks,
--
View this message in context: http://www.nabble.com/PPC-GCC-Inline-assembly-help-tp23403005p23403005.html
Sent from the gcc - Help mailing list archive at Nabble.com.