Inline assembly code error: expression must be absolute ???
Inline assembly code error: expression must be absolute ???
- Subject: Inline assembly code error: expression must be absolute ???
- From: rohit dhamija <email@hidden>
- Date: Wed, 25 Jan 2006 14:03:37 +0530
Hi,
I am in process of porting some inline asm instruction written in Intel to G4 Mac and encountering following problem in the code
Following is the Intel instruction:
__asm mov ecx, x
Below is the code for G4 Mac
////////////////////////////////////
unsigned long x, carry;
x = 20;
asm ("li %1,%0" : "=r" (carry) : "r" (x) ); //=======> Error
//asm ("li %0,10" : "=r" (carry)); //=====> this works fine
///////////////////////////
I am moving value of "x" to "carry" but the compiler throws following error:
"Parameter error: _expression_ must be absolute (parameter 2)". But if i specify some values instead of passing x, the instruction works fine.
What can be the issue ? All suggestions/comments are welcome.
Regards,
--
Rohit Dhamija(M) 9818446545
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden