This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: CC register for x86-64 asm statements. Was: glibc: syscalls for x86-64
- To: Jan Hubicka <jh at suse dot cz>
- Subject: Re: CC register for x86-64 asm statements. Was: glibc: syscalls for x86-64
- From: ebiederm at xmission dot com (Eric W. Biederman)
- Date: 23 Nov 2000 01:30:31 -0700
- Cc: Andreas Jaeger <aj at suse dot de>, patches at x86-64 dot org, discuss at x86-64 dot org, gcc at gcc dot gnu dot org
- References: <hor945bdsz.fsf@gee.suse.de> <20001122100931.E29230@atrey.karlin.mff.cuni.cz>
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