Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msp430: no optimization fix #5188

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cpu/cc430/cc430-adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ uint16_t adc12_single_conversion(uint16_t ref, uint16_t sht, uint16_t channel)
* @param none
* @return none
*************************************************************************************************/
interrupt(ADC12_VECTOR) __attribute__((naked)) adc_isr(void)
interrupt(ADC12_VECTOR) __attribute__((naked, optimize("omit-frame-pointer"),
no_instrument_function)) adc_isr(void)
{
__enter_isr();

Expand Down
4 changes: 2 additions & 2 deletions cpu/cc430/cc430-gpioint.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ bool gpioint_set(int port, uint32_t bitmask, int flags, fp_irqcb callback)
return 1;
}

interrupt(PORT1_VECTOR) __attribute__((naked)) port1_isr(void)
interrupt(PORT1_VECTOR) port1_isr(void)
{
uint8_t int_enable, ifg_num, p1ifg;
uint16_t p1iv;
Expand Down Expand Up @@ -188,7 +188,7 @@ interrupt(PORT1_VECTOR) __attribute__((naked)) port1_isr(void)
__exit_isr();
}

interrupt(PORT2_VECTOR) __attribute__((naked)) port2_isr(void)
interrupt(PORT2_VECTOR) port2_isr(void)
{
uint8_t int_enable, ifg_num, p2ifg;
uint16_t p2iv;
Expand Down
3 changes: 2 additions & 1 deletion cpu/cc430/periph/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ void rtc_clear_alarm(void)
RTCCTL0 &= ~RTCAIE;
}

interrupt(RTC_VECTOR) __attribute__((naked)) rtc_isr(void)
interrupt(RTC_VECTOR) __attribute__((naked, optimize("omit-frame-pointer"),
no_instrument_function)) rtc_isr(void)
{
__enter_isr();

Expand Down
6 changes: 4 additions & 2 deletions cpu/cc430/periph/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ void timer_irq_disable(tim_t dev)
/* TODO: not supported, yet */
}

ISR(TIMER_ISR_CC0, isr_timer_a_cc0)
void __attribute__((naked, optimize("omit-frame-pointer"), no_instrument_function,
interrupt (TIMER_ISR_CC0))) isr_timer_a_cc0(void)
{
__enter_isr();

Expand All @@ -135,7 +136,8 @@ ISR(TIMER_ISR_CC0, isr_timer_a_cc0)
__exit_isr();
}

ISR(TIMER_ISR_CCX, isr_timer_a_ccx_isr)
void __attribute__((optimize("omit-frame-pointer"), no_instrument_function,
interrupt (TIMER_ISR_CCX))) isr_timer_a_ccx_isr(void)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cgundogan Is it on purpose this ISR is not naked?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, otherwise the compiler would give messages like described #4954

{
__enter_isr();

Expand Down
3 changes: 2 additions & 1 deletion cpu/msp430-common/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
* for thread_yield_higher(), since we rely on the RETI instruction at the end
* of its execution, in the inlined __restore_context() sub-function
*/
__attribute__((naked)) void thread_yield_higher(void)
__attribute__((naked, optimize("omit-frame-pointer"),
no_instrument_function)) void thread_yield_higher(void)
{
__asm__("push r2"); /* save SR */
__disable_irq();
Expand Down
6 changes: 4 additions & 2 deletions cpu/msp430fxyz/periph/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,16 @@ static inline void isr_handler(msp_port_isr_t *port, int ctx)
}
}

ISR(PORT1_VECTOR, isr_port1)
void __attribute__((naked, optimize("omit-frame-pointer"), no_instrument_function,
interrupt (PORT1_VECTOR))) isr_port1(void)
{
__enter_isr();
isr_handler((msp_port_isr_t *)PORT_1, 0);
__exit_isr();
}

ISR(PORT2_VECTOR, isr_port2)
void __attribute__((naked, optimize("omit-frame-pointer"), no_instrument_function,
interrupt (PORT2_VECTOR))) isr_port2(void)
{
__enter_isr();
isr_handler((msp_port_isr_t *)PORT_2, 8);
Expand Down
6 changes: 4 additions & 2 deletions cpu/msp430fxyz/periph/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ void timer_irq_disable(tim_t dev)
/* TODO: not supported, yet */
}

ISR(TIMER_ISR_CC0, isr_timer_a_cc0)
void __attribute__((naked, optimize("omit-frame-pointer"), no_instrument_function,
interrupt (TIMER_ISR_CC0))) isr_timer_a_cc0(void)
{
__enter_isr();

Expand All @@ -135,7 +136,8 @@ ISR(TIMER_ISR_CC0, isr_timer_a_cc0)
__exit_isr();
}

ISR(TIMER_ISR_CCX, isr_timer_a_ccx)
void __attribute__((optimize("omit-frame-pointer"), no_instrument_function,
interrupt (TIMER_ISR_CCX))) isr_timer_a_ccx(void)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question as above.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same answer as above.

{
__enter_isr();

Expand Down
3 changes: 2 additions & 1 deletion cpu/msp430fxyz/periph/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ void uart_poweroff(uart_t uart)
UART_ME &= ~(UART_ME_BITS);
}

ISR(UART_RX_ISR, isr_uart_0_rx)
void __attribute__((optimize("omit-frame-pointer"), no_instrument_function,
interrupt (UART_RX_ISR))) isr_uart_0_rx(void)
{
__enter_isr();

Expand Down