[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] volatile in pgmspace.h ?
From: |
E. Weddington |
Subject: |
Re: [avr-libc-dev] volatile in pgmspace.h ? |
Date: |
Tue, 17 Jun 2003 15:17:07 GMT |
> > > __LPM_enhanced__ should use "lpm %0,Z" (not Z+).
> >
> >This was added because of a request to add other macros
to
> >allow further contiguous reads of flash without having to
> >provide the address. I knew that this was only going to
be
> >available for the enhanced cores. I wrote an RFC to this
> >list, with little response:
> ><http://mail.nongnu.org/archive/html/avr-libc-dev/2003-
> >06/msg00002.html>
> >However, I haven't implmented this yet. If you feel that
> >they shouldn't be implmented, let me know. I am not
> >attached to it either way.
>
> From my opinion, the most used case is the reading of
several bytes,
> not only one.
> Then the Z+ would be useful for the optimizer.
> If the Z-pointer is not changed, it stays at the same
adress. I can
> hardly imagine a case, where this is useful.
> The Z+ does cost the same time as without increment.
>
> Are there any other reasons, for a decision?
True. But as Marek pointed out, it cannot be guaranteed
that GCC will *not* change the contents of Z between calls
to inline assembly, even if it seems unlikely. If this
cannot be guaranteed, then any advantage of having those
extra _next macros would be moot. This is the main reason
for not including them in avr-libc.
Eric
- [avr-libc-dev] volatile in pgmspace.h ?, Dmitry K., 2003/06/14
- Re: [avr-libc-dev] volatile in pgmspace.h ?, E. Weddington, 2003/06/16
- Re: [avr-libc-dev] volatile in pgmspace.h ?, E. Weddington, 2003/06/16
- Re: [avr-libc-dev] volatile in pgmspace.h ?, Unknown, 2003/06/16
- Re: [avr-libc-dev] volatile in pgmspace.h ?, E. Weddington, 2003/06/16
- Re: [avr-libc-dev] volatile in pgmspace.h ?, E. Weddington, 2003/06/17
- Re: [avr-libc-dev] volatile in pgmspace.h ?,
E. Weddington <=
- Re: [avr-libc-dev] volatile in pgmspace.h ?, E. Weddington, 2003/06/17
- Re: [avr-libc-dev] volatile in pgmspace.h ?, E. Weddington, 2003/06/17