1 Index: gcc-4.2.2/gcc/config/avr32/avr32.c
2 ===================================================================
3 --- gcc-4.2.2.orig/gcc/config/avr32/avr32.c 2008-09-19 14:29:20.000000000 +0200
4 +++ gcc-4.2.2/gcc/config/avr32/avr32.c 2008-09-19 14:30:02.000000000 +0200
7 if (TREE_CODE (*node) != FUNCTION_DECL)
9 - warning ("`%s' attribute only applies to functions",
10 + warning (OPT_Wattributes,"`%s' attribute only applies to functions",
11 IDENTIFIER_POINTER (name));
16 if (avr32_isr_value (args) == AVR32_FT_UNKNOWN)
18 - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
19 + warning (OPT_Wattributes,"`%s' attribute ignored", IDENTIFIER_POINTER (name));
27 - warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
28 + warning (OPT_Wattributes,"`%s' attribute ignored", IDENTIFIER_POINTER (name));
34 if (TREE_CODE (*node) != FUNCTION_DECL)
36 - warning ("%qs attribute only applies to functions",
37 + warning (OPT_Wattributes,"%qs attribute only applies to functions",
38 IDENTIFIER_POINTER (name));
41 @@ -1866,13 +1866,13 @@
43 if (TREE_CODE (*node) == FUNCTION_TYPE || TREE_CODE (*node) == METHOD_TYPE)
45 - warning ("`%s' attribute not yet supported...",
46 + warning (OPT_Wattributes,"`%s' attribute not yet supported...",
47 IDENTIFIER_POINTER (name));
52 - warning ("`%s' attribute only applies to functions",
53 + warning (OPT_Wattributes,"`%s' attribute only applies to functions",
54 IDENTIFIER_POINTER (name));
57 @@ -4215,51 +4215,6 @@
61 -avr32_asm_output_ascii (FILE * stream, char *ptr, int len)
64 - char *new_ptr = xmalloc (4 * len);
65 - if (new_ptr == NULL)
66 - internal_error ("Out of memory.");
68 - for (i = 0; i < len; i++)
72 - new_ptr[i_new++] = '\\';
73 - new_ptr[i_new++] = '0';
74 - new_ptr[i_new++] = '1';
75 - new_ptr[i_new++] = '2';
77 - else if (ptr[i] == '\"')
79 - new_ptr[i_new++] = '\\';
80 - new_ptr[i_new++] = '\"';
82 - else if (ptr[i] == '\\')
84 - new_ptr[i_new++] = '\\';
85 - new_ptr[i_new++] = '\\';
87 - else if (ptr[i] == '\0' && i + 1 < len)
89 - new_ptr[i_new++] = '\\';
90 - new_ptr[i_new++] = '0';
94 - new_ptr[i_new++] = ptr[i];
98 - /* Terminate new_ptr. */
99 - new_ptr[i_new] = '\0';
100 - fprintf (stream, "\t.ascii\t\"%s\"\n", new_ptr);
106 avr32_asm_output_label (FILE * stream, const char *name)
108 name = avr32_strip_name_encoding (name);
109 @@ -4444,12 +4399,15 @@
111 rtx cmp_op0, cmp_op1;
115 if ( GET_CODE (exp) == COND_EXEC )
117 cmp_op0 = XEXP (COND_EXEC_TEST (exp), 0);
118 cmp_op1 = XEXP (COND_EXEC_TEST (exp), 1);
119 cond = COND_EXEC_TEST (exp);
121 + dest = SET_DEST (COND_EXEC_CODE (exp));
125 /* If then else conditional. compare operands are in operands
126 @@ -4457,6 +4415,7 @@
127 cmp_op0 = recog_data.operand[4];
128 cmp_op1 = recog_data.operand[5];
129 cond = recog_data.operand[1];
130 + dest = SET_DEST (exp);
133 if ( GET_CODE (cmp_op0) == AND )
134 @@ -4466,7 +4425,15 @@
138 - if (is_compare_redundant (cmp, cond) == NULL_RTX)
139 + /* Check if the conditional insns updates a register present
140 + in the comparison, if so then we must reset the cc_status. */
142 + && (reg_mentioned_p (dest, cmp_op0)
143 + || reg_mentioned_p (dest, cmp_op1)))
147 + else if (is_compare_redundant (cmp, cond) == NULL_RTX)
149 /* Reset the nonstandard flag */