add the latest avr32 toolchain patches (with additional fixes)
SVN-Revision: 27332
This commit is contained in:
		| @@ -4661,7 +4661,7 @@ | |||||||
| +{ | +{ | ||||||
| +  int i, x; | +  int i, x; | ||||||
| + | + | ||||||
| +  fprintf (stream, _("Known architecture names:")); | +  fprintf (stream, _("Architectures supported by the assembler:")); | ||||||
| +  x = 1000; | +  x = 1000; | ||||||
| + | + | ||||||
| +  for (i = 0; arch_types[i].name; i++) | +  for (i = 0; arch_types[i].name; i++) | ||||||
| @@ -4771,7 +4771,7 @@ | |||||||
| +          { | +          { | ||||||
| +            as_warn("Deprecated arch `%s' specified. " | +            as_warn("Deprecated arch `%s' specified. " | ||||||
| +                    "Please use '-march=ucr1' instead. " | +                    "Please use '-march=ucr1' instead. " | ||||||
| +                    "Converting to arch 'ucr1'\n", | +                    "Using to arch 'ucr1'\n", | ||||||
| +                     s); | +                     s); | ||||||
| +            s="ucr1"; | +            s="ucr1"; | ||||||
| +          } | +          } | ||||||
|   | |||||||
| @@ -9313,7 +9313,7 @@ | |||||||
| +#define FATAL_EXIT_CODE 33 | +#define FATAL_EXIT_CODE 33 | ||||||
| --- a/gcc/config.gcc | --- a/gcc/config.gcc | ||||||
| +++ b/gcc/config.gcc | +++ b/gcc/config.gcc | ||||||
| @@ -2321,6 +2321,34 @@ spu-*-elf*) | @@ -2339,6 +2339,34 @@ spu-*-elf*) | ||||||
|  	c_target_objs="${c_target_objs} spu-c.o" |  	c_target_objs="${c_target_objs} spu-c.o" | ||||||
|  	cxx_target_objs="${cxx_target_objs} spu-c.o" |  	cxx_target_objs="${cxx_target_objs} spu-c.o" | ||||||
|  	;; |  	;; | ||||||
|   | |||||||
| @@ -239,7 +239,7 @@ | |||||||
|  @item -Wstack-protector |  @item -Wstack-protector | ||||||
|  @opindex Wstack-protector |  @opindex Wstack-protector | ||||||
|  @opindex Wno-stack-protector |  @opindex Wno-stack-protector | ||||||
| @@ -5720,7 +5736,7 @@ so, the first branch is redirected to ei | @@ -5721,7 +5737,7 @@ so, the first branch is redirected to ei | ||||||
|  second branch or a point immediately following it, depending on whether |  second branch or a point immediately following it, depending on whether | ||||||
|  the condition is known to be true or false. |  the condition is known to be true or false. | ||||||
|   |   | ||||||
| @@ -248,7 +248,7 @@ | |||||||
|   |   | ||||||
|  @item -fsplit-wide-types |  @item -fsplit-wide-types | ||||||
|  @opindex fsplit-wide-types |  @opindex fsplit-wide-types | ||||||
| @@ -5865,7 +5881,7 @@ safely dereference null pointers.  Use | @@ -5866,7 +5882,7 @@ safely dereference null pointers.  Use | ||||||
|  @option{-fno-delete-null-pointer-checks} to disable this optimization |  @option{-fno-delete-null-pointer-checks} to disable this optimization | ||||||
|  for programs which depend on that behavior. |  for programs which depend on that behavior. | ||||||
|   |   | ||||||
|   | |||||||
							
								
								
									
										22706
									
								
								toolchain/gcc/patches/4.4.5/930-avr32_support.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22706
									
								
								toolchain/gcc/patches/4.4.5/930-avr32_support.patch
									
									
									
									
									
										Normal file
									
								
							
										
											
												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 */ | ||||||
							
								
								
									
										32
									
								
								toolchain/gcc/patches/4.4.5/933-avr32_bug_7435.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								toolchain/gcc/patches/4.4.5/933-avr32_bug_7435.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -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. */ | ||||||
							
								
								
									
										21
									
								
								toolchain/gcc/patches/4.4.5/934-avr32_bug_9675.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								toolchain/gcc/patches/4.4.5/934-avr32_bug_9675.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -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 | ||||||
|  |   | ||||||
| @@ -1,6 +1,6 @@ | |||||||
| --- a/gcc/config.gcc | --- a/gcc/config.gcc | ||||||
| +++ b/gcc/config.gcc | +++ b/gcc/config.gcc | ||||||
| @@ -1506,6 +1506,7 @@ m68k-*-linux*)		# Motorola m68k's runnin | @@ -1536,6 +1536,7 @@ m68k-*-linux*)		# Motorola m68k's runnin | ||||||
|  	if test x$sjlj != x1; then |  	if test x$sjlj != x1; then | ||||||
|  	    tmake_file="$tmake_file m68k/t-slibgcc-elf-ver" |  	    tmake_file="$tmake_file m68k/t-slibgcc-elf-ver" | ||||||
|  	fi |  	fi | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Imre Kaloz
					Imre Kaloz