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]
Other format: [Raw text]

Re: MS/CW-style inline assembly for GCC



On May 4, 2004, at 15:00, Stan Shebs wrote:

That's why I said "were" poorly documented - it's much better than it used to be.

It's still kind of mysterious to developers though; for instance in
the PowerPC case, sometimes you have to use "b" and other times "r"
for a register, because r0 is not a "base register" and can't be used
in all the same contexts. Worse, the mistaken choice of "r" may not
bite immediately, depending on how the phase of the moon is affecting
register allocation, then manifests itself as a assembler complaint
about a register not mentioned in the source code. After a couple
experiences like that, developers spew all over us about GCC's
lameness and go back to CodeWarrior. :-)

But this is a documentation defect for rs6000 rather than a defect in the style.
I386's documentation for their constraints are hugely better than rs6000.
But then again if the person who is writing the asm does not know if the
register should be an address base register or not, they should not be writing the
asm in the first place as they would get it wrong even if the constrains for
rs6000 are better documented and most likely the inline-asm which you are providing
with the CW/MS style of inline asm will not produce optimal code or unless you
actually parse the asm and know what each instruction takes. If that is done
then you are going to integrate gas into GCC or even better just update the
current binutils so that it can assemble into mach-o object files and the other
targets where GNU binutils does not work right?


Thanks,
Andrew Pinski


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