Page 2 of 2
Re: Stupid GCC inline assembly CANNOT even handle local vari
Posted: Mon Jul 05, 2010 12:40 am
by xuancong
And also "mov (x+4),%eax" is not supported by GCC, you get a compile error.
Yes, that's pure AT&T syntax, not inline assembly.
Sure, AT&T syntax should support, but GCC inline asm doesn't support. We're talking about different things.
Re: Stupid GCC inline assembly CANNOT even handle local vari
Posted: Mon Jul 05, 2010 1:02 am
by pcmattman
If you use the 'm' constraint you should be passing a specific location (calculated in your C code) - GCC will do all the offsets for you.
As an example, with a uint32_t array "t", you can use the "m" constraint with t[1]. This will let GCC do all the offset stuff (4 bytes) and save you the trouble.
Re: Stupid GCC inline assembly CANNOT even handle local vari
Posted: Mon Jul 05, 2010 2:34 am
by Solar
xuancong wrote:So you still cannot solve the problem, right?
Not for someone with your attitude, no.
Re: Stupid GCC inline assembly CANNOT even handle local vari
Posted: Mon Jul 05, 2010 2:37 am
by xuancong
Solar wrote:xuancong wrote:So you still cannot solve the problem, right?
Not for someone with your attitude, no.
I've solved half of the problem under someone's help and have modified the initial post. Please check!
Re: Stupid GCC inline assembly CANNOT even handle local vari
Posted: Mon Jul 05, 2010 2:55 am
by quok
xuancong wrote:I've solved half of the problem under someone's help and have modified the initial post. Please check!
Sigh, I hate it when people do that. I get so tempted to disable editing of posts whenever I see someone do this. Congratulations, you've just thrown the entire thread out of whack. Nothing here makes sense anymore.
Re: Stupid GCC inline assembly CANNOT even handle local vari
Posted: Mon Jul 05, 2010 3:01 am
by xuancong
quok wrote:xuancong wrote:I've solved half of the problem under someone's help and have modified the initial post. Please check!
Sigh, I hate it when people do that. I get so tempted to disable editing of posts whenever I see someone do this. Congratulations, you've just thrown the entire thread out of whack. Nothing here makes sense anymore.
Well, it's not that bad actually. Since none of the replies in the entire thread solves the actual problem. Nonetheless, the issue is still there that GCC still need to be improved.
Re: Stupid GCC inline assembly CANNOT even handle local vari
Posted: Mon Jul 05, 2010 3:15 am
by Solar
xuancong wrote:Since none of the replies in the entire thread solves the actual problem. Nonetheless, the issue is still there that GCC still need to be improved.
/me glances towards the mods.
"Can I get five minutes alone with him? I won't hurt him
too much."
Just in case you didn't get it already:
GCC inline assembly does the job it has been designed to do, and does it well.
And second:
The problem right now is that you apparently cannot wrap your mind around the concept that a "solution" does not necessarily include someone solving your problem for you, but will involve you doing some thinking on your own. Pointers have been given in plenty.
Request this thread to be closed. I see flames licking up through the floorboards.
Re: Stupid GCC inline assembly CANNOT even handle local vari
Posted: Mon Jul 05, 2010 3:17 am
by quok
Solar wrote:Request this thread to be closed. I see flames licking up through the floorboards.
Request granted.