This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [discuss] Re: CC register for x86-64 asm statements. Was: glibc: syscalls for x86-64
- To: aj at suse dot de, jh at suse dot cz
- Subject: Re: [discuss] Re: CC register for x86-64 asm statements. Was: glibc: syscalls for x86-64
- From: dewar at gnat dot com (Robert Dewar)
- Date: Wed, 22 Nov 2000 09:14:59 -0500 (EST)
- Cc: discuss at x86-64 dot org, gcc at gcc dot gnu dot org
<<Not really, since most lazy programmers will either forgot the "cc"
clobber - or add it always to be on the safe side.
>>
Part of the trouble here is that the whole apparatus is too low level.
It is not a matter of laziness, but if you step back a moment and look
at a typical C or Ada programmer doing machine code insertions, they
really should not be in the business of knowing the detailed set of
flags that each instruction affects (how many people know which instructions
for example affect AF, or have ever used or heard of AF). The architecture
knows which instructions do what.
Right now, it is far far harder to write machine code insertions in gcc than
to write the corresponding assembler.
We notice this particularly in GNAT, where the machine code insertion
mechanism, though extremely powerful, is very much harder to use than
the mechanism in other Ada compilers (Ada is a little bit different
from C here in that *all* Ada compilers have some mechanism for machine
code insertions, it is required by the standard).