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]

Re: [discuss] Re: CC register for x86-64 asm statements. Was: glibc: syscalls for x86-64


<<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).


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