This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
GCC with __asm__ generic temporary register query
- From: Darryl Miles <darryl-mailinglists at netbauds dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Sun, 24 Jun 2007 12:04:24 +0100
- Subject: GCC with __asm__ generic temporary register query
Hello,
Is it possible to ask GCC to allocate a register but not have to assign
it a local variable (because its a temporary register used in the
__asm__ block) ?
This way GCC knows that register is clobbered and allocated but does not
need to generate any load or store to the local variable before/after
the insertion of the __asm__ block.
The usual syntax would be like:
__asm__ __volatile__ (
"nop"
: "=r" ((local_output_var))
: "r" ((local_input_var))
: /* clobber list */
);
I'd essentially asking to do away with the "((local_foobar_var))" part,
since I just want a register substituted for "%0" and/or "%1" that is
not reciprocated with a C variable.
Thanks,
Darryl