+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
if (args != NULL)
{
+ /* Only the interrupt attribute takes an argument. */
gcc_assert (TREE_NAME_EQ (name, ATTR_INTR));
tree value = TREE_VALUE (args);
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))
{
%{!msim:-lnosys} \
--end-group \
%{!T*:%{!msim:%{mmcu=*:--script=%*.ld}}} \
-%{!T*:%{!msim:%{!mmcu=*:%Tmsp430.ld}}} \
%{!T*:%{msim:%{mlarge:%Tmsp430xl-sim.ld}%{!mlarge:%Tmsp430-sim.ld}}} \
"
\f
"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