Re: [cc65] Optimizing code fails - Found the error!

Date view Thread view Subject view

From: Groepaz (groepaz_at_gmx.net)
Date: 2003-11-22 21:29:55


On Saturday 22 November 2003 21:13, Geoffrey Wossum wrote:

> For gcc on the AVR microcontrollers, there's an __interrupt__ attribute
> that is used for ISR's, which insures that proper prologue and epilogue
> code is generated.  When writing ISR's for avr-gcc, two macros are
> provided, INTERRUPT and SIGNAL.  They're virtually identical, except
> INTERRUPT re-enables global interrupts right after the prologue code. 
> There's also names for every possible interrupt vector, such as
> SIG_UART0_RECV, which translates to something like __vector11.  So to write
> an ISR in C using avr-gcc, you write:

[...]

i'd prefer a clean solution based on function attributes....since thats
a mechanism that could allow for some other nice features aswell (like
in gcc, alignment, "naked" functions without the c-ish pro/epilogue etc
- and ofcourse also irq handlers)..... the attribute thing could solve
other issues aswell, like explicitly placing certain variables or
functions into specific segments (__attribute__(("segment=myzeropage")) ...).

however, if i understood previous discussions correctly, cc65 doesnt have
that kinda attribute functionality yet even internally, so it might take
some effort to implement.

gpz

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-11-22 21:39:41 CET