[Top][All Lists]

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

Re: [avr-gcc-list] code for 90s4433 is using SPH

From: Volkmar Dierkes
Subject: Re: [avr-gcc-list] code for 90s4433 is using SPH
Date: Sun, 23 Feb 2003 20:08:58 +0100
User-agent: 40tude_Dialog/ Hamster/

On Sun, 23 Feb 2003 19:37:01 +0100, Marek Michalkiewicz wrote:

> On Sun, Feb 23, 2003 at 07:09:09PM +0100, Volkmar Dierkes wrote:
>> But another issue what happens at the time when accessing local 
>> variables: The Y-register is loaded with SPH and SPL and an offset. 
>> If tiny-stack is used, only SPL is valid, so YH should be loaded 
>> with 0 instead of SPH. My opinion.
> Well, but the non-existent SPH should read as zero anyway.
> Or are there any devices where this is not true?

As I have found in the data sheet SPH is defined as reserved. There 
is no hint that it is always zero.

> SPH doesn't have to be zero with -mtiny-stack.  On a device with 512
> bytes of SRAM (0x60 ... 0x25f), SP could be initialized as 0x25f,
> and -mtiny-stack can still be used as long as the stack never grows
> below 0x200 (96 bytes of stack - reasonable for many applications).

The main reason for my initial question is the simulation 
environment that I am using. It is VMLAB. For devices such the 4433 
VMLAB responds to an access to SPH with 'no valid address' (write) 
or with an undefined value (read). In this case this results to an 
undefined value for YH and there is no possibility to simulate this 

I am already in contact with the guys of VMLAB to get a workaround, 
but I think the avr-gcc behavior should be to didn't use SPH for 
devices where it didn't exist.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]