This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
CC register for x86-64 asm statements. Was: glibc: syscalls for x86-64
- To: Andreas Jaeger <aj at suse dot de>
- Subject: CC register for x86-64 asm statements. Was: glibc: syscalls for x86-64
- From: Jan Hubicka <jh at suse dot cz>
- Date: Wed, 22 Nov 2000 10:09:31 +0100
- Cc: 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>
> + : "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?
Honza