Commit 9636feef by Georg-Johann Lay Committed by Georg-Johann Lay

avr-c.c (avr_register_target_pragmas): Use C++ for-loop declaration of loop variable.

gcc/
	* config/avr/avr-c.c (avr_register_target_pragmas): Use C++
	for-loop declaration of loop variable.
	(avr_register_target_pragmas, avr_cpu_cpp_builtins): Same.
	* config/avr/avr.c (avr_popcount_each_byte)
	(avr_init_expanders, avr_regs_to_save, sequent_regs_live)
	(get_sequence_length, avr_prologue_setup_frame, avr_map_metric)
	(avr_expand_epilogue, avr_function_arg_advance)
	(avr_out_compare, avr_out_plus_1, avr_out_bitop, avr_out_fract)
	(avr_rotate_bytes, _reg_unused_after, avr_assemble_integer)
	(avr_adjust_reg_alloc_order, output_reload_in_const)
	(avr_conditional_register_usage, avr_find_unused_d_reg)
	(avr_map_decompose, avr_fold_builtin): Same.

From-SVN: r242672
parent 3115f94f
2016-11-21 Georg-Johann Lay <avr@gjlay.de> 2016-11-21 Georg-Johann Lay <avr@gjlay.de>
* config/avr/avr-c.c (avr_register_target_pragmas): Use C++
for-loop declaration of loop variable.
(avr_register_target_pragmas, avr_cpu_cpp_builtins): Same.
* config/avr/avr.c (avr_popcount_each_byte)
(avr_init_expanders, avr_regs_to_save, sequent_regs_live)
(get_sequence_length, avr_prologue_setup_frame, avr_map_metric)
(avr_expand_epilogue, avr_function_arg_advance)
(avr_out_compare, avr_out_plus_1, avr_out_bitop, avr_out_fract)
(avr_rotate_bytes, _reg_unused_after, avr_assemble_integer)
(avr_adjust_reg_alloc_order, output_reload_in_const)
(avr_conditional_register_usage, avr_find_unused_d_reg)
(avr_map_decompose, avr_fold_builtin): Same.
2016-11-21 Georg-Johann Lay <avr@gjlay.de>
* config/avr/avr.c (avr_popcount): Remove static function. * config/avr/avr.c (avr_popcount): Remove static function.
(avr_popcount_each_byte, avr_out_bitop): Use popcount_hwi instead. (avr_popcount_each_byte, avr_out_bitop): Use popcount_hwi instead.
...@@ -249,8 +249,6 @@ avr_resolve_overloaded_builtin (unsigned int iloc, tree fndecl, void *vargs) ...@@ -249,8 +249,6 @@ avr_resolve_overloaded_builtin (unsigned int iloc, tree fndecl, void *vargs)
void void
avr_register_target_pragmas (void) avr_register_target_pragmas (void)
{ {
int i;
gcc_assert (ADDR_SPACE_GENERIC == ADDR_SPACE_RAM); gcc_assert (ADDR_SPACE_GENERIC == ADDR_SPACE_RAM);
/* Register address spaces. The order must be the same as in the respective /* Register address spaces. The order must be the same as in the respective
...@@ -259,7 +257,7 @@ avr_register_target_pragmas (void) ...@@ -259,7 +257,7 @@ avr_register_target_pragmas (void)
sense for some targets. Diagnose for non-supported spaces will be sense for some targets. Diagnose for non-supported spaces will be
emit by TARGET_ADDR_SPACE_DIAGNOSE_USAGE. */ emit by TARGET_ADDR_SPACE_DIAGNOSE_USAGE. */
for (i = 0; i < ADDR_SPACE_COUNT; i++) for (int i = 0; i < ADDR_SPACE_COUNT; i++)
{ {
gcc_assert (i == avr_addrspace[i].id); gcc_assert (i == avr_addrspace[i].id);
...@@ -292,8 +290,6 @@ avr_toupper (char *up, const char *lo) ...@@ -292,8 +290,6 @@ avr_toupper (char *up, const char *lo)
void void
avr_cpu_cpp_builtins (struct cpp_reader *pfile) avr_cpu_cpp_builtins (struct cpp_reader *pfile)
{ {
int i;
builtin_define_std ("AVR"); builtin_define_std ("AVR");
/* __AVR_DEVICE_NAME__ and avr_mcu_types[].macro like __AVR_ATmega8__ /* __AVR_DEVICE_NAME__ and avr_mcu_types[].macro like __AVR_ATmega8__
...@@ -391,7 +387,7 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile) ...@@ -391,7 +387,7 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile)
if (lang_GNU_C ()) if (lang_GNU_C ())
{ {
for (i = 0; i < ADDR_SPACE_COUNT; i++) for (int i = 0; i < ADDR_SPACE_COUNT; i++)
if (!ADDR_SPACE_GENERIC_P (i) if (!ADDR_SPACE_GENERIC_P (i)
/* Only supply __FLASH<n> macro if the address space is reasonable /* Only supply __FLASH<n> macro if the address space is reasonable
for this target. The address space qualifier itself is still for this target. The address space qualifier itself is still
......
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