> On Jul 27, 2023, at 7:50 AM, Maciej W. Rozycki <ma...@orcam.me.uk> wrote:
> 
> On Fri, 14 Jul 2023, Vladimir Makarov via Gcc wrote:
> 
>>>  On the avr, the stack pointer (SP)
>>>   is not used to access stack slots
>> It is very uncommon target then.
> 
> Same with the VAX target.  SP is used for outgoing function arguments, 
> function calls, alloca only.  AP is used for incoming function arguments 
> and is set automatically by hardware at function entry.  FP is used for 
> local variables and is likewise set by hardware at function entry.

While most other targets maintain FP in software, doesn't the same description 
apply to any target that can have a frame pointer.  The frame pointer may be 
used only some of the time (PDP-11) or always (VAX) but when it's used local 
variable references and argument references would go through FP, not SP, right?

        paul


Reply via email to