This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using inline assembly with specific register indices
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: nkavv at physics dot auth dot gr
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 05 Apr 2005 22:25:40 +0100
- Subject: Re: Using inline assembly with specific register indices
- References: <1112675084.4252130c91181@mail.physics.auth.gr>
nkavv@physics.auth.gr writes:
> asm("cop2a %0, %1;", :: "r" (cp2rb(i)) : "r" (cp2rb(j)));
In addition to Daniel's reply: you wouldn't want to use "r" here.
That's for general registers only.
The MIPS port does in theory support coprocessors, but the functionality
isn't tested much (if at all). The constraint for coprocessor 2 registers
is "C".
Richard