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


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

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




 > Speaking of link/unlk - is there any way to turn it off within one
 > function? 

No. You can turn out for a whole file with -fomit-frame-pointer but
not for individual functions.

 > Why does the compiler insert "link a6,0"?
 
Because it still creates a stack frame. It does not allocate space but 
creates a reference for arguments and a link to the calling function's 
frame.
 
 > Also, how does it deal with the stack and local variables when you
 > turn it off entirely?
 
Then it will reference everything relative to the stack pointer.
If you don't use SP modifying stuff (like alloca()) the generated code 
is just as efficient as with frame pointer (even more, for the
link/unlk is omitted) but debugging is much harder (because you can't
walk through the activation records).

 > On a completely unrelated note: are higher-priority interrupts 
 > triggered when you are inside another interrupt?
 
Unless in the lower level interrupt routine explicitly disables 
them they can come in - that's the whole idea for having various
levels. When an interrupt is accepted by the CPU it disables further
interrupts on its own level and all below that. (Except for level 7 
which disables everything below itself but can't disable its own level.)
All higher level interrupts will still be accepted.

Regards,

Zoltan


Follow-Ups: References: