This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
inline assembly issue
- From: tysunset <yi dot tang at uq dot edu dot au>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 21 May 2009 08:56:58 -0700 (PDT)
- Subject: inline assembly issue
Hi,
I'm using inline assembly for my custom instruction on SPARC architecture.
For my custom instruction, the output and input register cannot be the same
one, otherwise get error. Can you suggest how to modify my inline
instruction to have this feature:
asm_volatile (
"cpop1 [%1 + %%g0], %0"
: =r(tasknum)
: r (cmd));
Only two register involved in this command, %1 to input command, %0 to
output value.
Is there any way to tell the compiler not let them have the same register,
or some way to tie them to specific register (o1, o2 should be ok).
Thanks,
--
View this message in context: http://www.nabble.com/inline-assembly-issue-tp23655722p23655722.html
Sent from the gcc - Help mailing list archive at Nabble.com.