Dave Rivers wrote about the "clobber list".
I'd say that IBM's C does have a "clobber list" for __ASM. 

My question would be whether GCC would have the same result for the 
example that was posed, where the function return was unconditional and 
there were no outputs identified in the "clobber list" so that, at least 
as far as the "clobber list" is concerned, the __asm had no identified 
effect.

What would GCC ask their users to identify as "clobbered" if they (for 
example) just wanted the __ASM to issue linkage instructions to a routine 
that did some sort of "print"? It could indicate that regs 0,1,14,15 are 
clobbered (which this did), but that would not be relevant to the function 
return.

And does GCC, as IBM C, feel free to remove the __ASM (or whatever the GCC 
analog is) in the specific case being discussed? If not, why not?

Peter Relson
z/OS Core Technology Design

Reply via email to