This is the mail archive of the gcc@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]

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


> +    : "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

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