https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67944

--- Comment #2 from Alex Reinking <alex.reinking at gmail dot com> ---
I expect it to return whatever is currently stored in ebx. Which it does, but
suboptimally. In my particular case, ebx is populated by a system call. I
wanted to put the inline assembly for retrieving that value in its own function
so I wouldn't have to remember the local register variable syntax.

The code I posted is simply a somehow minimal example of the anomalous assembly
generated. The question here is more "Why does gcc emit a push ebx; pop ebx?"
than "How should I retrieve whatever is currently in ebx?"

Reply via email to