This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

inline assembler question


hi there!

courrently I'm workin with gcc using inlineasm instructions for SSE and
MMX.
But there are some things i'd like to know (since i'm new to gcc i
apologize herby for newbee-questions :)

first of all, where is the arg stored?

example:
int function(int arg);
{
__asm__(" movl arg,%eax ");
}

doesn't work because the arg symbol isn't parsed as variable to the asm
...


how to tell in sse the operand-size assumption like the 'quadword ptr'
or 'xmmword ptr' in intel syntax?

example:(in itel-syntax)

float function(float *arg)
{
 __asm mov eax, dword ptr arg
 __asm movups xmm1, xmmword ptr [eax]
}

how wold this function look in gcc?


are operand and operator in the same or oppostie order than in intel
syntax?

how does the asm behave when you have mnemonics with 3 args ?
(like 'shufps' for example...)

Regards,
michael saenger

P.S. I'd be thankful for any help, or even a link to a website(but it
must be a SSE/MMX specific one :)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]