This is the mail archive of the
mailing list for the GCC project.
Re: PATCH: Fix 20000724-1.c
Linus Torvalds <firstname.lastname@example.org> writes:
> Would it be horrible to implement asm's internally as control transfer
> instructions to a "magic subroutine"?
asms are not quite like subroutine calls. For instance, in this routine:
result = get_something ();
/* something here (perhaps just a complicated expression that runs
the machine out of registers) that forces 'result' into memory */
asm ("whatever" : : : "memory");
If 'result' is in memory, then it needs to be re-loaded after the
'asm' statement; but if the 'asm' was a call, then 'result' could
be loaded before the call if that looked like a good idea.
- Geoffrey Keating <email@example.com>