#endif
}
else
{
GLfloat *start = (GLfloat *) &((unsigned char *) g.m_colorary)[i*g.m_colorstride];
static float two55 = 255.f;
unsigned int R, G, B, A;
#ifdef _X86_
__asm {
mov ebx, start;
fld [ebx];
fld [ebx + 4];
fld [ebx + 8];
fld [ebx + 12];
fld two55;
fmul st(1), st(0);
fmul st(2), st(0);
fmul st(3), st(0);
fmulp st(4), st(0);...
On the other hand, who needs code completion with "mov eax, 0" ? (code completion could be useful only with function names...).I don't know much about inline assembly as I never use it, but can you not use variable names and/or addresses in it? I would think you'd want to have some way of interacting with the rest of the program, so that would be handy...
I'm not sure where the code completion topic came from.It came from me not understanding what was meant by 'handling inline assembly yet', as I wasn't aware of any problems with it.
I don't know much about inline assembly as I never use it, but can you not use variable names and/or addresses in it?That's what I was talking about when I said "code completion could be useful only with function names" ^^
I know, I was just nitpicking about functions vs. variables. They're different things, you know ;).QuoteI don't know much about inline assembly as I never use it, but can you not use variable names and/or addresses in it?That's what I was talking about when I said "code completion could be useful only with function names" ^^
As for opcodes, as you say they vary between Intel's and AT&T's syntaxes (mov versus movw for example), but on the other hand opcodes with more than 5 letters are very rare or even don't existe (at least with Intel's syntax), so there is no need for opcodes-autocompletion IMHO ^^True I guess. But as I said, it might be nice if a hint is given as to what they actually do. At least for people who don't usually use assembly (At least not outside my two courses on compilers and embedded systems, neither of which used Intel or AT&T syntax).
I know, I was just nitpicking about functions vs. variables. They're different things, you knowOf course, but it seems to me that we can either call C functions or use C variable inside inline assembly ^^
You don't use gcc's extended assembly syntax? It is great, should really give it a look.QuoteI don't know much about inline assembly as I never use it, but can you not use variable names and/or addresses in it?That's what I was talking about when I said "code completion could be useful only with function names"
FWIW, the following compiles under CB set to VC++ toolkit:
#include <iostream>
int main()
{
int a;
__asm
{
xor eax,eax
mov a, 5
}
printf("%d\n", a);
return 0;
}