[Top][All Lists]

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

Re: [avr-gcc-list] 'MOVW' instruction in new ATtiny.

From: Dmitry K.
Subject: Re: [avr-gcc-list] 'MOVW' instruction in new ATtiny.
Date: Thu, 9 Feb 2006 08:42:17 +1000
User-agent: KMail/1.5

On Thursday 09 February 2006 03:20, Anatoly Sokolov wrote:
> Hello.
> > Whether you plan to add an __AVR_HAVE_LPMX__ ?
> I plan to add 'avr55' architecture for ATmega128(x) devices, for which
> __AVR_HAVE_ELPM__ is defined.
> It will allow to solve a following problem:
> Some functions from 'fplib', for example ' fp_powerseries', always use LPM
> the instruction of access to constants in program memory. (It is supposed
> that constants are located in bottom 64K). For ATmega128 (x) devices there
> will be a error if in the application there will be many constants in
> program memory and constants from 'fplib' will be placed in bottom 64K.

Thanks, my question was about `lpm Rd,Z[+]' instruction.
(LPMX abbreviation is from Binutils's avr.h) .

Some reasonings about ELPM(X).  It is very convinient to declare
RAMPZ as a scratch register like ZL/ZH, for example. Then charges
on access to the expanded memory will be minimal. Otherwise the
program is essentially extended: it is needed to read, save and
restore RAMPZ. This will exclude a possibility of tail optimization
(such optimization is widely used in 'fplib').
   But the announcement of the RAMPZ as a scratch attracts necessity
of its preservation for ISRs (when, for example, an external function
is called from ISR).


reply via email to

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