CC register for x86-64 asm statements. Was: glibc: syscalls for x86-64

Eric W. Biederman ebiederm@xmission.com
Thu Nov 23 02:28:00 GMT 2000


Jan Hubicka <jh@suse.cz> writes:

> > + : "i" (__NR_##name) ASM_ARGS_##nr : "memory", "cc", "r11", "cx"); \
> 
> 
> This is good point for the disucussion.  The i386 backend has been born
> as cc0 target, that assumes every instruction to clobber flags, so in i386
> code, the "cc" in clobber list has no effect.
> 
> The new i386 backend implementation has flags modelled as register and thus
> does know about instructions not modifying flags and can use this information
> for schedulilng (as well as some other optimizations).
> To remain backward compatible with old i386 code, every asm statement implicitly
> 
> gets the "cc" clobber.
> 
> Now the question is, whether we want to stay at safe ground and inherit
> this behaviour from i386 code, or want to require the proper "cc" mentioned
> in the clobber list.
> To my opinion, the second solution is cleaner, but most likely brings just
> small improvements and most probably lots of problems for developers.
> So I would preffer to stay with the current scheme.
>
> Someone is against?

I would simply ask is there a way to specify a no clobber condition?

If we could instead of specifying "cc" specify "nocc" in the clobbers
we get the same theoretical advantages with less danger. 

Eric


More information about the Gcc mailing list