[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Support for ATMega256 and ATMega2560
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] Support for ATMega256 and ATMega2560 |
Date: |
Fri, 14 May 2004 15:42:26 +0200 (MET DST) |
Marek Michalkiewicz <address@hidden> wrote:
> - 2 bytes are not enough for function pointers, possible solutions:
> - require that if you take the address of a function, that
> function must be placed in the low 64K words (special section? -
> I don't know if the linker can do that automagically)
Perhaps by using a jump table for all indirect functions.
I'd consider this a crock though.
> - align functions so that a few low bits of the pointer are
> always zero, and store pointers shifted right; at runtime, shift
> the pointer left and load the high bits into EIND, then use
> EICALL; EIND must be saved/restored if used in interrupt
> handlers
Hmm, that sounds even more hacky to me. :)
> - add support for 3-byte (PSImode) pointers to GCC - this may be
> quite a lot of work, and all pointers will have this size (not
> just program memory pointers, because GCC core doesn't support
> pointers of different sizes as far as I know)
I can't understand this (but then, I don't know much of the internals
of GCC). It wouldn't even depend on ROM vs. RAM (though obviously,
ROM pointers > 16 bits size might be useful to overcome the 64 KB for
ROM constants barrier), for that purpose, only function pointers were
affected. Why can't GCC tell a function pointer apart from a data
pointer (both, at definition and at dereferencation)?
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/
- [avr-gcc-list] Re: Structs in program memory., Douglas Dotson, 2004/05/10
- Re: [avr-gcc-list] Re: Structs in program memory., Christian Ludlam, 2004/05/11
- Re: [avr-gcc-list] Re: Structs in program memory., Douglas Dotson, 2004/05/11
- Re: [avr-gcc-list] Re: Structs in program memory., Christian Ludlam, 2004/05/11
- [avr-gcc-list] Support for ATMega256 and ATMega2560, Geir Tore Olsen, 2004/05/12
- Re: [avr-gcc-list] Support for ATMega256 and ATMega2560, Theodore A. Roth, 2004/05/12
- Re: [avr-gcc-list] Support for ATMega256 and ATMega2560, Joerg Wunsch, 2004/05/13
- Re: [avr-gcc-list] Support for ATMega256 and ATMega2560, Marek Michalkiewicz, 2004/05/13
- RE: [avr-gcc-list] Support for ATMega256 and ATMega2560, Geir Tore Olsen, 2004/05/13
- Re: [avr-gcc-list] Support for ATMega256 and ATMega2560, Theodore A. Roth, 2004/05/13
- Re: [avr-gcc-list] Support for ATMega256 and ATMega2560,
Joerg Wunsch <=
- Message not available
- Re: [avr-gcc-list] Support for ATMega256 and ATMega2560, Joerg Wunsch, 2004/05/14