Commit e56989ff by Nick Clifton Committed by Nick Clifton

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
parent 69a6d5ad
2016-05-25 Nick Clifton <nickc@redhat.com>
* 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 <rguenther@suse.de>
PR tree-optimization/71261
......
......@@ -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))
{
......
......@@ -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}}} \
"
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment