Inline assembly statement

S

sbillore

Hi All,

I want to write one c function with some
inline assembly code like that:

void foo(int i)
{
__asm("addu $at,i,0");
}

Here input is a general purpose register number.
It's giving error at "i", that register expected.

I am using ghs compiler for MIPS.

Could anyone please tell me how I can do it?

Regards,
Sachin
 
C

CBFalconer

Hi All,

I want to write one c function with some
inline assembly code like that:

void foo(int i)
{
__asm("addu $at,i,0");
}

Here input is a general purpose register number.
It's giving error at "i", that register expected.

I am using ghs compiler for MIPS.

Could anyone please tell me how I can do it?

Not here. This is not standard portable C, so look for a newsgroup
that deals with your system and/or compiler.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top