Re: [PATCH] [MSP430] Allow interrupt handers to be static and fix __interrupt__ attribute causing an ICE

2018-06-06 Thread Jozef Lawrynowicz
On 29/05/18 23:55, DJ Delorie wrote: Jozef Lawrynowicz writes: If an argument is passed to the interrupt attribute, GCC will create a section for the interrupt vector when outputting the assembly. This, combined with the code to ensure the interrupt function doesn't get optimized out, ensures t

Re: [PATCH] [MSP430] Allow interrupt handers to be static and fix __interrupt__ attribute causing an ICE

2018-05-29 Thread DJ Delorie
Jozef Lawrynowicz writes: > If an argument is passed to the interrupt attribute, GCC will create a section > for the interrupt vector when outputting the assembly. This, combined with the > code to ensure the interrupt function doesn't get optimized out, ensures the > symbol for the interrupt func

Re: [PATCH] [MSP430] Allow interrupt handers to be static and fix __interrupt__ attribute causing an ICE

2018-05-29 Thread Jozef Lawrynowicz
On 29/05/18 19:45, DJ Delorie wrote: The reason I required interrupt handlers to be non-static is because the linker builds the interrupt handler table using weak references. If the handler is static, it won't be added to the table, and never called. So you'd need a test to ensure that the hand

Re: [PATCH] [MSP430] Allow interrupt handers to be static and fix __interrupt__ attribute causing an ICE

2018-05-29 Thread DJ Delorie
The reason I required interrupt handlers to be non-static is because the linker builds the interrupt handler table using weak references. If the handler is static, it won't be added to the table, and never called. So you'd need a test to ensure that the handler was properly entered into the tab

Re: [PATCH] [MSP430] Allow interrupt handers to be static and fix __interrupt__ attribute causing an ICE

2018-05-27 Thread Jozef Lawrynowicz
On 27/05/18 14:19, Jozef Lawrynowicz wrote: If the patch is acceptable, I would appreciate if someone would commit it for me, as I don't have write access. "msp430.md" in the ChangeLog entry should be "msp430.c".

[PATCH] [MSP430] Allow interrupt handers to be static and fix __interrupt__ attribute causing an ICE

2018-05-27 Thread Jozef Lawrynowicz
Some users have a preference for declaring interrupt handlers as static functions, as this enforces that interrupts should not be called directly (from other source files at least). This patch allows interrupt handlers to be declared as static and also fixes an assertion failure when the interrup