A89: Re: Re: placing data into C variables from ASM(" ") constructs


[Prev][Next][Index][Thread]

A89: Re: Re: placing data into C variables from ASM(" ") constructs




 > What did the older versions do if you *did* put an input register as being
 > clobbered? 
 
Barfed about it, it did not understand it. It was way before egcs,
though.
 
 > In my program I have three asm() sections with no code in-between
 > (apart from gcc:s register loading) and I use the same pointer as an input in
 > the first and the last sections... however, it seems that unless I tell gcc to
 > make that pointer volatile it ignores the fact that it has been clobbered in the
 > first section, making the pointer useless in the last :(

It might be a compiler bug. Can you send me (in private email) a
snipet of code that demonstrates the erroneous behaviour ?
 
 > Oh, and on the page where Xav got the cross-compiler from it says it's based on
 > EGCS-1.1.2, if that tells you anything.

Egcs is a new compiler that is supposed to be a substitute for gcc. 
I found egcs for the m68k to be somewhat worse than gcc was so I prefer
gcc. They supposed to be merged sometime in the not very far future.
I hope they will use gcc's code generator.

Beware that the compiler behaviour with regards to volatile objects is 
very unpredictable, I currently have an argument with the gcc people
about the interpretation of the C standard - the standard leaves way
too much freedom for the compiler to treat volatile objects in a
completely unexpected way.

Regards,

Zoltan


Follow-Ups: References: