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.
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.
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.
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.
Every good solution is obvious once you've found it.