diff options
author | Nick Clifton <nickc@redhat.com> | 2016-05-25 14:31:46 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2016-05-25 14:31:46 +0000 |
commit | e56989ffae3cc7e5a61543ad0f7d4da5ddd58a92 (patch) | |
tree | de59939f6868f2a8932edf0c0071fb2027edd3eb /gcc/config/msp430 | |
parent | 69a6d5ad313c1c6d04ca6e08f5270dbeecfdc07e (diff) | |
download | gcc-e56989ffae3cc7e5a61543ad0f7d4da5ddd58a92.zip gcc-e56989ffae3cc7e5a61543ad0f7d4da5ddd58a92.tar.gz gcc-e56989ffae3cc7e5a61543ad0f7d4da5ddd58a92.tar.bz2 |
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
Diffstat (limited to 'gcc/config/msp430')
-rw-r--r-- | gcc/config/msp430/msp430.c | 4 | ||||
-rw-r--r-- | gcc/config/msp430/msp430.h | 1 | ||||
-rw-r--r-- | gcc/config/msp430/msp430.md | 8 |
3 files changed, 12 insertions, 1 deletions
diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c index 2e2a02c..65d5767 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 b2f0764..41862bd 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 abab672..3a3fbf1 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 |