This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]