The C++ files in the avr backend are a mix of TABS and
8 spaces for indentation. This patch rectifies that
according to the coding rules.
I applied this prior to the advent of the v14 branch so
that back-porting will be easier, at least from the new master
to v14.
Johann
--
gcc/
* config/avr/avr-log.cc: Tabify.
* config/avr/avr-devices.cc: Tabify.
* config/avr/avr-c.cc: Tabify.
* config/avr/driver-avr.cc: Tabify.
* config/avr/gen-avr-mmcu-texi.cc: Tabify.
* config/avr/gen-avr-mmcu-specs.cc: Tabify.
diff --git a/gcc/config/avr/gen-avr-mmcu-specs.cc b/gcc/config/avr/gen-avr-mmcu-specs.cc
index 72841b1bb42..02778aa3ce8 100644
--- a/gcc/config/avr/gen-avr-mmcu-specs.cc
+++ b/gcc/config/avr/gen-avr-mmcu-specs.cc
@@ -44,13 +44,13 @@
#endif
-#define SPECFILE_DOC_URL \
+#define SPECFILE_DOC_URL \
"https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html"
-#define SPECFILE_USAGE_URL \
+#define SPECFILE_USAGE_URL \
"https://gcc.gnu.org/gcc-5/changes.html"
-#define WIKI_URL \
+#define WIKI_URL \
"https://gcc.gnu.org/wiki/avr-gcc#spec-files"
static const char header[] =
@@ -210,7 +210,7 @@ print_mcu (const avr_mcu_t *mcu)
if (is_arch
&& (ARCH_AVR2 == arch_id
- || ARCH_AVR25 == arch_id))
+ || ARCH_AVR25 == arch_id))
{
// Leave "avr2" and "avr25" alone. These two architectures are
// the only ones that mix devices with 8-bit SP and 16-bit SP.
@@ -244,7 +244,7 @@ print_mcu (const avr_mcu_t *mcu)
link_arch_spec = link_arch_flmap_spec;
fprintf (f, "#\n"
- "# Auto-generated specs for AVR ");
+ "# Auto-generated specs for AVR ");
if (is_arch)
fprintf (f, "core architecture %s\n", arch->name);
else
@@ -279,19 +279,19 @@ print_mcu (const avr_mcu_t *mcu)
int n_flash = 1 + (mcu->flash_size - 1) / 0x10000;
fprintf (f, "*cc1_n_flash:\n"
- "\t%%{!mn-flash=*:-mn-flash=%d}\n\n", n_flash);
+ "\t%%{!mn-flash=*:-mn-flash=%d}\n\n", n_flash);
fprintf (f, "*cc1_rmw:\n%s\n\n", rmw
- ? "\t%{!mno-rmw: -mrmw}"
- : "\t%{mrmw}");
+ ? "\t%{!mno-rmw: -mrmw}"
+ : "\t%{mrmw}");
fprintf (f, "*cc1_errata_skip:\n%s\n\n", errata_skip
- ? "\t%{!mno-skip-bug: -mskip-bug}"
- : "\t%{!mskip-bug: -mno-skip-bug}");
+ ? "\t%{!mno-skip-bug: -mskip-bug}"
+ : "\t%{!mskip-bug: -mno-skip-bug}");
fprintf (f, "*cc1_absdata:\n%s\n\n", absdata
- ? "\t%{!mno-absdata: -mabsdata}"
- : "\t%{mabsdata}");
+ ? "\t%{!mno-absdata: -mabsdata}"
+ : "\t%{mabsdata}");
// -m[no-]rodata-in-ram basically affects linking, but sanity-check early.
fprintf (f, "*cc1_misc:\n\t%%(check_rodata_in_ram)\n\n");
@@ -306,18 +306,18 @@ print_mcu (const avr_mcu_t *mcu)
#ifdef HAVE_AS_AVR_MRMW_OPTION
fprintf (f, "*asm_rmw:\n%s\n\n", rmw
- ? "\t%{!mno-rmw: -mrmw}"
- : "\t%{mrmw}");
+ ? "\t%{!mno-rmw: -mrmw}"
+ : "\t%{mrmw}");
#endif // have avr-as -mrmw
#ifdef HAVE_AS_AVR_MGCCISR_OPTION
fprintf (f, "*asm_gccisr:\n%s\n\n",
- "\t%{!mno-gas-isr-prologues: -mgcc-isr}");
+ "\t%{!mno-gas-isr-prologues: -mgcc-isr}");
#endif // have avr-as -mgcc-isr
fprintf (f, "*asm_errata_skip:\n%s\n\n", errata_skip
- ? "\t%{mno-skip-bug}"
- : "\t%{!mskip-bug: -mno-skip-bug}");
+ ? "\t%{mno-skip-bug}"
+ : "\t%{!mskip-bug: -mno-skip-bug}");
fprintf (f, "*asm_misc:\n" /* empty */ "\n\n");
@@ -349,14 +349,14 @@ print_mcu (const avr_mcu_t *mcu)
{
fprintf (f, "*link_data_start:\n");
if (mcu->data_section_start
- != arch->default_data_section_start)
- fprintf (f, "\t%%{!Tdata:-Tdata 0x%lX}",
- 0x800000UL + mcu->data_section_start);
+ != arch->default_data_section_start)
+ fprintf (f, "\t%%{!Tdata:-Tdata 0x%lX}",
+ 0x800000UL + mcu->data_section_start);
fprintf (f, "\n\n");
fprintf (f, "*link_text_start:\n");
if (mcu->text_section_start != 0x0)
- fprintf (f, "\t%%{!Ttext:-Ttext 0x%lX}", 0UL + mcu->text_section_start);
+ fprintf (f, "\t%%{!Ttext:-Ttext 0x%lX}", 0UL + mcu->text_section_start);
fprintf (f, "\n\n");
}
diff --git a/gcc/config/avr/gen-avr-mmcu-texi.cc b/gcc/config/avr/gen-avr-mmcu-texi.cc
index d928236e172..70aa430902e 100644
--- a/gcc/config/avr/gen-avr-mmcu-texi.cc
+++ b/gcc/config/avr/gen-avr-mmcu-texi.cc
@@ -118,23 +118,23 @@ comparator (const void *va, const void *vb)
if (*a != *b)
return *a - *b;
-
+
a++;
b++;
}
return *a - *b;
-}
+}
static void
print_mcus (size_t n_mcus)
{
int duplicate = 0;
size_t i;
-
+
if (!n_mcus)
return;
-
+
qsort (mcus, n_mcus, sizeof (avr_mcu_t*), comparator);
printf ("@*@var{mcu}@tie{}=");
diff --git a/gcc/config/avr/driver-avr.cc b/gcc/config/avr/driver-avr.cc
index 727f7f00ddd..92e875a66c9 100644
--- a/gcc/config/avr/driver-avr.cc
+++ b/gcc/config/avr/driver-avr.cc
@@ -40,7 +40,7 @@ static const char dir_separator_str[] = { DIR_SEPARATOR, 0 };
or core name as supplied by -mmcu=*. When building GCC the path might be
relative. */
-const char*
+const char *
avr_devicespecs_file (int argc, const char **argv)
{
const char *mmcu = NULL;
@@ -48,29 +48,29 @@ avr_devicespecs_file (int argc, const char **argv)
#ifdef DEBUG_SPECS
if (verbose_flag)
fnotice (stderr, "Running spec function '%s' with %d args\n\n",
- __FUNCTION__, argc);
+ __FUNCTION__, argc);
#endif
switch (argc)
{
case 0:
fatal_error (input_location,
- "bad usage of spec function %qs", "device-specs-file");
+ "bad usage of spec function %qs", "device-specs-file");
return X_NODEVLIB;
case 1:
if (strcmp ("device-specs", argv[0]) == 0)
- {
- /* FIXME: This means "device-specs%s" from avr.h:DRIVER_SELF_SPECS
- has not been resolved to a path. That case can occur when the
- c++ testsuite is run from the build directory. DejaGNU's
- libgloss.exp:get_multilibs runs $compiler without -B, i.e.runs
- xgcc without specifying a prefix. Without any prefix, there is
- no means to find out where the specs files might be located.
- get_multilibs runs xgcc --print-multi-lib, hence we don't actually
- need information form a specs file and may skip it here. */
- return X_NODEVLIB;
- }
+ {
+ /* FIXME: This means "device-specs%s" from avr.h:DRIVER_SELF_SPECS
+ has not been resolved to a path. That case can occur when the
+ c++ testsuite is run from the build directory. DejaGNU's
+ libgloss.exp:get_multilibs runs $compiler without -B, i.e.runs
+ xgcc without specifying a prefix. Without any prefix, there is
+ no means to find out where the specs files might be located.
+ get_multilibs runs xgcc --print-multi-lib, hence we don't actually
+ need information form a specs file and may skip it here. */
+ return X_NODEVLIB;
+ }
mmcu = AVR_MMCU_DEFAULT;
break;
@@ -82,10 +82,10 @@ avr_devicespecs_file (int argc, const char **argv)
for (int i = 2; i < argc; i++)
if (strcmp (mmcu, argv[i]) != 0)
- {
- error ("specified option %qs more than once", "-mmcu");
- return X_NODEVLIB;
- }
+ {
+ error ("specified option %qs more than once", "-mmcu");
+ return X_NODEVLIB;
+ }
break;
}
@@ -94,12 +94,12 @@ avr_devicespecs_file (int argc, const char **argv)
for (const char *s = mmcu; *s; s++)
if (!ISALNUM (*s)
- && '-' != *s
- && '_' != *s)
+ && '-' != *s
+ && '_' != *s)
{
- error ("strange device name %qs after %qs: bad character %qc",
- mmcu, "-mmcu=", *s);
- return X_NODEVLIB;
+ error ("strange device name %qs after %qs: bad character %qc",
+ mmcu, "-mmcu=", *s);
+ return X_NODEVLIB;
}
return concat ("%{!nodevicespecs:-specs=device-specs", dir_separator_str,
@@ -112,9 +112,9 @@ avr_devicespecs_file (int argc, const char **argv)
// See also PR107201.
" %{mmcu=avr*:%:no-devlib(avr%*)} %{!mmcu=*:" X_NODEVLIB "}",
#else
- " " X_NODEVLIB,
+ " " X_NODEVLIB,
#endif
- NULL);
+ NULL);
}
@@ -159,30 +159,30 @@ avr_double_lib (int argc, const char **argv)
for (int i = 0; i < argc; i++)
{
if (strcmp (argv[i], "mdouble=32") == 0)
- {
- dbl = 32;
+ {
+ dbl = 32;
#ifdef HAVE_LONG_DOUBLE_IS_DOUBLE
- ldb = dbl;
+ ldb = dbl;
#endif
- }
+ }
else if (strcmp (argv[i], "mdouble=64") == 0)
- {
- ldb = dbl = 64;
- }
+ {
+ ldb = dbl = 64;
+ }
else if (strcmp (argv[i], "mlong-double=32") == 0)
- {
- ldb = dbl = 32;
- }
+ {
+ ldb = dbl = 32;
+ }
else if (strcmp (argv[i], "mlong-double=64") == 0)
- {
- ldb = 64;
+ {
+ ldb = 64;
#ifdef HAVE_LONG_DOUBLE_IS_DOUBLE
- dbl = ldb;
+ dbl = ldb;
#endif
- }
+ }
}
return concat (" %<mdouble=* -mdouble=", dbl == 32 ? "32" : "64",
- " %<mlong-double=* -mlong-double=", ldb == 32 ? "32" : "64",
- NULL);
+ " %<mlong-double=* -mlong-double=", ldb == 32 ? "32" : "64",
+ NULL);
}
diff --git a/gcc/config/avr/avr-c.cc b/gcc/config/avr/avr-c.cc
index a12240292b1..60905a76556 100644
--- a/gcc/config/avr/avr-c.cc
+++ b/gcc/config/avr/avr-c.cc
@@ -61,190 +61,190 @@ avr_resolve_overloaded_builtin (unsigned int iloc, tree fndecl, void *vargs)
case AVR_BUILTIN_ABSFX:
if (args.length() != 1)
- {
- error_at (loc, "%qs expects 1 argument but %d given",
- "absfx", (int) args.length());
+ {
+ error_at (loc, "%qs expects 1 argument but %d given",
+ "absfx", (int) args.length());
- fold = error_mark_node;
- break;
- }
+ fold = error_mark_node;
+ break;
+ }
type0 = TREE_TYPE (args[0]);
if (!FIXED_POINT_TYPE_P (type0))
- {
- error_at (loc, "%qs expects a fixed-point value as argument",
- "absfx");
+ {
+ error_at (loc, "%qs expects a fixed-point value as argument",
+ "absfx");
- fold = error_mark_node;
- }
+ fold = error_mark_node;
+ }
switch (TYPE_MODE (type0))
- {
- case E_QQmode: id = AVR_BUILTIN_ABSHR; break;
- case E_HQmode: id = AVR_BUILTIN_ABSR; break;
- case E_SQmode: id = AVR_BUILTIN_ABSLR; break;
- case E_DQmode: id = AVR_BUILTIN_ABSLLR; break;
-
- case E_HAmode: id = AVR_BUILTIN_ABSHK; break;
- case E_SAmode: id = AVR_BUILTIN_ABSK; break;
- case E_DAmode: id = AVR_BUILTIN_ABSLK; break;
- case E_TAmode: id = AVR_BUILTIN_ABSLLK; break;
-
- case E_UQQmode:
- case E_UHQmode:
- case E_USQmode:
- case E_UDQmode:
- case E_UHAmode:
- case E_USAmode:
- case E_UDAmode:
- case E_UTAmode:
- warning_at (loc, 0, "using %qs with unsigned type has no effect",
- "absfx");
- return args[0];
-
- default:
- error_at (loc, "no matching fixed-point overload found for %qs",
- "absfx");
-
- fold = error_mark_node;
- break;
- }
+ {
+ case E_QQmode: id = AVR_BUILTIN_ABSHR; break;
+ case E_HQmode: id = AVR_BUILTIN_ABSR; break;
+ case E_SQmode: id = AVR_BUILTIN_ABSLR; break;
+ case E_DQmode: id = AVR_BUILTIN_ABSLLR; break;
+
+ case E_HAmode: id = AVR_BUILTIN_ABSHK; break;
+ case E_SAmode: id = AVR_BUILTIN_ABSK; break;
+ case E_DAmode: id = AVR_BUILTIN_ABSLK; break;
+ case E_TAmode: id = AVR_BUILTIN_ABSLLK; break;
+
+ case E_UQQmode:
+ case E_UHQmode:
+ case E_USQmode:
+ case E_UDQmode:
+ case E_UHAmode:
+ case E_USAmode:
+ case E_UDAmode:
+ case E_UTAmode:
+ warning_at (loc, 0, "using %qs with unsigned type has no effect",
+ "absfx");
+ return args[0];
+
+ default:
+ error_at (loc, "no matching fixed-point overload found for %qs",
+ "absfx");
+
+ fold = error_mark_node;
+ break;
+ }
fold = targetm.builtin_decl (id, true);
if (fold != error_mark_node)
- fold = build_function_call_vec (loc, vNULL, fold, &args, NULL);
+ fold = build_function_call_vec (loc, vNULL, fold, &args, NULL);
break; // absfx
case AVR_BUILTIN_ROUNDFX:
if (args.length() != 2)
- {
- error_at (loc, "%qs expects 2 arguments but %d given",
- "roundfx", (int) args.length());
+ {
+ error_at (loc, "%qs expects 2 arguments but %d given",
+ "roundfx", (int) args.length());
- fold = error_mark_node;
- break;
- }
+ fold = error_mark_node;
+ break;
+ }
type0 = TREE_TYPE (args[0]);
type1 = TREE_TYPE (args[1]);
if (!FIXED_POINT_TYPE_P (type0))
- {
- error_at (loc, "%qs expects a fixed-point value as first argument",
- "roundfx");
+ {
+ error_at (loc, "%qs expects a fixed-point value as first argument",
+ "roundfx");
- fold = error_mark_node;
- }
+ fold = error_mark_node;
+ }
if (!INTEGRAL_TYPE_P (type1))
- {
- error_at (loc, "%qs expects an integer value as second argument",
- "roundfx");
+ {
+ error_at (loc, "%qs expects an integer value as second argument",
+ "roundfx");
- fold = error_mark_node;
- }
+ fold = error_mark_node;
+ }
switch (TYPE_MODE (type0))
- {
- case E_QQmode: id = AVR_BUILTIN_ROUNDHR; break;
- case E_HQmode: id = AVR_BUILTIN_ROUNDR; break;
- case E_SQmode: id = AVR_BUILTIN_ROUNDLR; break;
- case E_DQmode: id = AVR_BUILTIN_ROUNDLLR; break;
-
- case E_UQQmode: id = AVR_BUILTIN_ROUNDUHR; break;
- case E_UHQmode: id = AVR_BUILTIN_ROUNDUR; break;
- case E_USQmode: id = AVR_BUILTIN_ROUNDULR; break;
- case E_UDQmode: id = AVR_BUILTIN_ROUNDULLR; break;
-
- case E_HAmode: id = AVR_BUILTIN_ROUNDHK; break;
- case E_SAmode: id = AVR_BUILTIN_ROUNDK; break;
- case E_DAmode: id = AVR_BUILTIN_ROUNDLK; break;
- case E_TAmode: id = AVR_BUILTIN_ROUNDLLK; break;
-
- case E_UHAmode: id = AVR_BUILTIN_ROUNDUHK; break;
- case E_USAmode: id = AVR_BUILTIN_ROUNDUK; break;
- case E_UDAmode: id = AVR_BUILTIN_ROUNDULK; break;
- case E_UTAmode: id = AVR_BUILTIN_ROUNDULLK; break;
-
- default:
- error_at (loc, "no matching fixed-point overload found for %qs",
- "roundfx");
-
- fold = error_mark_node;
- break;
- }
+ {
+ case E_QQmode: id = AVR_BUILTIN_ROUNDHR; break;
+ case E_HQmode: id = AVR_BUILTIN_ROUNDR; break;
+ case E_SQmode: id = AVR_BUILTIN_ROUNDLR; break;
+ case E_DQmode: id = AVR_BUILTIN_ROUNDLLR; break;
+
+ case E_UQQmode: id = AVR_BUILTIN_ROUNDUHR; break;
+ case E_UHQmode: id = AVR_BUILTIN_ROUNDUR; break;
+ case E_USQmode: id = AVR_BUILTIN_ROUNDULR; break;
+ case E_UDQmode: id = AVR_BUILTIN_ROUNDULLR; break;
+
+ case E_HAmode: id = AVR_BUILTIN_ROUNDHK; break;
+ case E_SAmode: id = AVR_BUILTIN_ROUNDK; break;
+ case E_DAmode: id = AVR_BUILTIN_ROUNDLK; break;
+ case E_TAmode: id = AVR_BUILTIN_ROUNDLLK; break;
+
+ case E_UHAmode: id = AVR_BUILTIN_ROUNDUHK; break;
+ case E_USAmode: id = AVR_BUILTIN_ROUNDUK; break;
+ case E_UDAmode: id = AVR_BUILTIN_ROUNDULK; break;
+ case E_UTAmode: id = AVR_BUILTIN_ROUNDULLK; break;
+
+ default:
+ error_at (loc, "no matching fixed-point overload found for %qs",
+ "roundfx");
+
+ fold = error_mark_node;
+ break;
+ }
fold = targetm.builtin_decl (id, true);
if (fold != error_mark_node)
- fold = build_function_call_vec (loc, vNULL, fold, &args, NULL);
+ fold = build_function_call_vec (loc, vNULL, fold, &args, NULL);
break; // roundfx
case AVR_BUILTIN_COUNTLSFX:
if (args.length() != 1)
- {
- error_at (loc, "%qs expects 1 argument but %d given",
- "countlsfx", (int) args.length());
+ {
+ error_at (loc, "%qs expects 1 argument but %d given",
+ "countlsfx", (int) args.length());
- fold = error_mark_node;
- break;
- }
+ fold = error_mark_node;
+ break;
+ }
type0 = TREE_TYPE (args[0]);
if (!FIXED_POINT_TYPE_P (type0))
- {
- error_at (loc, "%qs expects a fixed-point value as first argument",
- "countlsfx");
+ {
+ error_at (loc, "%qs expects a fixed-point value as first argument",
+ "countlsfx");
- fold = error_mark_node;
- }
+ fold = error_mark_node;
+ }
switch (TYPE_MODE (type0))
- {
- case E_QQmode: id = AVR_BUILTIN_COUNTLSHR; break;
- case E_HQmode: id = AVR_BUILTIN_COUNTLSR; break;
- case E_SQmode: id = AVR_BUILTIN_COUNTLSLR; break;
- case E_DQmode: id = AVR_BUILTIN_COUNTLSLLR; break;
-
- case E_UQQmode: id = AVR_BUILTIN_COUNTLSUHR; break;
- case E_UHQmode: id = AVR_BUILTIN_COUNTLSUR; break;
- case E_USQmode: id = AVR_BUILTIN_COUNTLSULR; break;
- case E_UDQmode: id = AVR_BUILTIN_COUNTLSULLR; break;
-
- case E_HAmode: id = AVR_BUILTIN_COUNTLSHK; break;
- case E_SAmode: id = AVR_BUILTIN_COUNTLSK; break;
- case E_DAmode: id = AVR_BUILTIN_COUNTLSLK; break;
- case E_TAmode: id = AVR_BUILTIN_COUNTLSLLK; break;
-
- case E_UHAmode: id = AVR_BUILTIN_COUNTLSUHK; break;
- case E_USAmode: id = AVR_BUILTIN_COUNTLSUK; break;
- case E_UDAmode: id = AVR_BUILTIN_COUNTLSULK; break;
- case E_UTAmode: id = AVR_BUILTIN_COUNTLSULLK; break;
-
- default:
- error_at (loc, "no matching fixed-point overload found for %qs",
- "countlsfx");
-
- fold = error_mark_node;
- break;
- }
+ {
+ case E_QQmode: id = AVR_BUILTIN_COUNTLSHR; break;
+ case E_HQmode: id = AVR_BUILTIN_COUNTLSR; break;
+ case E_SQmode: id = AVR_BUILTIN_COUNTLSLR; break;
+ case E_DQmode: id = AVR_BUILTIN_COUNTLSLLR; break;
+
+ case E_UQQmode: id = AVR_BUILTIN_COUNTLSUHR; break;
+ case E_UHQmode: id = AVR_BUILTIN_COUNTLSUR; break;
+ case E_USQmode: id = AVR_BUILTIN_COUNTLSULR; break;
+ case E_UDQmode: id = AVR_BUILTIN_COUNTLSULLR; break;
+
+ case E_HAmode: id = AVR_BUILTIN_COUNTLSHK; break;
+ case E_SAmode: id = AVR_BUILTIN_COUNTLSK; break;
+ case E_DAmode: id = AVR_BUILTIN_COUNTLSLK; break;
+ case E_TAmode: id = AVR_BUILTIN_COUNTLSLLK; break;
+
+ case E_UHAmode: id = AVR_BUILTIN_COUNTLSUHK; break;
+ case E_USAmode: id = AVR_BUILTIN_COUNTLSUK; break;
+ case E_UDAmode: id = AVR_BUILTIN_COUNTLSULK; break;
+ case E_UTAmode: id = AVR_BUILTIN_COUNTLSULLK; break;
+
+ default:
+ error_at (loc, "no matching fixed-point overload found for %qs",
+ "countlsfx");
+
+ fold = error_mark_node;
+ break;
+ }
fold = targetm.builtin_decl (id, true);
if (fold != error_mark_node)
- fold = build_function_call_vec (loc, vNULL, fold, &args, NULL);
+ fold = build_function_call_vec (loc, vNULL, fold, &args, NULL);
break; // countlsfx
}
return fold;
}
-
+
/* Implement `REGISTER_TARGET_PRAGMAS'. */
@@ -264,7 +264,7 @@ avr_register_target_pragmas (void)
gcc_assert (i == avr_addrspace[i].id);
if (!ADDR_SPACE_GENERIC_P (i))
- c_register_addr_space (avr_addrspace[i].name, avr_addrspace[i].id);
+ c_register_addr_space (avr_addrspace[i].name, avr_addrspace[i].id);
}
targetm.resolve_overloaded_builtin = avr_resolve_overloaded_builtin;
@@ -333,21 +333,21 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile)
cpp_define (pfile, "__AVR_TINY__");
/* Define macro "__AVR_TINY_PM_BASE_ADDRESS__" with mapped program memory
- start address. This macro shall be used where mapped program
- memory is accessed, eg. copying data section (__do_copy_data)
- contents to data memory region.
- NOTE:
- Program memory of AVR_TINY devices cannot be accessed directly,
- it has been mapped to the data memory. For AVR_TINY devices
- (ATtiny4/5/9/10/20 and 40) mapped program memory starts at 0x4000. */
+ start address. This macro shall be used where mapped program
+ memory is accessed, eg. copying data section (__do_copy_data)
+ contents to data memory region.
+ NOTE:
+ Program memory of AVR_TINY devices cannot be accessed directly,
+ it has been mapped to the data memory. For AVR_TINY devices
+ (ATtiny4/5/9/10/20 and 40) mapped program memory starts at 0x4000. */
cpp_define_formatted (pfile, "__AVR_TINY_PM_BASE_ADDRESS__=0x%x",
- avr_arch->flash_pm_offset);
+ avr_arch->flash_pm_offset);
}
if (avr_arch->flash_pm_offset)
cpp_define_formatted (pfile, "__AVR_PM_BASE_ADDRESS__=0x%x",
- avr_arch->flash_pm_offset);
+ avr_arch->flash_pm_offset);
if (AVR_HAVE_EIJMP_EICALL)
{
@@ -377,14 +377,14 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile)
cpp_define (pfile, "__AVR_ERRATA_SKIP__");
if (AVR_HAVE_JMP_CALL)
- cpp_define (pfile, "__AVR_ERRATA_SKIP_JMP_CALL__");
+ cpp_define (pfile, "__AVR_ERRATA_SKIP_JMP_CALL__");
}
if (TARGET_RMW)
cpp_define (pfile, "__AVR_ISA_RMW__");
cpp_define_formatted (pfile, "__AVR_SFR_OFFSET__=0x%x",
- avr_arch->sfr_offset);
+ avr_arch->sfr_offset);
#ifdef WITH_AVRLIBC
cpp_define (pfile, "__WITH_AVRLIBC__");
@@ -478,17 +478,17 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile)
if (lang_GNU_C ())
{
for (int i = 0; i < ADDR_SPACE_COUNT; i++)
- if (!ADDR_SPACE_GENERIC_P (i)
- /* Only supply __FLASH<n> macro if the address space is reasonable
- for this target. The address space qualifier itself is still
- supported, but using it will throw an error. */
- && avr_addr_space_supported_p ((addr_space_t) i))
- {
- const char *name = avr_addrspace[i].name;
- char *Name = (char*) alloca (1 + strlen (name));
-
- cpp_define (pfile, avr_toupper (Name, name));
- }
+ if (!ADDR_SPACE_GENERIC_P (i)
+ /* Only supply __FLASH<n> macro if the address space is reasonable
+ for this target. The address space qualifier itself is still
+ supported, but using it will throw an error. */
+ && avr_addr_space_supported_p ((addr_space_t) i))
+ {
+ const char *name = avr_addrspace[i].name;
+ char *Name = (char*) alloca (1 + strlen (name));
+
+ cpp_define (pfile, avr_toupper (Name, name));
+ }
}
/* Define builtin macros so that the user can easily query whether or
@@ -502,8 +502,8 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile)
/* Builtin macros for the __int24 and __uint24 type. */
cpp_define_formatted (pfile, "__INT24_MAX__=8388607%s",
- INT_TYPE_SIZE == 8 ? "LL" : "L");
+ INT_TYPE_SIZE == 8 ? "LL" : "L");
cpp_define (pfile, "__INT24_MIN__=(-__INT24_MAX__-1)");
cpp_define_formatted (pfile, "__UINT24_MAX__=16777215%s",
- INT_TYPE_SIZE == 8 ? "ULL" : "UL");
+ INT_TYPE_SIZE == 8 ? "ULL" : "UL");
}
diff --git a/gcc/config/avr/avr-devices.cc b/gcc/config/avr/avr-devices.cc
index 43d38eb3916..456a6b72c8b 100644
--- a/gcc/config/avr/avr-devices.cc
+++ b/gcc/config/avr/avr-devices.cc
@@ -130,7 +130,7 @@ avr_mcu_types[] =
#ifndef IN_GEN_AVR_MMCU_TEXI
-static char*
+static char *
avr_archs_str (void)
{
char *archs = concat ("", NULL);
@@ -144,7 +144,7 @@ avr_archs_str (void)
return archs;
}
-
+
void
avr_inform_core_architectures (void)
{
diff --git a/gcc/config/avr/avr-log.cc b/gcc/config/avr/avr-log.cc
index 395e6e64f83..d702c5f3fd8 100644
--- a/gcc/config/avr/avr-log.cc
+++ b/gcc/config/avr/avr-log.cc
@@ -85,7 +85,7 @@ int
avr_vdump (FILE *stream, const char *caller, ...)
{
va_list ap;
-
+
if (stream == NULL && dump_file)
stream = dump_file;
@@ -112,161 +112,161 @@ avr_log_vadump (FILE *file, const char *caller, va_list ap)
while (*fmt)
{
switch (*fmt++)
- {
- default:
- fputc (*(fmt-1), file);
- break;
-
- case '\\':
- bs[1] = *fmt++;
- fputs (bs, file);
- break;
-
- case '%':
- switch (*fmt++)
- {
- case '%':
- fputc ('%', file);
- break;
-
- case 't':
- {
- tree t = va_arg (ap, tree);
- if (NULL_TREE == t)
- fprintf (file, "<NULL-TREE>");
- else
- {
- if (stderr == file)
- debug_tree (t);
- else
- {
- print_node (file, "", t, 0);
- putc ('\n', file);
- }
- }
- break;
- }
-
- case 'T':
- {
- tree t = va_arg (ap, tree);
- if (NULL_TREE == t)
- fprintf (file, "<NULL-TREE>");
- else
- print_node_brief (file, "", t, 3);
- }
- break;
-
- case 'd':
- fprintf (file, "%d", va_arg (ap, int));
- break;
-
- case 'x':
- fprintf (file, "%x", va_arg (ap, int));
- break;
-
- case 'b':
- fprintf (file, "%s", va_arg (ap, int) ? "true" : "false");
- break;
-
- case 'c':
- fputc (va_arg (ap, int), file);
- break;
-
- case 'r':
- print_inline_rtx (file, va_arg (ap, rtx), 0);
- break;
-
- case 'L':
- {
- rtx_insn *insn = safe_as_a <rtx_insn *> (va_arg (ap, rtx));
-
- while (insn)
- {
- print_inline_rtx (file, insn, 0);
- fprintf (file, "\n");
- insn = NEXT_INSN (insn);
- }
- break;
- }
-
- case 'f':
- if (cfun && cfun->decl)
- fputs (current_function_name(), file);
- break;
-
- case 's':
- {
- const char *str = va_arg (ap, char*);
- fputs (str ? str : "(null)", file);
- }
- break;
-
- case 'm':
- fputs (GET_MODE_NAME ((machine_mode) va_arg (ap, int)),
- file);
- break;
-
- case 'C':
- fputs (rtx_name[va_arg (ap, int)], file);
- break;
-
- case 'R':
- fputs (reg_class_names[va_arg (ap, int)], file);
- break;
-
- case 'F':
- fputs (caller, file);
- break;
-
- case 'H':
- {
- location_t loc = va_arg (ap, location_t);
-
- if (BUILTINS_LOCATION == loc)
- fprintf (file, "<BUILTIN-LOCATION>");
- else if (UNKNOWN_LOCATION == loc)
- fprintf (file, "<UNKNOWN-LOCATION>");
- else
- fprintf (file, "%s:%d",
- LOCATION_FILE (loc), LOCATION_LINE (loc));
-
- break;
- }
-
- case '!':
- if (!current_pass)
- return;
- /* FALLTHRU */
-
- case '?':
- avr_vdump (file, caller, "%F[%f:%P]");
- break;
-
- case 'P':
- if (current_pass)
- fprintf (file, "%s(%d)",
- current_pass->name,
- current_pass->static_pass_number);
- else
- fprintf (file, "pass=?");
-
- break;
-
- case 'A':
- fflush (file);
- abort();
-
- default:
- /* Unknown %-code: Stop printing */
-
- fprintf (file, "??? %%%c ???%s\n", *(fmt-1), fmt);
- fmt = "";
-
- break;
- }
- break; /* % */
- }
+ {
+ default:
+ fputc (*(fmt-1), file);
+ break;
+
+ case '\\':
+ bs[1] = *fmt++;
+ fputs (bs, file);
+ break;
+
+ case '%':
+ switch (*fmt++)
+ {
+ case '%':
+ fputc ('%', file);
+ break;
+
+ case 't':
+ {
+ tree t = va_arg (ap, tree);
+ if (NULL_TREE == t)
+ fprintf (file, "<NULL-TREE>");
+ else
+ {
+ if (stderr == file)
+ debug_tree (t);
+ else
+ {
+ print_node (file, "", t, 0);
+ putc ('\n', file);
+ }
+ }
+ break;
+ }
+
+ case 'T':
+ {
+ tree t = va_arg (ap, tree);
+ if (NULL_TREE == t)
+ fprintf (file, "<NULL-TREE>");
+ else
+ print_node_brief (file, "", t, 3);
+ }
+ break;
+
+ case 'd':
+ fprintf (file, "%d", va_arg (ap, int));
+ break;
+
+ case 'x':
+ fprintf (file, "%x", va_arg (ap, int));
+ break;
+
+ case 'b':
+ fprintf (file, "%s", va_arg (ap, int) ? "true" : "false");
+ break;
+
+ case 'c':
+ fputc (va_arg (ap, int), file);
+ break;
+
+ case 'r':
+ print_inline_rtx (file, va_arg (ap, rtx), 0);
+ break;
+
+ case 'L':
+ {
+ rtx_insn *insn = safe_as_a <rtx_insn *> (va_arg (ap, rtx));
+
+ while (insn)
+ {
+ print_inline_rtx (file, insn, 0);
+ fprintf (file, "\n");
+ insn = NEXT_INSN (insn);
+ }
+ break;
+ }
+
+ case 'f':
+ if (cfun && cfun->decl)
+ fputs (current_function_name(), file);
+ break;
+
+ case 's':
+ {
+ const char *str = va_arg (ap, char*);
+ fputs (str ? str : "(null)", file);
+ }
+ break;
+
+ case 'm':
+ fputs (GET_MODE_NAME ((machine_mode) va_arg (ap, int)),
+ file);
+ break;
+
+ case 'C':
+ fputs (rtx_name[va_arg (ap, int)], file);
+ break;
+
+ case 'R':
+ fputs (reg_class_names[va_arg (ap, int)], file);
+ break;
+
+ case 'F':
+ fputs (caller, file);
+ break;
+
+ case 'H':
+ {
+ location_t loc = va_arg (ap, location_t);
+
+ if (BUILTINS_LOCATION == loc)
+ fprintf (file, "<BUILTIN-LOCATION>");
+ else if (UNKNOWN_LOCATION == loc)
+ fprintf (file, "<UNKNOWN-LOCATION>");
+ else
+ fprintf (file, "%s:%d",
+ LOCATION_FILE (loc), LOCATION_LINE (loc));
+
+ break;
+ }
+
+ case '!':
+ if (!current_pass)
+ return;
+ /* FALLTHRU */
+
+ case '?':
+ avr_vdump (file, caller, "%F[%f:%P]");
+ break;
+
+ case 'P':
+ if (current_pass)
+ fprintf (file, "%s(%d)",
+ current_pass->name,
+ current_pass->static_pass_number);
+ else
+ fprintf (file, "pass=?");
+
+ break;
+
+ case 'A':
+ fflush (file);
+ abort();
+
+ default:
+ /* Unknown %-code: Stop printing */
+
+ fprintf (file, "??? %%%c ???%s\n", *(fmt-1), fmt);
+ fmt = "";
+
+ break;
+ }
+ break; /* % */
+ }
}
fflush (file);
@@ -283,7 +283,7 @@ avr_log_set_avr_log (void)
if (all)
avr_log_details = "all";
-
+
if (all || avr_log_details)
{
/* Adding , at beginning and end of string makes searching easier. */
@@ -298,13 +298,13 @@ avr_log_set_avr_log (void)
info = strstr (str, ",?,") != NULL;
if (info)
- fprintf (stderr, "\n-mlog=");
+ fprintf (stderr, "\n-mlog=");
#define SET_DUMP_DETAIL(S) \
do { \
avr_log.S = (all || strstr (str, "," #S ",") != NULL); \
- if (info) \
- fprintf (stderr, #S ","); \
+ if (info) \
+ fprintf (stderr, #S ","); \
} while (0)
SET_DUMP_DETAIL (address_cost);
@@ -320,6 +320,6 @@ avr_log_set_avr_log (void)
#undef SET_DUMP_DETAIL
if (info)
- fprintf (stderr, "?\n\n");
+ fprintf (stderr, "?\n\n");
}
}