From: Nick Clifton Date: Wed, 25 May 2016 14:31:46 +0000 (+0000) Subject: msp430.c (msp430_attr): Produce an error if a static interrupt handler is detected. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e56989ffae3cc7e5a61543ad0f7d4da5ddd58a92;p=gcc.git msp430.c (msp430_attr): Produce an error if a static interrupt handler is detected. * config/msp430/msp430.c (msp430_attr): Produce an error if a static interrupt handler is detected. * config/msp430/msp430.h (LIB_SPEC): Do not use msp430.ld as the default linker script. * config/msp430/msp430.md (movpsihi2_lo): New pattern for loading the low part of a symbolic pointer. From-SVN: r236704 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aca886c90cb..d7eb4333d1d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2016-05-25 Nick Clifton + + * config/msp430/msp430.c (msp430_attr): Produce an error if a + static interrupt handler is detected. + * config/msp430/msp430.h (LIB_SPEC): Do not use msp430.ld as the + default linker script. + * config/msp430/msp430.md (movpsihi2_lo): New pattern for loading + the low part of a symbolic pointer. + 2016-05-25 Richard Biener PR tree-optimization/71261 diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c index 2e2a02c0d1a..65d5767d73d 100644 --- a/gcc/config/msp430/msp430.c +++ b/gcc/config/msp430/msp430.c @@ -1832,6 +1832,7 @@ msp430_attr (tree * node, if (args != NULL) { + /* Only the interrupt attribute takes an argument. */ gcc_assert (TREE_NAME_EQ (name, ATTR_INTR)); tree value = TREE_VALUE (args); @@ -1878,6 +1879,9 @@ msp430_attr (tree * node, if (TREE_CODE (TREE_TYPE (* node)) == FUNCTION_TYPE && ! VOID_TYPE_P (TREE_TYPE (TREE_TYPE (* node)))) message = "interrupt handlers must be void"; + + if (! TREE_PUBLIC (* node)) + message = "interrupt handlers cannot be static"; } else if (TREE_NAME_EQ (name, ATTR_REENT)) { diff --git a/gcc/config/msp430/msp430.h b/gcc/config/msp430/msp430.h index b2f0764565f..41862bd7c76 100644 --- a/gcc/config/msp430/msp430.h +++ b/gcc/config/msp430/msp430.h @@ -98,7 +98,6 @@ extern const char * msp430_select_hwmult_lib (int, const char **); %{!msim:-lnosys} \ --end-group \ %{!T*:%{!msim:%{mmcu=*:--script=%*.ld}}} \ -%{!T*:%{!msim:%{!mmcu=*:%Tmsp430.ld}}} \ %{!T*:%{msim:%{mlarge:%Tmsp430xl-sim.ld}%{!mlarge:%Tmsp430-sim.ld}}} \ " diff --git a/gcc/config/msp430/msp430.md b/gcc/config/msp430/msp430.md index abab672a956..3a3fbf10ebe 100644 --- a/gcc/config/msp430/msp430.md +++ b/gcc/config/msp430/msp430.md @@ -267,6 +267,14 @@ "PUSH.W\t%H1 { PUSH.W\t%L1 { POPM.A #1, %0 ; Move reg-pair %L1:%H1 into pointer %0" ) +;; Produced when converting a pointer to an integer via a union, eg gcc.dg/pr47201.c. +(define_insn "*movpsihi2_lo" + [(set (match_operand:HI 0 "register_operand" "=r") + (subreg:HI (match_operand:PSI 1 "msp430_symbol_operand" "i") 0))] + "msp430x" + "MOVA\t%1, %0" +) + ;;------------------------------------------------------------ ;; Math