parent
44756fe93c
commit
6d02667c07
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,32 @@ |
||||
--- a/gcc/config/avr32/avr32.c
|
||||
+++ b/gcc/config/avr32/avr32.c
|
||||
@@ -6726,7 +6726,28 @@ avr32_reorg_optimization (void)
|
||||
}
|
||||
}
|
||||
|
||||
- if (TARGET_MD_REORG_OPTIMIZATION && (optimize_size || (optimize > 0)))
|
||||
+ /* Disabled this optimization since it has a bug */
|
||||
+ /* In the case where the data instruction the shifted insn gets folded
|
||||
+ * into is a branch destination, this breaks, i.e.
|
||||
+ *
|
||||
+ * add r8, r10, r8 << 2
|
||||
+ * 1:
|
||||
+ * ld.w r11, r8[0]
|
||||
+ * ...
|
||||
+ * mov r8, sp
|
||||
+ * rjmp 1b
|
||||
+ *
|
||||
+ * gets folded to:
|
||||
+ *
|
||||
+ * 1:
|
||||
+ * ld.w r11, r10[r8 << 2]
|
||||
+ * ...
|
||||
+ * mov r8, sp
|
||||
+ * rjmp 1b
|
||||
+ *
|
||||
+ * which is clearly wrong..
|
||||
+ */
|
||||
+ if (0 && TARGET_MD_REORG_OPTIMIZATION && (optimize_size || (optimize > 0)))
|
||||
{
|
||||
|
||||
/* Scan through all insns looking for shifted add operations */
|
@ -0,0 +1,32 @@ |
||||
--- a/gcc/config/avr32/avr32.c
|
||||
+++ b/gcc/config/avr32/avr32.c
|
||||
@@ -222,14 +222,14 @@ void
|
||||
avr32_override_options (void)
|
||||
{
|
||||
const struct part_type_s *part;
|
||||
- const struct arch_type_s *arch;
|
||||
+ const struct arch_type_s *arch, *part_arch;
|
||||
|
||||
/*Add backward compability*/
|
||||
if (strcmp ("uc", avr32_arch_name)== 0)
|
||||
{
|
||||
fprintf (stderr, "Warning: Deprecated arch `%s' specified. "
|
||||
"Please use '-march=ucr1' instead. "
|
||||
- "Converting to arch 'ucr1'\n",
|
||||
+ "Using arch 'ucr1'\n",
|
||||
avr32_arch_name);
|
||||
avr32_arch_name="ucr1";
|
||||
}
|
||||
@@ -277,6 +277,12 @@ avr32_override_options (void)
|
||||
if (!arch->name)
|
||||
avr32_arch = &avr32_arch_types[avr32_part->arch_type];
|
||||
|
||||
+ /* When architecture implied by -mpart and one passed in -march are
|
||||
+ * conflicting, issue an error message */
|
||||
+ part_arch = &avr32_arch_types[avr32_part->arch_type];
|
||||
+ if (strcmp("none",avr32_part_name) && strcmp("none", avr32_arch_name) && strcmp(avr32_arch_name,part_arch->name))
|
||||
+ error ("Conflicting architectures implied by -mpart and -march\n");
|
||||
+
|
||||
/* If optimization level is two or greater, then align start of loops to a
|
||||
word boundary since this will allow folding the first insn of the loop.
|
||||
Do this only for targets supporting branch prediction. */
|
@ -0,0 +1,21 @@ |
||||
--- a/gcc/config/avr32/lib1funcs.S
|
||||
+++ b/gcc/config/avr32/lib1funcs.S
|
||||
@@ -1460,7 +1460,6 @@ __avr32_f64_cmp_lt:
|
||||
0:
|
||||
ld.w r7, sp++
|
||||
popm pc, r12=0
|
||||
-#endif
|
||||
|
||||
3:
|
||||
cp.w r7, 1 /* Check sign bit from r9 */
|
||||
@@ -1481,8 +1480,8 @@ __avr32_f64_cmp_lt:
|
||||
reteq 0 /* Both operands are zero. Return false. */
|
||||
#endif
|
||||
ret r12
|
||||
-
|
||||
-
|
||||
+#endif
|
||||
+
|
||||
#if defined(L_avr32_f64_div) || defined(L_avr32_f64_div_fast)
|
||||
.align 2
|
||||
|
Loading…
Reference in new issue