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]

Re: gcc optimises out test of value in register-only loop


On 10/14/2011 05:41 AM, Ian Lance Taylor wrote:
> MikeW <mw_phil@yahoo.co.uk> writes:
> 
>>   volatile register int stop_loop __asm("r5")__;
> 
> gcc does not support volatile register variables.  I think it could be
> meaningful, but it has never worked.

It would be really nasty to implement: we'd have to check for volatility
on every access to a hard register.  The benefits don't seem worth it,
IMO.

Andrew.


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