* Fix typos. Remove trailing blanks. Fix coding style.
authorGeorg-Johann Lay <avr@gjlay.de>
Mon, 14 Jan 2013 15:08:45 +0000 (15:08 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Mon, 14 Jan 2013 15:08:45 +0000 (15:08 +0000)
From-SVN: r195151

15 files changed:
gcc/ChangeLog
gcc/config/avr/avr-arch.h
gcc/config/avr/avr-c.c
gcc/config/avr/avr-devices.c
gcc/config/avr/avr-dimode.md
gcc/config/avr/avr-log.c
gcc/config/avr/avr-protos.h
gcc/config/avr/avr-stdint.h
gcc/config/avr/avr.c
gcc/config/avr/avr.h
gcc/config/avr/avr.md
gcc/config/avr/predicates.md
libgcc/ChangeLog
libgcc/config/avr/lib1funcs-fixed.S
libgcc/config/avr/lib1funcs.S

index 93947b6e34f8a66ec7bebcf5e2ac5b65f9f0d48e..64df290c6d01732d18f1e8ca7e61f792fd1e8db8 100644 (file)
@@ -1,3 +1,27 @@
+2013-01-14  Georg-Johann Lay  <avr@gjlay.de>
+
+       * config/avr/avr-stdint.h: Remove trailing blanks.
+       * config/avr/avr-log.h: Same.
+       * config/avr/avr-arch.h: Same.
+       * config/avr/avr-devices.c: Same.
+       * config/avr/avr-dimode.md: Same.
+       * config/avr/predicates.md: Same.
+       * config/avr/avr-c.c: Same.  And fix typo.
+       
+       * config/avr/avr-protos.h: Same.  And:
+       (function_arg_regno_p): Rename to avr_function_arg_regno_p.
+       (init_cumulative_args): Rename to avr_init_cumulative_args.
+       (expand_prologue): Rename to avr_expand_prologue.
+       (expand_epilogue): Rename to avr_expand_epilogue.
+       (adjust_insn_length): Rename to avr_adjust_insn_length.
+       (notice_update_cc): Rename to avr_notice_update_cc.
+       (final_prescan_insn): Rename to avr_final_prescan_insn.
+       * config/avr/avr.c: Same.
+       * config/avr/avr.h: Same.
+       * config/avr/avr.md: Remove trailing blanks.
+       (prologue): Use avr_expand_prologue.
+       (epilogue, sibcall_epilogue): Use avr_expand_epilogue.
+
 2013-01-14  Richard Biener  <rguenther@suse.de>
 
        * tree-cfg.c (verify_expr_location, verify_expr_location_1,
index ce6eabd9cd90536540e611debaf204b81938634c..a2673370a857720040da010c1ed37accf708827a 100644 (file)
@@ -74,7 +74,7 @@ struct base_arch_s
   /* This core has the RAMPD special function register
      and thus also the RAMPX, RAMPY and RAMPZ registers.  */
   int have_rampd;
-  
+
   /* Default start of data section address for architecture.  */
   int default_data_section_start;
 
@@ -84,9 +84,9 @@ struct base_arch_s
 
   /* Architecture id to built-in define __AVR_ARCH__ (NULL -> no macro) */
   const char *const macro;
-  
+
   /* Architecture name.  */
-  const char *const arch_name;  
+  const char *const arch_name;
 };
 
 
@@ -96,16 +96,16 @@ struct mcu_type_s
 {
   /* Device name.  */
   const char *const name;
-  
+
   /* Index in avr_arch_types[].  */
-  enum avr_arch arch; 
-  
+  enum avr_arch arch;
+
   /* Must lie outside user's namespace.  NULL == no macro.  */
   const char *const macro;
-  
+
   /* Stack pointer have 8 bits width.  */
   int short_sp;
-  
+
   /* Some AVR devices have a core erratum when skipping a 2-word instruction.
      Skip instructions are:  SBRC, SBRS, SBIC, SBIS, CPSE.
      Problems will occur with return address is IRQ executes during the
@@ -125,15 +125,15 @@ struct mcu_type_s
 
   /* Core Erratum:  Must not skip 2-word instruction.  */
   int errata_skip;
-  
+
   /* Start of data section.  */
   int data_section_start;
-  
+
   /* Number of 64k segments in the flash.  */
   int n_flash;
 
   /* Name of device library.  */
-  const char *const library_name; 
+  const char *const library_name;
 };
 
 /* Map architecture to its texinfo string.  */
index 14c89aa5bb0093662c7082eb723408815340be80..f8b2b200e0b181df86b96272fd279076de49da48 100644 (file)
@@ -40,7 +40,7 @@ avr_register_target_pragmas (void)
   gcc_assert (ADDR_SPACE_GENERIC == ADDR_SPACE_RAM);
 
   /* Register address spaces.  The order must be the same as in the respective
-     enum from avr.h (or designated initialized must be used in avr.c).  */
+     enum from avr.h (or designated initializers must be used in avr.c).  */
 
   for (i = 0; i < ADDR_SPACE_COUNT; i++)
     {
@@ -52,14 +52,14 @@ avr_register_target_pragmas (void)
 }
 
 
-/* Transorm LO into uppercase and write the result to UP.
+/* Transform LO into uppercase and write the result to UP.
    You must provide enough space for UP.  Return UP.  */
 
 static char*
 avr_toupper (char *up, const char *lo)
 {
   char *up0 = up;
-  
+
   for (; *lo; lo++, up++)
     *up = TOUPPER (*lo);
 
@@ -67,7 +67,7 @@ avr_toupper (char *up, const char *lo)
 
   return up0;
 }
-             
+
 /* Worker function for TARGET_CPU_CPP_BUILTINS.  */
 
 static const char *const avr_builtin_name[] =
@@ -82,7 +82,7 @@ void
 avr_cpu_cpp_builtins (struct cpp_reader *pfile)
 {
   int i;
-  
+
   builtin_define_std ("AVR");
 
   if (avr_current_arch->macro)
@@ -139,24 +139,24 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile)
   if (avr_current_device->errata_skip)
     {
       cpp_define (pfile, "__AVR_ERRATA_SKIP__");
-      
+
       if (avr_current_arch->have_jmp_call)
         cpp_define (pfile, "__AVR_ERRATA_SKIP_JMP_CALL__");
     }
 
   cpp_define_formatted (pfile, "__AVR_SFR_OFFSET__=0x%x",
                         avr_current_arch->sfr_offset);
-    
+
 #ifdef WITH_AVRLIBC
   cpp_define (pfile, "__WITH_AVRLIBC__");
 #endif /* WITH_AVRLIBC */
-      
-  /* Define builtin macros so that the user can easily query if or if not
-     non-generic address spaces (and which) are supported.
+
+  /* Define builtin macros so that the user can easily query whether
+     non-generic address spaces (and which) are supported or not.
      This is only supported for C.  For C++, a language extension is needed
      (as mentioned in ISO/IEC DTR 18037; Annex F.2) which is not
      implemented in GCC up to now.  */
-  
+
   if (!strcmp (lang_hooks.name, "GNU C"))
     {
       for (i = 0; i < ADDR_SPACE_COUNT; i++)
@@ -174,8 +174,8 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile)
           }
     }
 
-  /* Define builtin macros so that the user can easily query if or
-     if not a specific builtin is available. */
+  /* Define builtin macros so that the user can easily query whether or
+     not a specific builtin is available. */
 
   for (i = 0; avr_builtin_name[i]; i++)
     {
index d85d640f325a9db6cabbbc9736809f20422b9a4f..6fa700bc260ad6af4ea9cb9bdf239d06413347b4 100644 (file)
@@ -35,7 +35,7 @@ avr_arch_types[] =
   /*
     A  M  J  LM E  E  E  X  R   d S   S O   A
     S  U  M  PO L  L  I  M  A   a t   F ff  r
-    M  L  P  MV P  P  J  E  M   t a   R s   c 
+    M  L  P  MV P  P  J  E  M   t a   R s   c
              XW M  M  M  G  P   a r     e   h
                    X  P  A  D     t     t   ID   */
   { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0x0060, 32, "1",   "avr1"  },
index 5147cd1cafdb62562984a722f5ead2a14e0a6ae0..71793fd587751c2b4eef551583951c62fd5fd812 100644 (file)
@@ -31,7 +31,7 @@
 ;; The DImode insns are all straight forward -- except movdi.  The approach
 ;; of this implementation is to provide DImode insns without the burden of
 ;; introducing movdi.
-;; 
+;;
 ;; The caveat is that if there are insns for some mode, there must also be a
 ;; respective move insn that describes reloads.  Therefore, this
 ;; implementation uses an accumulator-based model with two hard-coded,
@@ -75,7 +75,7 @@
       {
         emit_move_insn (gen_rtx_REG (QImode, REG_X), operands[2]);
         emit_insn (gen_adddi3_const8_insn ());
-      }        
+      }
     else if (const_operand (operands[2], GET_MODE (operands[2])))
       {
         emit_insn (gen_add<mode>3_const_insn (operands[2]));
       {
         emit_move_insn (gen_rtx_REG (QImode, REG_X), operands[2]);
         emit_insn (gen_compare_const8_di2 ());
-      }        
+      }
     else if (const_operand (operands[2], GET_MODE (operands[2])))
       {
         emit_insn (gen_compare_const_<mode>2 (operands[2]));
index 6ea0b834bf6c5da1b992978fc7a59e9d10ff55bc..9e538e601248964ef0c9594e98640453dec275a8 100644 (file)
@@ -41,8 +41,8 @@
    avr_edump (fmt, ...) is a shortcut for avr_fdump (stderr, fmt, ...)
 
   == known %-codes ==
-  
-  b: bool  
+
+  b: bool
   r: rtx
   t: tree
   T: tree (brief)
@@ -55,7 +55,7 @@
   H: location_t
 
   == no arguments ==
-  
+
   A: call abort()
   f: current_function_name()
   F: caller (via __FUNCTION__)
@@ -65,7 +65,7 @@
      else return.
 
   == same as printf ==
-  
+
   %: %
   c: char
   s: string
@@ -95,11 +95,11 @@ static int
 avr_log_fdump_e (const char *fmt, ...)
 {
   va_list ap;
-        
+
   va_start (ap, fmt);
   avr_log_vadump (stderr, fmt, ap);
   va_end (ap);
-    
+
   return 1;
 }
 
@@ -107,12 +107,12 @@ static int
 avr_log_fdump_f (FILE *stream, const char *fmt, ...)
 {
   va_list ap;
-        
+
   va_start (ap, fmt);
   if (stream)
     avr_log_vadump (stream, fmt, ap);
   va_end (ap);
-    
+
   return 1;
 }
 
@@ -124,7 +124,7 @@ avr_log_set_caller_e (const char *caller)
      )(const char*, ...)
 {
   avr_log_caller = caller;
-  
+
   return avr_log_fdump_e;
 }
 
@@ -192,19 +192,19 @@ avr_log_vadump (FILE *file, const char *fmt, va_list ap)
         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);
@@ -222,15 +222,15 @@ avr_log_vadump (FILE *file, const char *fmt, va_list ap)
                   }
                 break;
               }
-              
+
             case 'T':
               print_node_brief (file, "", va_arg (ap, tree), 3);
               break;
-              
+
             case 'd':
               fprintf (file, "%d", va_arg (ap, int));
               break;
-              
+
             case 'D':
               dump_double_int (file, va_arg (ap, double_int), false);
               break;
@@ -238,23 +238,23 @@ avr_log_vadump (FILE *file, const char *fmt, va_list ap)
             case 'X':
               avr_dump_double_int_hex (file, va_arg (ap, double_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 = va_arg (ap, rtx);
@@ -267,39 +267,40 @@ avr_log_vadump (FILE *file, const char *fmt, va_list ap)
                   }
                 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 ((enum machine_mode) va_arg (ap, int)), file);
+              fputs (GET_MODE_NAME ((enum 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 (avr_log_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)
@@ -307,45 +308,45 @@ avr_log_vadump (FILE *file, const char *fmt, va_list ap)
                 else
                   fprintf (file, "%s:%d",
                            LOCATION_FILE (loc), LOCATION_LINE (loc));
-                
+
                 break;
               }
-              
+
             case '!':
               if (!current_pass)
                 return;
               /* FALLTHRU */
-              
+
             case '?':
               avr_log_fdump_f (file, "%F[%f:%P]");
               break;
-                        
+
             case 'P':
               if (current_pass)
-                fprintf (file, "%s(%d)", 
+                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);
 }
 
@@ -357,14 +358,14 @@ void
 avr_log_set_avr_log (void)
 {
   bool all = TARGET_ALL_DEBUG != 0;
-  
+
   if (all || avr_log_details)
     {
       /* Adding , at beginning and end of string makes searching easier.  */
-      
+
       char *str = (char*) alloca (3 + strlen (avr_log_details));
       bool info;
-      
+
       str[0] = ',';
       strcat (stpcpy (str+1, avr_log_details), ",");
 
index bddca775bdfa0d3a8e4286f2af8dd332bf17e3ca..5246d063799f7b3b69af04f7a9f66a89d65aa006 100644 (file)
    <http://www.gnu.org/licenses/>.  */
 
 
-extern int function_arg_regno_p (int r);
+extern int avr_function_arg_regno_p (int r);
 extern void avr_cpu_cpp_builtins (struct cpp_reader * pfile);
 extern enum reg_class avr_regno_reg_class (int r);
 extern void asm_globalize_label (FILE *file, const char *name);
-extern void order_regs_for_local_alloc (void);
+extern void avr_adjust_reg_alloc_order (void);
 extern int avr_initial_elimination_offset (int from, int to);
 extern int avr_simple_epilogue (void);
 extern int avr_hard_regno_rename_ok (unsigned int, unsigned int);
@@ -38,8 +38,7 @@ extern void asm_output_external (FILE *file, tree decl, char *name);
 extern int avr_progmem_p (tree decl, tree attributes);
 
 #ifdef RTX_CODE /* inside TREE_CODE */
-extern void init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype,
-                                 rtx libname, tree fndecl);
+extern void avr_init_cumulative_args (CUMULATIVE_ARGS*, tree, rtx, tree);
 #endif /* RTX_CODE inside TREE_CODE */
 
 #endif /* TREE_CODE */
@@ -78,8 +77,8 @@ extern bool avr_rotate_bytes (rtx operands[]);
 extern const char* avr_out_fract (rtx, rtx[], bool, int*);
 extern rtx avr_to_int_mode (rtx);
 
-extern void expand_prologue (void);
-extern void expand_epilogue (bool);
+extern void avr_expand_prologue (void);
+extern void avr_expand_epilogue (bool);
 extern bool avr_emit_movmemhi (rtx*);
 extern int avr_epilogue_uses (int regno);
 extern int avr_starting_frame_offset (void);
@@ -96,12 +95,12 @@ extern bool avr_popcount_each_byte (rtx, int, int);
 extern bool avr_has_nibble_0xf (rtx);
 
 extern int extra_constraint_Q (rtx x);
-extern int adjust_insn_length (rtx insn, int len);
+extern int avr_adjust_insn_length (rtx insn, int len);
 extern const char* output_reload_inhi (rtx*, rtx, int*);
 extern const char* output_reload_insisf (rtx*, rtx, int*);
 extern const char* avr_out_reload_inpsi (rtx*, rtx, int*);
 extern const char* avr_out_lpm (rtx, rtx*, int*);
-extern void notice_update_cc (rtx body, rtx insn);
+extern void avr_notice_update_cc (rtx body, rtx insn);
 extern int reg_unused_after (rtx insn, rtx reg);
 extern int _reg_unused_after (rtx insn, rtx reg);
 extern int avr_jump_mode (rtx x, rtx insn);
@@ -109,7 +108,7 @@ extern int test_hard_reg_class (enum reg_class rclass, rtx x);
 extern int jump_over_one_insn_p (rtx insn, rtx dest);
 
 extern int avr_hard_regno_mode_ok (int regno, enum machine_mode mode);
-extern void final_prescan_insn (rtx insn, rtx *operand, int num_operands);
+extern void avr_final_prescan_insn (rtx insn, rtx *operand, int num_operands);
 extern int avr_simplify_comparison_p (enum machine_mode mode,
                                      RTX_CODE op, rtx x);
 extern RTX_CODE avr_normalize_condition (RTX_CODE condition);
index 3d43e83f11514b2615ce8bdda83768bd0a21a99c..8e7278f389a10edc606f44b82f262cd1baa9eeb2 100644 (file)
@@ -30,7 +30,7 @@ along with GCC; see the file COPYING3.  If not see
    - For the same reason, [u]int_fast8_t is defined as 8-bit type.
 
 */
-   
+
 #define SIG_ATOMIC_TYPE "char"
 
 #define INT8_TYPE "signed char"
index 163c8f246fda321499e024b4aafd0232d64c1ba9..93f174b90f3d88f1c8955f6f83a6b49f48c4c433 100644 (file)
@@ -56,7 +56,7 @@
 
 /* The 4 bits starting at SECTION_MACH_DEP are reserved to store the
    address space where data is to be located.
-   As the only non-generic address spaces are all located in Flash,
+   As the only non-generic address spaces are all located in flash,
    this can be used to test if data shall go into some .progmem* section.
    This must be the rightmost field of machine dependent section flags.  */
 #define AVR_SECTION_PROGMEM (0xf * SECTION_MACH_DEP)
@@ -94,10 +94,10 @@ const avr_addrspace_t avr_addrspace[ADDR_SPACE_COUNT] =
 
 /* Holding RAM addresses of some SFRs used by the compiler and that
    are unique over all devices in an architecture like 'avr4'.  */
-  
+
 typedef struct
 {
-  /* SREG: The pocessor status */
+  /* SREG: The processor status */
   int sreg;
 
   /* RAMPX, RAMPY, RAMPD and CCP of XMEGA */
@@ -106,7 +106,7 @@ typedef struct
   int rampx;
   int rampy;
 
-  /* RAMPZ: The high byte of 24-bit address used with ELPM */ 
+  /* RAMPZ: The high byte of 24-bit address used with ELPM */
   int rampz;
 
   /* SP: The stack pointer and its low and high byte */
@@ -139,7 +139,7 @@ static struct machine_function * avr_init_machine_status (void);
 
 /* Prototypes for hook implementors if needed before their implementation.  */
 
-static bool avr_rtx_costs (rtx, int, int, int, int *, bool);
+static bool avr_rtx_costs (rtx, int, int, int, int*, bool);
 
 
 /* Allocate registers from r25 to r8 for parameters for function calls.  */
@@ -227,7 +227,7 @@ avr_popcount (unsigned int val)
    Return true if the least significant N_BYTES bytes of XVAL all have a
    popcount in POP_MASK and false, otherwise.  POP_MASK represents a subset
    of integers which contains an integer N iff bit N of POP_MASK is set.  */
-   
+
 bool
 avr_popcount_each_byte (rtx xval, int n_bytes, int pop_mask)
 {
@@ -276,10 +276,10 @@ avr_option_override (void)
      to pseudos that cross calls and tries so save-restore them around calls
      in order to reduce the number of stack slots needed.
 
-     This might leads to situations where reload is no more able to cope
+     This might lead to situations where reload is no more able to cope
      with the challenge of AVR's very few address registers and fails to
      perform the requested spills.  */
-  
+
   if (avr_strict_X)
     flag_caller_saves = 0;
 
@@ -296,8 +296,8 @@ avr_option_override (void)
 
   avr_current_device = &avr_mcu_types[avr_mcu_index];
   avr_current_arch = &avr_arch_types[avr_current_device->arch];
-  
-  /* RAM addresses of some SFRs common to all Devices in respective Arch. */
+
+  /* RAM addresses of some SFRs common to all devices in respective arch. */
 
   /* SREG: Status Register containing flags like I (global IRQ) */
   avr_addr.sreg = 0x3F + avr_current_arch->sfr_offset;
@@ -356,6 +356,7 @@ avr_init_expanders (void)
 }
 
 
+/* Implement `REGNO_REG_CLASS'.  */
 /* Return register class for register R.  */
 
 enum reg_class
@@ -386,7 +387,7 @@ avr_regno_reg_class (int r)
 
   if (r <= 33)
     return reg_class_tab[r];
-  
+
   return ALL_REGS;
 }
 
@@ -406,7 +407,7 @@ avr_scalar_mode_supported_p (enum machine_mode mode)
 }
 
 
-/* Return TRUE if DECL is a VAR_DECL located in Flash and FALSE, otherwise.  */
+/* Return TRUE if DECL is a VAR_DECL located in flash and FALSE, otherwise.  */
 
 static bool
 avr_decl_flash_p (tree decl)
@@ -421,9 +422,9 @@ avr_decl_flash_p (tree decl)
 }
 
 
-/* Return TRUE if DECL is a VAR_DECL located in the 24-bit Flash
+/* Return TRUE if DECL is a VAR_DECL located in the 24-bit flash
    address space and FALSE, otherwise.  */
+
 static bool
 avr_decl_memx_p (tree decl)
 {
@@ -437,7 +438,7 @@ avr_decl_memx_p (tree decl)
 }
 
 
-/* Return TRUE if X is a MEM rtx located in Flash and FALSE, otherwise.  */
+/* Return TRUE if X is a MEM rtx located in flash and FALSE, otherwise.  */
 
 bool
 avr_mem_flash_p (rtx x)
@@ -447,7 +448,7 @@ avr_mem_flash_p (rtx x)
 }
 
 
-/* Return TRUE if X is a MEM rtx located in the 24-bit Flash
+/* Return TRUE if X is a MEM rtx located in the 24-bit flash
    address space and FALSE, otherwise.  */
 
 bool
@@ -470,13 +471,13 @@ avr_lookup_function_attribute1 (const_tree func, const char *name)
         {
           return true;
         }
-      
+
       func = TREE_TYPE (func);
     }
 
   gcc_assert (TREE_CODE (func) == FUNCTION_TYPE
               || TREE_CODE (func) == METHOD_TYPE);
-  
+
   return NULL_TREE != lookup_attribute (name, TYPE_ATTRIBUTES (func));
 }
 
@@ -568,7 +569,7 @@ avr_set_current_function (tree decl)
       tree args = TYPE_ARG_TYPES (TREE_TYPE (decl));
       tree ret = TREE_TYPE (TREE_TYPE (decl));
       const char *name = IDENTIFIER_POINTER (DECL_NAME (decl));
-      
+
       /* Silently ignore 'signal' if 'interrupt' is present.  AVR-LibC startet
          using this when it switched from SIGNAL and INTERRUPT to ISR.  */
 
@@ -592,8 +593,8 @@ avr_set_current_function (tree decl)
                     name, isr);
     }
 
-  /* Avoid the above diagnosis to be printed more than once.  */
-  
+  /* Don't print the above diagnostics more than once.  */
+
   cfun->machine->attributes_checked_p = 1;
 }
 
@@ -612,7 +613,7 @@ avr_accumulate_outgoing_args (void)
         virtual_stack_vars_rtx.  For example code see
             gcc.c-torture/execute/built-in-setjmp.c
             gcc.c-torture/execute/builtins/sprintf-chk.c   */
-  
+
   return (TARGET_ACCUMULATE_OUTGOING_ARGS
           && !(cfun->calls_setjmp
                || cfun->has_nonlocal_label));
@@ -652,8 +653,9 @@ avr_regs_to_save (HARD_REG_SET *set)
     CLEAR_HARD_REG_SET (*set);
   count = 0;
 
-  /* No need to save any registers if the function never returns or 
+  /* No need to save any registers if the function never returns or
      has the "OS_task" or "OS_main" attribute.  */
+
   if (TREE_THIS_VOLATILE (current_function_decl)
       || cfun->machine->is_OS_task
       || cfun->machine->is_OS_main)
@@ -663,6 +665,7 @@ avr_regs_to_save (HARD_REG_SET *set)
     {
       /* Do not push/pop __tmp_reg__, __zero_reg__, as well as
          any global register variables.  */
+
       if (fixed_regs[reg])
         continue;
 
@@ -699,19 +702,20 @@ avr_can_eliminate (const int from, const int to)
 {
   return ((from == ARG_POINTER_REGNUM && to == FRAME_POINTER_REGNUM)
           || (frame_pointer_needed && to == FRAME_POINTER_REGNUM)
-          || ((from == FRAME_POINTER_REGNUM 
+          || ((from == FRAME_POINTER_REGNUM
                || from == FRAME_POINTER_REGNUM + 1)
               && !frame_pointer_needed));
 }
 
 
-/* Implement TARGET_WARN_FUNC_RETURN.  */
+/* Implement `TARGET_WARN_FUNC_RETURN'.  */
 
 static bool
 avr_warn_func_return (tree decl)
 {
   /* Naked functions are implemented entirely in assembly, including the
      return sequence, so suppress warnings about this.  */
+
   return !avr_naked_function_p (decl);
 }
 
@@ -726,7 +730,7 @@ avr_initial_elimination_offset (int from, int to)
     {
       int offset = frame_pointer_needed ? 2 : 0;
       int avr_pc_size = AVR_HAVE_EIJMP_EICALL ? 3 : 2;
-      
+
       offset += avr_regs_to_save (NULL);
       return (get_frame_size () + avr_outgoing_args_size()
               + avr_pc_size + 1 + offset);
@@ -779,13 +783,13 @@ avr_build_builtin_va_list (void)
   sat_long_long_accum_type_node = sat_ta_type_node;
 
   /* Dispatch to the default handler.  */
-  
+
   return std_build_builtin_va_list ();
 }
 
 
 /* Implement `TARGET_BUILTIN_SETJMP_FRAME_VALUE'.  */
-/* Actual start of frame is virtual_stack_vars_rtx this is offset from 
+/* Actual start of frame is virtual_stack_vars_rtx this is offset from
    frame pointer by +STARTING_FRAME_OFFSET.
    Using saved frame = virtual_stack_vars_rtx - STARTING_FRAME_OFFSET
    avoids creating add/sub of offset in nonlocal goto and setjmp.  */
@@ -800,13 +804,14 @@ avr_builtin_setjmp_frame_value (void)
 }
 
 
-/* Return contents of MEM at frame pointer + stack size + 1 (+2 if 3 byte PC).
+/* Return contents of MEM at frame pointer + stack size + 1 (+2 if 3-byte PC).
    This is return address of function.  */
-rtx 
+
+rtx
 avr_return_addr_rtx (int count, rtx tem)
 {
   rtx r;
-    
+
   /* Can only return this function's return address. Others not supported.  */
   if (count)
      return NULL;
@@ -814,7 +819,8 @@ avr_return_addr_rtx (int count, rtx tem)
   if (AVR_3_BYTE_PC)
     {
       r = gen_rtx_SYMBOL_REF (Pmode, ".L__stack_usage+2");
-      warning (0, "'builtin_return_address' contains only 2 bytes of address");
+      warning (0, "%<builtin_return_address%> contains only 2 bytes"
+               " of address");
     }
   else
     r = gen_rtx_SYMBOL_REF (Pmode, ".L__stack_usage+1");
@@ -846,8 +852,8 @@ static int
 sequent_regs_live (void)
 {
   int reg;
-  int live_seq=0;
-  int cur_seq=0;
+  int live_seq = 0;
+  int cur_seq = 0;
 
   for (reg = 0; reg < 18; ++reg)
     {
@@ -855,42 +861,42 @@ sequent_regs_live (void)
         {
           /* Don't recognize sequences that contain global register
              variables.  */
-      
+
           if (live_seq != 0)
             return 0;
           else
             continue;
         }
-      
+
       if (!call_used_regs[reg])
-       {
-         if (df_regs_ever_live_p (reg))
-           {
-             ++live_seq;
-             ++cur_seq;
-           }
-         else
-           cur_seq = 0;
-       }
+        {
+          if (df_regs_ever_live_p (reg))
+            {
+              ++live_seq;
+              ++cur_seq;
+            }
+          else
+            cur_seq = 0;
+        }
     }
 
   if (!frame_pointer_needed)
     {
       if (df_regs_ever_live_p (REG_Y))
-       {
-         ++live_seq;
-         ++cur_seq;
-       }
+        {
+          ++live_seq;
+          ++cur_seq;
+        }
       else
-       cur_seq = 0;
+        cur_seq = 0;
 
       if (df_regs_ever_live_p (REG_Y+1))
-       {
-         ++live_seq;
-         ++cur_seq;
-       }
+        {
+          ++live_seq;
+          ++cur_seq;
+        }
       else
-       cur_seq = 0;
+        cur_seq = 0;
     }
   else
     {
@@ -907,14 +913,15 @@ get_sequence_length (rtx insns)
 {
   rtx insn;
   int length;
-  
+
   for (insn = insns, length = 0; insn; insn = NEXT_INSN (insn))
     length += get_attr_length (insn);
-               
+
   return length;
 }
 
-/*  Implement INCOMING_RETURN_ADDR_RTX.  */
+
+/*  Implement `INCOMING_RETURN_ADDR_RTX'.  */
 
 rtx
 avr_incoming_return_addr_rtx (void)
@@ -951,14 +958,14 @@ static void
 emit_push_sfr (rtx sfr, bool frame_related_p, bool clr_p)
 {
   rtx insn;
-  
+
   gcc_assert (MEM_P (sfr));
 
   /* IN __tmp_reg__, IO(SFR) */
   insn = emit_move_insn (tmp_reg_rtx, sfr);
   if (frame_related_p)
     RTX_FRAME_RELATED_P (insn) = 1;
-  
+
   /* PUSH __tmp_reg__ */
   emit_push_byte (TMP_REGNO, frame_related_p);
 
@@ -987,17 +994,17 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
                    && !isr_p
                    && !cfun->machine->is_OS_task
                    && !cfun->machine->is_OS_main);
-  
+
   if (minimize
       && (frame_pointer_needed
           || avr_outgoing_args_size() > 8
           || (AVR_2_BYTE_PC && live_seq > 6)
-          || live_seq > 7)) 
+          || live_seq > 7))
     {
       rtx pattern;
       int first_reg, reg, offset;
 
-      emit_move_insn (gen_rtx_REG (HImode, REG_X), 
+      emit_move_insn (gen_rtx_REG (HImode, REG_X),
                       gen_int_mode (size, HImode));
 
       pattern = gen_call_prologue_saves (gen_int_mode (live_seq, HImode),
@@ -1042,7 +1049,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
   else /* !minimize */
     {
       int reg;
-      
+
       for (reg = 0; reg < 32; ++reg)
         if (TEST_HARD_REG_BIT (set, reg))
           emit_push_byte (reg, true);
@@ -1053,18 +1060,18 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
           /* Push frame pointer.  Always be consistent about the
              ordering of pushes -- epilogue_restores expects the
              register pair to be pushed low byte first.  */
-          
+
           emit_push_byte (REG_Y, true);
           emit_push_byte (REG_Y + 1, true);
         }
-          
+
       if (frame_pointer_needed
           && size == 0)
         {
           insn = emit_move_insn (frame_pointer_rtx, stack_pointer_rtx);
           RTX_FRAME_RELATED_P (insn) = 1;
         }
-      
+
       if (size != 0)
         {
           /*  Creating a frame can be done by direct manipulation of the
@@ -1087,7 +1094,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
                  In an interrupt routine, the case of SIZE != 0 together with
               !frame_pointer_needed can only occur if the function is not a
               leaf function and thus X has already been saved.  */
-              
+
           int irq_state = -1;
           HOST_WIDE_INT size_cfa = size;
           rtx fp_plus_insns, fp, my_fp;
@@ -1095,11 +1102,11 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
           gcc_assert (frame_pointer_needed
                       || !isr_p
                       || !crtl->is_leaf);
-          
+
           fp = my_fp = (frame_pointer_needed
                         ? frame_pointer_rtx
                         : gen_rtx_REG (Pmode, REG_X));
-          
+
           if (AVR_HAVE_8BIT_SP)
             {
               /* The high byte (r29) does not change:
@@ -1116,21 +1123,21 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
               /* Don't error so that insane code from newlib still compiles
                  and does not break building newlib.  As PR51345 is implemented
                  now, there are multilib variants with -msp8.
-                 
+
                  If user wants sanity checks he can use -Wstack-usage=
                  or similar options.
 
                  For CFA we emit the original, non-saturated size so that
                  the generic machinery is aware of the real stack usage and
                  will print the above diagnostic as expected.  */
-              
+
               size = size_max;
             }
 
           size = trunc_int_for_mode (size, GET_MODE (my_fp));
-          
+
           /************  Method 1: Adjust frame pointer  ************/
-          
+
           start_sequence ();
 
           /* Normally, the dwarf2out frame-related-expr interpreter does
@@ -1138,7 +1145,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
              set up.  Thus, we avoid marking the move insn below and
              instead indicate that the entire operation is complete after
              the frame pointer subtraction is done.  */
-          
+
           insn = emit_move_insn (fp, stack_pointer_rtx);
           if (frame_pointer_needed)
             {
@@ -1157,7 +1164,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
                                          plus_constant (Pmode, fp,
                                                         -size_cfa)));
             }
-          
+
           /* Copy to stack pointer.  Note that since we've already
              changed the CFA to the frame pointer this operation
              need not be annotated if frame pointer is needed.
@@ -1186,19 +1193,19 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
                                                         stack_pointer_rtx,
                                                         -size_cfa)));
             }
-          
+
           fp_plus_insns = get_insns ();
           end_sequence ();
-          
+
           /************  Method 2: Adjust Stack pointer  ************/
 
           /* Stack adjustment by means of RCALL . and/or PUSH __TMP_REG__
              can only handle specific offsets.  */
-          
+
           if (avr_sp_immediate_operand (gen_int_mode (-size, HImode), HImode))
             {
               rtx sp_plus_insns;
-              
+
               start_sequence ();
 
               insn = emit_move_insn (stack_pointer_rtx,
@@ -1208,7 +1215,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
               add_reg_note (insn, REG_CFA_ADJUST_CFA,
                             gen_rtx_SET (VOIDmode, stack_pointer_rtx,
                                          plus_constant (Pmode,
-                                                       stack_pointer_rtx,
+                                                        stack_pointer_rtx,
                                                         -size_cfa)));
               if (frame_pointer_needed)
                 {
@@ -1220,7 +1227,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
               end_sequence ();
 
               /************ Use shortest method  ************/
-                  
+
               emit_insn (get_sequence_length (sp_plus_insns)
                          < get_sequence_length (fp_plus_insns)
                          ? sp_plus_insns
@@ -1240,15 +1247,15 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set)
 /*  Output function prologue.  */
 
 void
-expand_prologue (void)
+avr_expand_prologue (void)
 {
   HARD_REG_SET set;
   HOST_WIDE_INT size;
 
   size = get_frame_size() + avr_outgoing_args_size();
-  
+
   cfun->machine->stack_usage = 0;
-  
+
   /* Prologue: naked.  */
   if (cfun->machine->is_naked)
     {
@@ -1262,7 +1269,7 @@ expand_prologue (void)
       /* Enable interrupts.  */
       if (cfun->machine->is_interrupt)
         emit_insn (gen_enable_interrupt ());
-        
+
       /* Push zero reg.  */
       emit_push_byte (ZERO_REGNO, true);
 
@@ -1281,7 +1288,7 @@ expand_prologue (void)
 
       /* Push and clear RAMPD/X/Y/Z if present and low-part register is used.
          ??? There are no dwarf2 columns reserved for RAMPD/X/Y/Z.  */
-      
+
       if (AVR_HAVE_RAMPD)
         emit_push_sfr (rampd_rtx, false /* frame-related */, true /* clr */);
 
@@ -1309,11 +1316,13 @@ expand_prologue (void)
     }  /* is_interrupt is_signal */
 
   avr_prologue_setup_frame (size, set);
-  
+
   if (flag_stack_usage_info)
     current_function_static_stack_size = cfun->machine->stack_usage;
 }
 
+
+/* Implement `TARGET_ASM_FUNCTION_END_PROLOGUE'.  */
 /* Output summary at end of function prologue.  */
 
 static void
@@ -1351,19 +1360,19 @@ avr_asm_function_end_prologue (FILE *file)
 }
 
 
-/* Implement EPILOGUE_USES.  */
+/* Implement `EPILOGUE_USES'.  */
 
 int
 avr_epilogue_uses (int regno ATTRIBUTE_UNUSED)
 {
-  if (reload_completed 
+  if (reload_completed
       && cfun->machine
       && (cfun->machine->is_interrupt || cfun->machine->is_signal))
     return 1;
   return 0;
 }
 
-/*  Helper for expand_epilogue.  Emit a pop of a byte register.  */
+/*  Helper for avr_expand_epilogue.  Emit a pop of a byte register.  */
 
 static void
 emit_pop_byte (unsigned regno)
@@ -1380,42 +1389,42 @@ emit_pop_byte (unsigned regno)
 /*  Output RTL epilogue.  */
 
 void
-expand_epilogue (bool sibcall_p)
+avr_expand_epilogue (bool sibcall_p)
 {
   int reg;
   int live_seq;
-  HARD_REG_SET set;      
+  HARD_REG_SET set;
   int minimize;
   HOST_WIDE_INT size;
   bool isr_p = cfun->machine->is_interrupt || cfun->machine->is_signal;
 
   size = get_frame_size() + avr_outgoing_args_size();
-  
+
   /* epilogue: naked  */
   if (cfun->machine->is_naked)
     {
       gcc_assert (!sibcall_p);
-      
+
       emit_jump_insn (gen_return ());
       return;
     }
 
   avr_regs_to_save (&set);
   live_seq = sequent_regs_live ();
-  
+
   minimize = (TARGET_CALL_PROLOGUES
               && live_seq
               && !isr_p
               && !cfun->machine->is_OS_task
               && !cfun->machine->is_OS_main);
-  
+
   if (minimize
       && (live_seq > 4
           || frame_pointer_needed
           || size))
     {
       /*  Get rid of frame.  */
-      
+
       if (!frame_pointer_needed)
         {
           emit_move_insn (frame_pointer_rtx, stack_pointer_rtx);
@@ -1426,11 +1435,11 @@ expand_epilogue (bool sibcall_p)
           emit_move_insn (frame_pointer_rtx,
                           plus_constant (Pmode, frame_pointer_rtx, size));
         }
-        
+
       emit_insn (gen_epilogue_restores (gen_int_mode (live_seq, HImode)));
       return;
     }
-      
+
   if (size)
     {
       /* Try two methods to adjust stack and select shortest.  */
@@ -1443,7 +1452,7 @@ expand_epilogue (bool sibcall_p)
       gcc_assert (frame_pointer_needed
                   || !isr_p
                   || !crtl->is_leaf);
-      
+
       fp = my_fp = (frame_pointer_needed
                     ? frame_pointer_rtx
                     : gen_rtx_REG (Pmode, REG_X));
@@ -1452,7 +1461,7 @@ expand_epilogue (bool sibcall_p)
         {
           /* The high byte (r29) does not change:
              Prefer SUBI (1 cycle) over SBIW (2 cycles).  */
-                  
+
           my_fp = all_regs_rtx[FRAME_POINTER_REGNUM];
         }
 
@@ -1462,9 +1471,9 @@ expand_epilogue (bool sibcall_p)
       if (size > size_max)
         size = size_max;
       size = trunc_int_for_mode (size, GET_MODE (my_fp));
-              
+
       /********** Method 1: Adjust fp register  **********/
-              
+
       start_sequence ();
 
       if (!frame_pointer_needed)
@@ -1484,10 +1493,10 @@ expand_epilogue (bool sibcall_p)
                                  GEN_INT (irq_state)));
 
       fp_plus_insns = get_insns ();
-      end_sequence ();        
+      end_sequence ();
 
       /********** Method 2: Adjust Stack pointer  **********/
-      
+
       if (avr_sp_immediate_operand (gen_int_mode (size, HImode), HImode))
         {
           rtx sp_plus_insns;
@@ -1501,7 +1510,7 @@ expand_epilogue (bool sibcall_p)
           end_sequence ();
 
           /************ Use shortest method  ************/
-          
+
           emit_insn (get_sequence_length (sp_plus_insns)
                      < get_sequence_length (fp_plus_insns)
                      ? sp_plus_insns
@@ -1510,19 +1519,19 @@ expand_epilogue (bool sibcall_p)
       else
         emit_insn (fp_plus_insns);
     } /* size != 0 */
-          
+
   if (frame_pointer_needed
       && !(cfun->machine->is_OS_task || cfun->machine->is_OS_main))
     {
-      /* Restore previous frame_pointer.  See expand_prologue for
+      /* Restore previous frame_pointer.  See avr_expand_prologue for
          rationale for not using pophi.  */
-              
+
       emit_pop_byte (REG_Y + 1);
       emit_pop_byte (REG_Y);
     }
 
   /* Restore used registers.  */
-  
+
   for (reg = 31; reg >= 0; --reg)
     if (TEST_HARD_REG_BIT (set, reg))
       emit_pop_byte (reg);
@@ -1531,7 +1540,7 @@ expand_epilogue (bool sibcall_p)
     {
       /* Restore RAMPZ/Y/X/D using tmp_reg as scratch.
          The conditions to restore them must be tha same as in prologue.  */
-      
+
       if (AVR_HAVE_RAMPZ
           && TEST_HARD_REG_BIT (set, REG_Z)
           && TEST_HARD_REG_BIT (set, REG_Z + 1))
@@ -1564,7 +1573,7 @@ expand_epilogue (bool sibcall_p)
         }
 
       /* Restore SREG using tmp_reg as scratch.  */
-      
+
       emit_pop_byte (TMP_REGNO);
       emit_move_insn (sreg_rtx, tmp_reg_rtx);
 
@@ -1579,7 +1588,8 @@ expand_epilogue (bool sibcall_p)
     emit_jump_insn (gen_return ());
 }
 
-/* Output summary messages at beginning of function epilogue.  */
+
+/* Implement `TARGET_ASM_FUNCTION_BEGIN_EPILOGUE'.  */
 
 static void
 avr_asm_function_begin_epilogue (FILE *file)
@@ -1588,7 +1598,7 @@ avr_asm_function_begin_epilogue (FILE *file)
 }
 
 
-/* Implement TARGET_CANNOT_MODITY_JUMPS_P */
+/* Implement `TARGET_CANNOT_MODITY_JUMPS_P'.  */
 
 static bool
 avr_cannot_modify_jumps_p (void)
@@ -1596,7 +1606,7 @@ avr_cannot_modify_jumps_p (void)
 
   /* Naked Functions must not have any instructions after
      their epilogue, see PR42240 */
-     
+
   if (reload_completed
       && cfun->machine
       && cfun->machine->is_naked)
@@ -1645,7 +1655,7 @@ static bool
 avr_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
 {
   bool ok = CONSTANT_ADDRESS_P (x);
-  
+
   switch (GET_CODE (x))
     {
     case REG:
@@ -1670,7 +1680,7 @@ avr_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
       {
         rtx reg = XEXP (x, 0);
         rtx op1 = XEXP (x, 1);
-        
+
         if (REG_P (reg)
             && CONST_INT_P (op1)
             && INTVAL (op1) >= 0)
@@ -1682,7 +1692,7 @@ avr_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
                 ok = (! strict
                       || avr_reg_ok_for_addr_p (reg, ADDR_SPACE_GENERIC,
                                                 PLUS, strict));
-          
+
                 if (reg == frame_pointer_rtx
                     || reg == arg_pointer_rtx)
                   {
@@ -1697,18 +1707,18 @@ avr_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
           }
       }
       break;
-      
+
     default:
       break;
     }
-  
+
   if (avr_log.legitimate_address_p)
     {
       avr_edump ("\n%?: ret=%d, mode=%m strict=%d "
                  "reload_completed=%d reload_in_progress=%d %s:",
                  ok, mode, strict, reload_completed, reload_in_progress,
                  reg_renumber ? "(reg_renumber)" : "");
-      
+
       if (GET_CODE (x) == PLUS
           && REG_P (XEXP (x, 0))
           && CONST_INT_P (XEXP (x, 1))
@@ -1718,10 +1728,10 @@ avr_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
           avr_edump ("(r%d ---> r%d)", REGNO (XEXP (x, 0)),
                      true_regnum (XEXP (x, 0)));
         }
-      
+
       avr_edump ("\n%r\n", x);
     }
-  
+
   return ok;
 }
 
@@ -1735,9 +1745,9 @@ static rtx
 avr_legitimize_address (rtx x, rtx oldx, enum machine_mode mode)
 {
   bool big_offset_p = false;
-  
+
   x = oldx;
-  
+
   if (GET_CODE (oldx) == PLUS
       && REG_P (XEXP (oldx, 0)))
     {
@@ -1745,7 +1755,7 @@ avr_legitimize_address (rtx x, rtx oldx, enum machine_mode mode)
         x = force_reg (GET_MODE (oldx), oldx);
       else if (CONST_INT_P (XEXP (oldx, 1)))
         {
-         int offs = INTVAL (XEXP (oldx, 1));
+          int offs = INTVAL (XEXP (oldx, 1));
           if (frame_pointer_rtx != XEXP (oldx, 0)
               && offs > MAX_LD_OFFSET (mode))
             {
@@ -1754,7 +1764,7 @@ avr_legitimize_address (rtx x, rtx oldx, enum machine_mode mode)
             }
         }
     }
-  
+
   if (avr_log.legitimize_address)
     {
       avr_edump ("\n%?: mode=%m\n %r\n", mode, oldx);
@@ -1779,24 +1789,24 @@ avr_legitimize_reload_address (rtx *px, enum machine_mode mode,
                                rtx (*mk_memloc)(rtx,int))
 {
   rtx x = *px;
-  
+
   if (avr_log.legitimize_reload_address)
     avr_edump ("\n%?:%m %r\n", mode, x);
-  
+
   if (1 && (GET_CODE (x) == POST_INC
             || GET_CODE (x) == PRE_DEC))
     {
       push_reload (XEXP (x, 0), XEXP (x, 0), &XEXP (x, 0), &XEXP (x, 0),
                    POINTER_REGS, GET_MODE (x), GET_MODE (x), 0, 0,
                    opnum, RELOAD_OTHER);
-      
+
       if (avr_log.legitimize_reload_address)
         avr_edump (" RCLASS.1 = %R\n IN = %r\n OUT = %r\n",
                    POINTER_REGS, XEXP (x, 0), XEXP (x, 0));
-      
+
       return x;
     }
-  
+
   if (GET_CODE (x) == PLUS
       && REG_P (XEXP (x, 0))
       && 0 == reg_equiv_constant (REGNO (XEXP (x, 0)))
@@ -1804,30 +1814,30 @@ avr_legitimize_reload_address (rtx *px, enum machine_mode mode,
       && INTVAL (XEXP (x, 1)) >= 1)
     {
       bool fit = INTVAL (XEXP (x, 1)) <= MAX_LD_OFFSET (mode);
-      
+
       if (fit)
         {
           if (reg_equiv_address (REGNO (XEXP (x, 0))) != 0)
             {
               int regno = REGNO (XEXP (x, 0));
               rtx mem = mk_memloc (x, regno);
-              
+
               push_reload (XEXP (mem, 0), NULL_RTX, &XEXP (mem, 0), NULL,
                            POINTER_REGS, Pmode, VOIDmode, 0, 0,
                            1, (enum reload_type) addr_type);
-              
+
               if (avr_log.legitimize_reload_address)
                 avr_edump (" RCLASS.2 = %R\n IN = %r\n OUT = %r\n",
                            POINTER_REGS, XEXP (mem, 0), NULL_RTX);
-              
+
               push_reload (mem, NULL_RTX, &XEXP (x, 0), NULL,
                            BASE_POINTER_REGS, GET_MODE (x), VOIDmode, 0, 0,
                            opnum, (enum reload_type) type);
-              
+
               if (avr_log.legitimize_reload_address)
                 avr_edump (" RCLASS.2 = %R\n IN = %r\n OUT = %r\n",
                            BASE_POINTER_REGS, mem, NULL_RTX);
-              
+
               return x;
             }
         }
@@ -1837,15 +1847,15 @@ avr_legitimize_reload_address (rtx *px, enum machine_mode mode,
           push_reload (x, NULL_RTX, px, NULL,
                        POINTER_REGS, GET_MODE (x), VOIDmode, 0, 0,
                        opnum, (enum reload_type) type);
-          
+
           if (avr_log.legitimize_reload_address)
             avr_edump (" RCLASS.3 = %R\n IN = %r\n OUT = %r\n",
                        POINTER_REGS, x, NULL_RTX);
-          
+
           return x;
         }
     }
-  
+
   return NULL_RTX;
 }
 
@@ -1896,11 +1906,11 @@ avr_secondary_reload (bool in_p, rtx x,
 
 /* Helper function to print assembler resp. track instruction
    sequence lengths.  Always return "".
-   
+
    If PLEN == NULL:
        Output assembler code from template TPL with operands supplied
        by OPERANDS.  This is just forwarding to output_asm_insn.
-   
+
    If PLEN != NULL:
        If N_WORDS >= 0  Add N_WORDS to *PLEN.
        If N_WORDS < 0   Set *PLEN to -N_WORDS.
@@ -1928,7 +1938,7 @@ avr_asm_len (const char* tpl, rtx* operands, int* plen, int n_words)
 
 /* Return a pointer register name as a string.  */
 
-static const char *
+static const char*
 ptrreg_to_str (int regno)
 {
   switch (regno)
@@ -1946,7 +1956,7 @@ ptrreg_to_str (int regno)
 /* Return the condition name as a string.
    Used in conditional jump constructing  */
 
-static const char *
+static const char*
 cond_string (enum rtx_code code)
 {
   switch (code)
@@ -1957,14 +1967,14 @@ cond_string (enum rtx_code code)
       return "eq";
     case GE:
       if (cc_prev_status.flags & CC_OVERFLOW_UNUSABLE)
-       return "pl";
+        return "pl";
       else
-       return "ge";
+        return "ge";
     case LT:
       if (cc_prev_status.flags & CC_OVERFLOW_UNUSABLE)
-       return "mi";
+        return "mi";
       else
-       return "lt";
+        return "lt";
     case GEU:
       return "sh";
     case LTU:
@@ -1999,39 +2009,40 @@ avr_print_operand_address (FILE *file, rtx addr)
 
     default:
       if (CONSTANT_ADDRESS_P (addr)
-         && text_segment_operand (addr, VOIDmode))
-       {
-         rtx x = addr;
-         if (GET_CODE (x) == CONST)
-           x = XEXP (x, 0);
-         if (GET_CODE (x) == PLUS && GET_CODE (XEXP (x,1)) == CONST_INT)
-           {
-             /* Assembler gs() will implant word address. Make offset 
-                 a byte offset inside gs() for assembler. This is 
-                 needed because the more logical (constant+gs(sym)) is not 
-                 accepted by gas. For 128K and lower devices this is ok.
-                 For large devices it will create a Trampoline to offset
+          && text_segment_operand (addr, VOIDmode))
+        {
+          rtx x = addr;
+          if (GET_CODE (x) == CONST)
+            x = XEXP (x, 0);
+          if (GET_CODE (x) == PLUS && GET_CODE (XEXP (x,1)) == CONST_INT)
+            {
+              /* Assembler gs() will implant word address.  Make offset
+                 a byte offset inside gs() for assembler.  This is
+                 needed because the more logical (constant+gs(sym)) is not
+                 accepted by gas.  For 128K and smaller devices this is ok.
+                 For large devices it will create a trampoline to offset
                  from symbol which may not be what the user really wanted.  */
-             fprintf (file, "gs(");
-             output_addr_const (file, XEXP (x,0));
+
+              fprintf (file, "gs(");
+              output_addr_const (file, XEXP (x,0));
               fprintf (file, "+" HOST_WIDE_INT_PRINT_DEC ")",
                        2 * INTVAL (XEXP (x, 1)));
-             if (AVR_3_BYTE_PC)
-               if (warning (0, "pointer offset from symbol maybe incorrect"))
-                 {
-                   output_addr_const (stderr, addr);
-                   fprintf(stderr,"\n");
-                 }
-           }
-         else
-           {
-             fprintf (file, "gs(");
-             output_addr_const (file, addr);
-             fprintf (file, ")");
-           }
-       }
+              if (AVR_3_BYTE_PC)
+                if (warning (0, "pointer offset from symbol maybe incorrect"))
+                  {
+                    output_addr_const (stderr, addr);
+                    fprintf(stderr,"\n");
+                  }
+            }
+          else
+            {
+              fprintf (file, "gs(");
+              output_addr_const (file, addr);
+              fprintf (file, ")");
+            }
+        }
       else
-       output_addr_const (file, addr);
+        output_addr_const (file, addr);
     }
 }
 
@@ -2060,12 +2071,12 @@ avr_print_operand (FILE *file, rtx x, int code)
   if (code == '~')
     {
       if (!AVR_HAVE_JMP_CALL)
-       fputc ('r', file);
+        fputc ('r', file);
     }
   else if (code == '!')
     {
       if (AVR_HAVE_EIJMP_EICALL)
-       fputc ('e', file);
+        fputc ('e', file);
     }
   else if (code == 't'
            || code == 'T')
@@ -2104,7 +2115,7 @@ avr_print_operand (FILE *file, rtx x, int code)
   else if (CONST_INT_P (x))
     {
       HOST_WIDE_INT ival = INTVAL (x);
-        
+
       if ('i' != code)
         fprintf (file, HOST_WIDE_INT_PRINT_DEC, ival + abcd);
       else if (low_io_address_operand (x, VOIDmode)
@@ -2135,9 +2146,9 @@ avr_print_operand (FILE *file, rtx x, int code)
   else if (MEM_P (x))
     {
       rtx addr = XEXP (x, 0);
-      
+
       if (code == 'm')
-       {
+        {
           if (!CONSTANT_P (addr))
             fatal_insn ("bad address, not a constant:", addr);
           /* Assembler template with m-code is data - not progmem section */
@@ -2149,39 +2160,39 @@ avr_print_operand (FILE *file, rtx x, int code)
                 fprintf(stderr,"\n");
               }
           output_addr_const (file, addr);
-       }
+        }
       else if (code == 'i')
         {
           avr_print_operand (file, addr, 'i');
         }
       else if (code == 'o')
-       {
-         if (GET_CODE (addr) != PLUS)
-           fatal_insn ("bad address, not (reg+disp):", addr);
+        {
+          if (GET_CODE (addr) != PLUS)
+            fatal_insn ("bad address, not (reg+disp):", addr);
 
-         avr_print_operand (file, XEXP (addr, 1), 0);
-       }
+          avr_print_operand (file, XEXP (addr, 1), 0);
+        }
       else if (code == 'p' || code == 'r')
         {
           if (GET_CODE (addr) != POST_INC && GET_CODE (addr) != PRE_DEC)
             fatal_insn ("bad address, not post_inc or pre_dec:", addr);
-          
+
           if (code == 'p')
             avr_print_operand_address (file, XEXP (addr, 0));  /* X, Y, Z */
           else
             avr_print_operand (file, XEXP (addr, 0), 0);  /* r26, r28, r30 */
         }
       else if (GET_CODE (addr) == PLUS)
-       {
-         avr_print_operand_address (file, XEXP (addr,0));
-         if (REGNO (XEXP (addr, 0)) == REG_X)
-           fatal_insn ("internal compiler error.  Bad address:"
-                       ,addr);
-         fputc ('+', file);
-         avr_print_operand (file, XEXP (addr,1), code);
-       }
+        {
+          avr_print_operand_address (file, XEXP (addr,0));
+          if (REGNO (XEXP (addr, 0)) == REG_X)
+            fatal_insn ("internal compiler error.  Bad address:"
+                        ,addr);
+          fputc ('+', file);
+          avr_print_operand (file, XEXP (addr,1), code);
+        }
       else
-       avr_print_operand_address (file, addr);
+        avr_print_operand_address (file, addr);
     }
   else if (code == 'i')
     {
@@ -2193,10 +2204,10 @@ avr_print_operand (FILE *file, rtx x, int code)
       if (0 == text_segment_operand (x, VOIDmode))
         if (warning (0, "accessing program memory"
                      " with data memory address"))
-         {
-           output_addr_const (stderr, x);
-           fprintf(stderr,"\n");
-         }
+          {
+            output_addr_const (stderr, x);
+            fprintf(stderr,"\n");
+          }
       /* Use normal symbol for direct address no linker trampoline needed */
       output_addr_const (file, x);
     }
@@ -2213,7 +2224,7 @@ avr_print_operand (FILE *file, rtx x, int code)
       long val;
       REAL_VALUE_TYPE rv;
       if (GET_MODE (x) != SFmode)
-       fatal_insn ("internal compiler error.  Unknown mode:", x);
+        fatal_insn ("internal compiler error.  Unknown mode:", x);
       REAL_VALUE_FROM_CONST_DOUBLE (rv, x);
       REAL_VALUE_TO_TARGET_SINGLE (rv, val);
       fprintf (file, "0x%lx", val);
@@ -2228,14 +2239,16 @@ avr_print_operand (FILE *file, rtx x, int code)
     avr_print_operand_address (file, x);
 }
 
+
+/* Worker function for `NOTICE_UPDATE_CC'.  */
 /* Update the condition code in the INSN.  */
 
 void
-notice_update_cc (rtx body ATTRIBUTE_UNUSED, rtx insn)
+avr_notice_update_cc (rtx body ATTRIBUTE_UNUSED, rtx insn)
 {
   rtx set;
   enum attr_cc cc = get_attr_cc (insn);
-  
+
   switch (cc)
     {
     default:
@@ -2246,7 +2259,7 @@ notice_update_cc (rtx body ATTRIBUTE_UNUSED, rtx insn)
       {
         rtx *op = recog_data.operand;
         int len_dummy, icc;
-        
+
         /* Extract insn's operands.  */
         extract_constrain_insn_cached (insn);
 
@@ -2254,7 +2267,7 @@ notice_update_cc (rtx body ATTRIBUTE_UNUSED, rtx insn)
           {
           default:
             gcc_unreachable();
-            
+
           case CC_PLUS:
             avr_out_plus (insn, op, &len_dummy, &icc);
             cc = (enum attr_cc) icc;
@@ -2264,11 +2277,11 @@ notice_update_cc (rtx body ATTRIBUTE_UNUSED, rtx insn)
 
             cc = (op[1] == CONST0_RTX (GET_MODE (op[0]))
                   && reg_overlap_mentioned_p (op[0], zero_reg_rtx))
-              /* Loading zero-reg with 0 uses CLI and thus clobbers cc0.  */
+              /* Loading zero-reg with 0 uses CLR and thus clobbers cc0.  */
               ? CC_CLOBBER
               /* Any other "r,rL" combination does not alter cc0.  */
               : CC_NONE;
-            
+
             break;
           } /* inner switch */
 
@@ -2281,10 +2294,10 @@ notice_update_cc (rtx body ATTRIBUTE_UNUSED, rtx insn)
     default:
       /* Special values like CC_OUT_PLUS from above have been
          mapped to "standard" CC_* values so we never come here.  */
-      
+
       gcc_unreachable();
       break;
-      
+
     case CC_NONE:
       /* Insn does not affect CC at all.  */
       break;
@@ -2297,10 +2310,10 @@ notice_update_cc (rtx body ATTRIBUTE_UNUSED, rtx insn)
       set = single_set (insn);
       CC_STATUS_INIT;
       if (set)
-       {
-         cc_status.flags |= CC_NO_OVERFLOW;
-         cc_status.value1 = SET_DEST (set);
-       }
+        {
+          cc_status.flags |= CC_NO_OVERFLOW;
+          cc_status.value1 = SET_DEST (set);
+        }
       break;
 
     case CC_SET_CZN:
@@ -2310,19 +2323,19 @@ notice_update_cc (rtx body ATTRIBUTE_UNUSED, rtx insn)
       set = single_set (insn);
       CC_STATUS_INIT;
       if (set)
-       {
-         cc_status.value1 = SET_DEST (set);
-         cc_status.flags |= CC_OVERFLOW_UNUSABLE;
-       }
+        {
+          cc_status.value1 = SET_DEST (set);
+          cc_status.flags |= CC_OVERFLOW_UNUSABLE;
+        }
       break;
 
     case CC_COMPARE:
       set = single_set (insn);
       CC_STATUS_INIT;
       if (set)
-       cc_status.value1 = SET_SRC (set);
+        cc_status.value1 = SET_SRC (set);
       break;
-      
+
     case CC_CLOBBER:
       /* Insn doesn't leave CC in a usable state.  */
       CC_STATUS_INIT;
@@ -2339,30 +2352,30 @@ int
 avr_jump_mode (rtx x, rtx insn)
 {
   int dest_addr = INSN_ADDRESSES (INSN_UID (GET_CODE (x) == LABEL_REF
-                                           ? XEXP (x, 0) : x));
+                                            ? XEXP (x, 0) : x));
   int cur_addr = INSN_ADDRESSES (INSN_UID (insn));
   int jump_distance = cur_addr - dest_addr;
-  
+
   if (-63 <= jump_distance && jump_distance <= 62)
     return 1;
   else if (-2046 <= jump_distance && jump_distance <= 2045)
     return 2;
   else if (AVR_HAVE_JMP_CALL)
     return 3;
-  
+
   return 2;
 }
 
-/* return an AVR condition jump commands.
+/* Return an AVR condition jump commands.
    X is a comparison RTX.
    LEN is a number returned by avr_jump_mode function.
-   if REVERSE nonzero then condition code in X must be reversed.  */
+   If REVERSE nonzero then condition code in X must be reversed.  */
 
-const char *
+const char*
 ret_cond_branch (rtx x, int len, int reverse)
 {
   RTX_CODE cond = reverse ? reverse_condition (GET_CODE (x)) : GET_CODE (x);
-  
+
   switch (cond)
     {
     case GT:
@@ -2375,7 +2388,7 @@ ret_cond_branch (rtx x, int len, int reverse)
                ("breq .+6" CR_TAB
                 "brmi .+4" CR_TAB
                 "jmp %0"));
-         
+
       else
        return (len == 1 ? ("breq .+2" CR_TAB
                            "brge %0") :
@@ -2455,11 +2468,13 @@ ret_cond_branch (rtx x, int len, int reverse)
   return "";
 }
 
+
+/* Worker function for `FINAL_PRESCAN_INSN'.  */
 /* Output insn cost for next insn.  */
 
 void
-final_prescan_insn (rtx insn, rtx *operand ATTRIBUTE_UNUSED,
-                    int num_operands ATTRIBUTE_UNUSED)
+avr_final_prescan_insn (rtx insn, rtx *operand ATTRIBUTE_UNUSED,
+                        int num_operands ATTRIBUTE_UNUSED)
 {
   if (avr_log.rtx_costs)
     {
@@ -2471,7 +2486,7 @@ final_prescan_insn (rtx insn, rtx *operand ATTRIBUTE_UNUSED,
       else
         fprintf (asm_out_file, "/* DEBUG: pattern-cost = %d.  */\n",
                  rtx_cost (PATTERN (insn), INSN, 0,
-                          optimize_insn_for_speed_p()));
+                           optimize_insn_for_speed_p()));
     }
 }
 
@@ -2484,34 +2499,37 @@ avr_simplify_comparison_p (enum machine_mode mode, RTX_CODE op, rtx x)
                       mode == HImode ? 0xffff :
                       mode == PSImode ? 0xffffff :
                       mode == SImode ? 0xffffffff : 0);
-  if (max && op && GET_CODE (x) == CONST_INT)
+  if (max && op && CONST_INT_P (x))
     {
       if (unsigned_condition (op) != op)
-       max >>= 1;
+        max >>= 1;
 
       if (max != (INTVAL (x) & max)
-         && INTVAL (x) != 0xff)
-       return 1;
+          && INTVAL (x) != 0xff)
+        return 1;
     }
   return 0;
 }
 
 
+/* Worker function for `FUNCTION_ARG_REGNO_P'.  */
 /* Returns nonzero if REGNO is the number of a hard
    register in which function arguments are sometimes passed.  */
 
 int
-function_arg_regno_p(int r)
+avr_function_arg_regno_p(int r)
 {
   return (r >= 8 && r <= 25);
 }
 
+
+/* Worker function for `INIT_CUMULATIVE_ARGS'.  */
 /* Initializing the variable cum for the state at the beginning
    of the argument list.  */
 
 void
-init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype, rtx libname,
-                     tree fndecl ATTRIBUTE_UNUSED)
+avr_init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype, rtx libname,
+                          tree fndecl ATTRIBUTE_UNUSED)
 {
   cum->nregs = 18;
   cum->regno = FIRST_CUM_REG;
@@ -2519,7 +2537,7 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype, rtx libname,
     cum->nregs = 0;
 
   /* Assume the calle may be tail called */
-  
+
   cfun->machine->sibcall_fails = 0;
 }
 
@@ -2541,12 +2559,14 @@ avr_num_arg_regs (enum machine_mode mode, const_tree type)
   return (size + 1) & ~1;
 }
 
+
+/* Implement `TARGET_FUNCTION_ARG'.  */
 /* Controls whether a function argument is passed
    in a register, and which register.  */
 
 static rtx
 avr_function_arg (cumulative_args_t cum_v, enum machine_mode mode,
-                 const_tree type, bool named ATTRIBUTE_UNUSED)
+                  const_tree type, bool named ATTRIBUTE_UNUSED)
 {
   CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
   int bytes = avr_num_arg_regs (mode, type);
@@ -2557,12 +2577,14 @@ avr_function_arg (cumulative_args_t cum_v, enum machine_mode mode,
   return NULL_RTX;
 }
 
+
+/* Implement `TARGET_FUNCTION_ARG_ADVANCE'.  */
 /* Update the summarizer variable CUM to advance past an argument
    in the argument list.  */
-   
+
 static void
 avr_function_arg_advance (cumulative_args_t cum_v, enum machine_mode mode,
-                         const_tree type, bool named ATTRIBUTE_UNUSED)
+                          const_tree type, bool named ATTRIBUTE_UNUSED)
 {
   CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
   int bytes = avr_num_arg_regs (mode, type);
@@ -2570,28 +2592,28 @@ avr_function_arg_advance (cumulative_args_t cum_v, enum machine_mode mode,
   cum->nregs -= bytes;
   cum->regno -= bytes;
 
-  /* A parameter is being passed in a call-saved register. As the original
+  /* A parameter is being passed in a call-saved register.  As the original
      contents of these regs has to be restored before leaving the function,
      a function must not pass arguments in call-saved regs in order to get
-     tail-called. */
-  
+     tail-called.  */
+
   if (cum->regno >= 8
       && cum->nregs >= 0
       && !call_used_regs[cum->regno])
     {
       /* FIXME: We ship info on failing tail-call in struct machine_function.
          This uses internals of calls.c:expand_call() and the way args_so_far
-         is used. targetm.function_ok_for_sibcall() needs to be extended to
-         pass &args_so_far, too. At present, CUMULATIVE_ARGS is target
-         dependent so that such an extension is not wanted. */
-      
+         is used.  targetm.function_ok_for_sibcall() needs to be extended to
+         pass &args_so_far, too.  At present, CUMULATIVE_ARGS is target
+         dependent so that such an extension is not wanted.  */
+
       cfun->machine->sibcall_fails = 1;
     }
 
   /* Test if all registers needed by the ABI are actually available.  If the
      user has fixed a GPR needed to pass an argument, an (implicit) function
      call will clobber that fixed register.  See PR45099 for an example.  */
-  
+
   if (cum->regno >= 8
       && cum->nregs >= 0)
     {
@@ -2602,7 +2624,7 @@ avr_function_arg_advance (cumulative_args_t cum_v, enum machine_mode mode,
           warning (0, "fixed register %s used to pass parameter to function",
                    reg_names[regno]);
     }
-      
+
   if (cum->nregs <= 0)
     {
       cum->nregs = 0;
@@ -2613,7 +2635,7 @@ avr_function_arg_advance (cumulative_args_t cum_v, enum machine_mode mode,
 /* Implement `TARGET_FUNCTION_OK_FOR_SIBCALL' */
 /* Decide whether we can make a sibling call to a function.  DECL is the
    declaration of the function being targeted by the call and EXP is the
-   CALL_EXPR representing the call. */
+   CALL_EXPR representing the call.  */
 
 static bool
 avr_function_ok_for_sibcall (tree decl_callee, tree exp_callee)
@@ -2624,14 +2646,14 @@ avr_function_ok_for_sibcall (tree decl_callee, tree exp_callee)
      function args.  We must not tail-call when `epilogue_restores'
      is used.  Unfortunately, we cannot tell at this point if that
      actually will happen or not, and we cannot step back from
-     tail-calling. Thus, we inhibit tail-calling with -mcall-prologues. */
-  
+     tail-calling.  Thus, we inhibit tail-calling with -mcall-prologues.  */
+
   if (cfun->machine->sibcall_fails
       || TARGET_CALL_PROLOGUES)
     {
       return false;
     }
-  
+
   fntype_callee = TREE_TYPE (CALL_EXPR_FN (exp_callee));
 
   if (decl_callee)
@@ -2641,7 +2663,7 @@ avr_function_ok_for_sibcall (tree decl_callee, tree exp_callee)
   else
     {
       decl_callee = fntype_callee;
-      
+
       while (FUNCTION_TYPE != TREE_CODE (decl_callee)
              && METHOD_TYPE != TREE_CODE (decl_callee))
         {
@@ -2650,14 +2672,12 @@ avr_function_ok_for_sibcall (tree decl_callee, tree exp_callee)
     }
 
   /* Ensure that caller and callee have compatible epilogues */
-  
+
   if (cfun->machine->is_interrupt
       || cfun->machine->is_signal
       || cfun->machine->is_naked
       || avr_naked_function_p (decl_callee)
-      /* FIXME: For OS_task and OS_main, we are over-conservative.
-         This is due to missing documentation of these attributes
-         and what they actually should do and should not do. */
+      /* FIXME: For OS_task and OS_main, this might be over-conservative.  */
       || (avr_OS_task_function_p (decl_callee)
           != cfun->machine->is_OS_task)
       || (avr_OS_main_function_p (decl_callee)
@@ -2665,7 +2685,7 @@ avr_function_ok_for_sibcall (tree decl_callee, tree exp_callee)
     {
       return false;
     }
+
   return true;
 }
 
@@ -2681,7 +2701,7 @@ avr_load_libgcc_p (rtx op)
 {
   enum machine_mode mode = GET_MODE (op);
   int n_bytes = GET_MODE_SIZE (mode);
-        
+
   return (n_bytes > 2
           && !AVR_HAVE_LPMX
           && avr_mem_flash_p (op));
@@ -2693,7 +2713,7 @@ bool
 avr_xload_libgcc_p (enum machine_mode mode)
 {
   int n_bytes = GET_MODE_SIZE (mode);
-  
+
   return (n_bytes > 1
           || avr_current_device->n_flash > 1);
 }
@@ -2720,7 +2740,7 @@ avr_find_unused_d_reg (rtx insn, rtx exclude)
   for (regno = 16; regno < 32; regno++)
     {
       rtx reg = all_regs_rtx[regno];
-      
+
       if ((exclude
            && reg_overlap_mentioned_p (exclude, reg))
           || fixed_regs[regno])
@@ -2741,7 +2761,7 @@ avr_find_unused_d_reg (rtx insn, rtx exclude)
 
       /* Any live register can be used if it is unused after.
          Prologue/epilogue will care for it as needed.  */
-      
+
       if (df_regs_ever_live_p (regno)
           && reg_unused_after (insn, reg))
         {
@@ -2799,19 +2819,19 @@ avr_out_lpm_no_lpmx (rtx insn, rtx *xop, int *plen)
                                 "%4lpm"      CR_TAB
                                 "mov %B0,%3" CR_TAB
                                 "pop %A0", xop, plen, 6);
-          
+
           avr_asm_len ("%4lpm"      CR_TAB
                        "mov %A0,%3" CR_TAB
                        "adiw %2,1"  CR_TAB
                        "%4lpm"      CR_TAB
                        "mov %B0,%3", xop, plen, 5);
-                
+
           if (!reg_unused_after (insn, addr))
             avr_asm_len ("sbiw %2,1", xop, plen, 1);
-          
+
           break; /* 2 */
         }
-      
+
       break; /* REG */
 
     case POST_INC:
@@ -2843,9 +2863,9 @@ avr_out_lpm_no_lpmx (rtx insn, rtx *xop, int *plen)
                      "adiw %2,1", xop, plen, 3);
 
       break; /* POST_INC */
-      
+
     } /* switch CODE (addr) */
-      
+
   return "";
 }
 
@@ -2869,12 +2889,12 @@ avr_out_lpm (rtx insn, rtx *op, int *plen)
 
   if (plen)
     *plen = 0;
-  
+
   if (MEM_P (dest))
     {
       warning (0, "writing to address space %qs not supported",
                avr_addrspace[MEM_ADDR_SPACE (dest)].name);
-      
+
       return "";
     }
 
@@ -2918,7 +2938,7 @@ avr_out_lpm (rtx insn, rtx *op, int *plen)
                        "out %i6,%2"  CR_TAB
                        "mov %2,%5", xop, plen, 4);
         }
-      
+
       xop[4] = xstring_e;
 
       if (!AVR_HAVE_ELPMX)
@@ -2957,11 +2977,11 @@ avr_out_lpm (rtx insn, rtx *op, int *plen)
             {
               avr_asm_len ("%4lpm %A0,%a2+" CR_TAB
                            "%4lpm %B0,%a2", xop, plen, 2);
-                
+
               if (!reg_unused_after (insn, addr))
                 avr_asm_len ("sbiw %2,1", xop, plen, 1);
             }
-          
+
           break; /* 2 */
 
         case 3:
@@ -2969,17 +2989,17 @@ avr_out_lpm (rtx insn, rtx *op, int *plen)
           avr_asm_len ("%4lpm %A0,%a2+" CR_TAB
                        "%4lpm %B0,%a2+" CR_TAB
                        "%4lpm %C0,%a2", xop, plen, 3);
-                
+
           if (!reg_unused_after (insn, addr))
             avr_asm_len ("sbiw %2,2", xop, plen, 1);
 
           break; /* 3 */
-      
+
         case 4:
 
           avr_asm_len ("%4lpm %A0,%a2+" CR_TAB
                        "%4lpm %B0,%a2+", xop, plen, 2);
-          
+
           if (REGNO (dest) == REG_Z - 2)
             return avr_asm_len ("%4lpm %5,%a2+" CR_TAB
                                 "%4lpm %C0,%a2"          CR_TAB
@@ -2988,14 +3008,14 @@ avr_out_lpm (rtx insn, rtx *op, int *plen)
             {
               avr_asm_len ("%4lpm %C0,%a2+" CR_TAB
                            "%4lpm %D0,%a2", xop, plen, 2);
-                
+
               if (!reg_unused_after (insn, addr))
                 avr_asm_len ("sbiw %2,3", xop, plen, 1);
             }
 
           break; /* 4 */
         } /* n_bytes */
-      
+
       break; /* REG */
 
     case POST_INC:
@@ -3014,7 +3034,7 @@ avr_out_lpm (rtx insn, rtx *op, int *plen)
 
   if (xop[4] == xstring_e && AVR_HAVE_RAMPD)
     {
-      /* Reset RAMPZ to 0 so that EBI devices don't read garbage from RAM */
+      /* Reset RAMPZ to 0 so that EBI devices don't read garbage from RAM */
 
       xop[0] = zero_reg_rtx;
       avr_asm_len ("out %i6,%0", xop, plen, 1);
@@ -3047,7 +3067,7 @@ avr_out_xload (rtx insn ATTRIBUTE_UNUSED, rtx *op, int *plen)
 
   if (REGNO (xop[0]) != REGNO (xop[3]))
     avr_asm_len ("mov %0,%3", xop, plen, 1);
-  
+
   return "";
 }
 
@@ -3057,7 +3077,7 @@ output_movqi (rtx insn, rtx operands[], int *plen)
 {
   rtx dest = operands[0];
   rtx src = operands[1];
-  
+
   if (avr_mem_flash_p (src)
       || avr_mem_flash_p (dest))
     {
@@ -3074,7 +3094,7 @@ output_movqi (rtx insn, rtx operands[], int *plen)
             return avr_asm_len ("out %0,%1", operands, plen, -1);
           else if (test_hard_reg_class (STACK_REG, src))
             return avr_asm_len ("in %0,%1", operands, plen, -1);
-          
+
           return avr_asm_len ("mov %0,%1", operands, plen, -1);
         }
       else if (CONSTANT_P (src))
@@ -3106,7 +3126,7 @@ output_movhi (rtx insn, rtx xop[], int *plen)
   rtx src = xop[1];
 
   gcc_assert (GET_MODE_SIZE (GET_MODE (dest)) == 2);
-  
+
   if (avr_mem_flash_p (src)
       || avr_mem_flash_p (dest))
     {
@@ -3127,9 +3147,9 @@ output_movhi (rtx insn, rtx xop[], int *plen)
               if (AVR_XMEGA)
                 return avr_asm_len ("out __SP_L__,%A1" CR_TAB
                                     "out __SP_H__,%B1", xop, plen, -2);
-              
+
               /* Use simple load of SP if no interrupts are  used.  */
-              
+
               return TARGET_NO_INTERRUPTS
                 ? avr_asm_len ("out __SP_H__,%B1" CR_TAB
                                "out __SP_L__,%A1", xop, plen, -2)
@@ -3144,7 +3164,7 @@ output_movhi (rtx insn, rtx xop[], int *plen)
               return !AVR_HAVE_SPH
                 ? avr_asm_len ("in %A0,__SP_L__" CR_TAB
                                "clr %B0", xop, plen, -2)
-                
+
                 : avr_asm_len ("in %A0,__SP_L__" CR_TAB
                                "in %B0,__SP_H__", xop, plen, -2);
             }
@@ -3173,9 +3193,9 @@ output_movhi (rtx insn, rtx xop[], int *plen)
 
       return out_movhi_mr_r (insn, xop, plen);
     }
-  
+
   fatal_insn ("invalid insn:", insn);
-  
+
   return "";
 }
 
@@ -3185,7 +3205,7 @@ out_movqi_r_mr (rtx insn, rtx op[], int *plen)
   rtx dest = op[0];
   rtx src = op[1];
   rtx x = XEXP (src, 0);
-  
+
   if (CONSTANT_ADDRESS_P (x))
     {
       return optimize > 0 && io_address_operand (x, QImode)
@@ -3199,7 +3219,7 @@ out_movqi_r_mr (rtx insn, rtx op[], int *plen)
       /* memory access by reg+disp */
 
       int disp = INTVAL (XEXP (x, 1));
-      
+
       if (disp - GET_MODE_SIZE (GET_MODE (src)) >= 63)
         {
           if (REGNO (XEXP (x, 0)) != REG_Y)
@@ -3220,10 +3240,10 @@ out_movqi_r_mr (rtx insn, rtx op[], int *plen)
         {
           /* This is a paranoid case LEGITIMIZE_RELOAD_ADDRESS must exclude
              it but I have this situation with extremal optimizing options.  */
-          
+
           avr_asm_len ("adiw r26,%o1" CR_TAB
                        "ld %0,X", op, plen, -2);
-          
+
           if (!reg_overlap_mentioned_p (dest, XEXP (x,0))
               && !reg_unused_after (insn, XEXP (x,0)))
             {
@@ -3235,7 +3255,7 @@ out_movqi_r_mr (rtx insn, rtx op[], int *plen)
 
       return avr_asm_len ("ldd %0,%1", op, plen, -1);
     }
-  
+
   return avr_asm_len ("ld %0,%1", op, plen, -1);
 }
 
@@ -3261,10 +3281,10 @@ out_movhi_r_mr (rtx insn, rtx op[], int *plen)
       if (reg_base != REG_X)
         return avr_asm_len ("ld %A0,%1" CR_TAB
                             "ldd %B0,%1+1", op, plen, -2);
-      
+
       avr_asm_len ("ld %A0,X+" CR_TAB
                    "ld %B0,X", op, plen, -2);
-          
+
       if (!reg_unused_after (insn, base))
         avr_asm_len ("sbiw r26,1", op, plen, 1);
 
@@ -3274,12 +3294,12 @@ out_movhi_r_mr (rtx insn, rtx op[], int *plen)
     {
       int disp = INTVAL (XEXP (base, 1));
       int reg_base = true_regnum (XEXP (base, 0));
-      
+
       if (disp > MAX_LD_OFFSET (GET_MODE (src)))
         {
           if (REGNO (XEXP (base, 0)) != REG_Y)
             fatal_insn ("incorrect insn:",insn);
-          
+
           return disp <= 63 + MAX_LD_OFFSET (GET_MODE (src))
             ? avr_asm_len ("adiw r28,%o1-62" CR_TAB
                            "ldd %A0,Y+62"    CR_TAB
@@ -3326,13 +3346,13 @@ out_movhi_r_mr (rtx insn, rtx op[], int *plen)
       if (!mem_volatile_p)
         return avr_asm_len ("ld %B0,%1" CR_TAB
                             "ld %A0,%1", op, plen, -2);
-      
+
       return REGNO (XEXP (base, 0)) == REG_X
         ? avr_asm_len ("sbiw r26,2"  CR_TAB
                        "ld %A0,X+"   CR_TAB
                        "ld %B0,X"    CR_TAB
                        "sbiw r26,1", op, plen, -4)
-        
+
         : avr_asm_len ("sbiw %r1,2"  CR_TAB
                        "ld %A0,%p1"  CR_TAB
                        "ldd %B0,%p1+1", op, plen, -3);
@@ -3354,7 +3374,7 @@ out_movhi_r_mr (rtx insn, rtx op[], int *plen)
         : avr_asm_len ("lds %A0,%m1" CR_TAB
                        "lds %B0,%m1+1", op, plen, -4);
     }
-  
+
   fatal_insn ("unknown move insn:",insn);
   return "";
 }
@@ -3371,7 +3391,7 @@ out_movsi_r_mr (rtx insn, rtx op[], int *l)
 
   if (!l)
     l = &tmp;
-  
+
   if (reg_base > 0)
     {
       if (reg_base == REG_X)        /* (R26) */
@@ -3427,7 +3447,7 @@ out_movsi_r_mr (rtx insn, rtx op[], int *l)
   else if (GET_CODE (base) == PLUS) /* (R + i) */
     {
       int disp = INTVAL (XEXP (base, 1));
-      
+
       if (disp > MAX_LD_OFFSET (GET_MODE (src)))
        {
          if (REGNO (XEXP (base, 0)) != REG_Y)
@@ -3515,7 +3535,7 @@ out_movsi_r_mr (rtx insn, rtx op[], int *l)
                   "lds %B0,%m1+1" CR_TAB
                   "lds %C0,%m1+2" CR_TAB
                   "lds %D0,%m1+3");
-    
+
   fatal_insn ("unknown move insn:",insn);
   return "";
 }
@@ -3529,10 +3549,10 @@ out_movsi_mr_r (rtx insn, rtx op[], int *l)
   int reg_base = true_regnum (base);
   int reg_src = true_regnum (src);
   int tmp;
-  
+
   if (!l)
     l = &tmp;
-  
+
   if (CONSTANT_ADDRESS_P (base))
     return *l=8,("sts %m0,%A1" CR_TAB
                  "sts %m0+1,%B1" CR_TAB
@@ -3682,7 +3702,7 @@ output_movsisf (rtx insn, rtx operands[], int *l)
   rtx dest = operands[0];
   rtx src = operands[1];
   int *real_l = l;
-  
+
   if (avr_mem_flash_p (src)
       || avr_mem_flash_p (dest))
     {
@@ -3691,7 +3711,7 @@ output_movsisf (rtx insn, rtx operands[], int *l)
 
   if (!l)
     l = &dummy;
-  
+
   gcc_assert (4 == GET_MODE_SIZE (GET_MODE (dest)));
   if (REG_P (dest))
     {
@@ -3763,7 +3783,7 @@ avr_out_load_psi (rtx insn, rtx *op, int *plen)
   rtx base = XEXP (src, 0);
   int reg_dest = true_regnum (dest);
   int reg_base = true_regnum (base);
-  
+
   if (reg_base > 0)
     {
       if (reg_base == REG_X)        /* (R26) */
@@ -3807,7 +3827,7 @@ avr_out_load_psi (rtx insn, rtx *op, int *plen)
   else if (GET_CODE (base) == PLUS) /* (R + i) */
     {
       int disp = INTVAL (XEXP (base, 1));
-      
+
       if (disp > MAX_LD_OFFSET (GET_MODE (src)))
         {
           if (REGNO (XEXP (base, 0)) != REG_Y)
@@ -3843,7 +3863,7 @@ avr_out_load_psi (rtx insn, rtx *op, int *plen)
                                   "ld  r26,X"          CR_TAB
                                   "mov r27,__tmp_reg__", op, plen, -6);
             }
-          
+
           avr_asm_len ("adiw r26,%o1" CR_TAB
                        "ld %A0,X+"    CR_TAB
                        "ld %B0,X+"    CR_TAB
@@ -3855,7 +3875,7 @@ avr_out_load_psi (rtx insn, rtx *op, int *plen)
 
           return "";
         }
-      
+
       if (reg_dest == reg_base)
         return avr_asm_len ("ldd %C0,%C1" CR_TAB
                             "ldd __tmp_reg__,%B1"  CR_TAB
@@ -3879,7 +3899,7 @@ avr_out_load_psi (rtx insn, rtx *op, int *plen)
     return avr_asm_len ("lds %A0,%m1" CR_TAB
                         "lds %B0,%m1+1" CR_TAB
                         "lds %C0,%m1+2", op, plen , -6);
-  
+
   fatal_insn ("unknown move insn:",insn);
   return "";
 }
@@ -3893,18 +3913,18 @@ avr_out_store_psi (rtx insn, rtx *op, int *plen)
   rtx src = op[1];
   rtx base = XEXP (dest, 0);
   int reg_base = true_regnum (base);
-  
+
   if (CONSTANT_ADDRESS_P (base))
     return avr_asm_len ("sts %m0,%A1"   CR_TAB
                         "sts %m0+1,%B1" CR_TAB
                         "sts %m0+2,%C1", op, plen, -6);
-  
+
   if (reg_base > 0)                 /* (r) */
     {
       if (reg_base == REG_X)        /* (R26) */
         {
           gcc_assert (!reg_overlap_mentioned_p (base, src));
-          
+
           avr_asm_len ("st %0+,%A1"  CR_TAB
                        "st %0+,%B1" CR_TAB
                        "st %0,%C1", op, plen, -3);
@@ -3948,7 +3968,7 @@ avr_out_store_psi (rtx insn, rtx *op, int *plen)
         {
           /* (X + d) = R */
           gcc_assert (!reg_overlap_mentioned_p (XEXP (base, 0), src));
-          
+
           avr_asm_len ("adiw r26,%o0" CR_TAB
                        "st X+,%A1"    CR_TAB
                        "st X+,%B1"    CR_TAB
@@ -3959,7 +3979,7 @@ avr_out_store_psi (rtx insn, rtx *op, int *plen)
 
           return "";
         }
-      
+
       return avr_asm_len ("std %A0,%A1" CR_TAB
                           "std %B0,%B1" CR_TAB
                           "std %C0,%C1", op, plen, -3);
@@ -3985,13 +4005,13 @@ avr_out_movpsi (rtx insn, rtx *op, int *plen)
 {
   rtx dest = op[0];
   rtx src = op[1];
-  
+
   if (avr_mem_flash_p (src)
       || avr_mem_flash_p (dest))
     {
       return avr_out_lpm (insn, op, plen);
     }
-  
+
   if (register_operand (dest, VOIDmode))
     {
       if (register_operand (src, VOIDmode)) /* mov r,r */
@@ -4013,7 +4033,7 @@ avr_out_movpsi (rtx insn, rtx *op, int *plen)
               else
                 avr_asm_len ("mov %A0,%A1"  CR_TAB
                              "mov %B0,%B1", op, plen, -2);
-              
+
               return avr_asm_len ("mov %C0,%C1", op, plen, 1);
             }
         }
@@ -4030,10 +4050,10 @@ avr_out_movpsi (rtx insn, rtx *op, int *plen)
 
       xop[0] = dest;
       xop[1] = src == CONST0_RTX (GET_MODE (dest)) ? zero_reg_rtx : src;
-      
+
       return avr_out_store_psi (insn, xop, plen);
     }
-    
+
   fatal_insn ("invalid insn:", insn);
   return "";
 }
@@ -4045,7 +4065,7 @@ out_movqi_mr_r (rtx insn, rtx op[], int *plen)
   rtx dest = op[0];
   rtx src = op[1];
   rtx x = XEXP (dest, 0);
-  
+
   if (CONSTANT_ADDRESS_P (x))
     {
       return optimize > 0 && io_address_operand (x, QImode)
@@ -4089,16 +4109,16 @@ out_movqi_mr_r (rtx insn, rtx op[], int *plen)
               avr_asm_len ("adiw r26,%o0" CR_TAB
                            "st X,%1", op, plen, -2);
             }
-          
+
           if (!reg_unused_after (insn, XEXP (x,0)))
             avr_asm_len ("sbiw r26,%o0", op, plen, 1);
 
           return "";
         }
-      
+
       return avr_asm_len ("std %0,%1", op, plen, -1);
     }
-  
+
   return avr_asm_len ("st %0,%1", op, plen, -1);
 }
 
@@ -4126,13 +4146,13 @@ avr_out_movhi_mr_r_xmega (rtx insn, rtx op[], int *plen)
 
       : avr_asm_len ("sts %m0,%A1" CR_TAB
                      "sts %m0+1,%B1", op, plen, -4);
-  
+
   if (reg_base > 0)
     {
       if (reg_base != REG_X)
         return avr_asm_len ("st %0,%A1" CR_TAB
                             "std %0+1,%B1", op, plen, -2);
-      
+
       if (reg_src == REG_X)
         /* "st X+,r26" and "st -X,r26" are undefined.  */
         avr_asm_len ("mov __tmp_reg__,r27" CR_TAB
@@ -4155,7 +4175,7 @@ avr_out_movhi_mr_r_xmega (rtx insn, rtx op[], int *plen)
         {
           if (reg_base != REG_Y)
             fatal_insn ("incorrect insn:",insn);
-          
+
           return disp <= 63 + MAX_LD_OFFSET (GET_MODE (dest))
             ? avr_asm_len ("adiw r28,%o0-62" CR_TAB
                            "std Y+62,%A1"    CR_TAB
@@ -4169,7 +4189,7 @@ avr_out_movhi_mr_r_xmega (rtx insn, rtx op[], int *plen)
                            "subi r28,lo8(%o0)"  CR_TAB
                            "sbci r29,hi8(%o0)", op, plen, -6);
         }
-      
+
       if (reg_base != REG_X)
         return avr_asm_len ("std %A0,%A1" CR_TAB
                             "std %B0,%B1", op, plen, -2);
@@ -4208,7 +4228,7 @@ avr_out_movhi_mr_r_xmega (rtx insn, rtx op[], int *plen)
     {
       return avr_asm_len ("st %0,%A1"  CR_TAB
                           "st %0,%B1", op, plen, -2);
-      
+
     }
   fatal_insn ("unknown move insn:",insn);
   return "";
@@ -4241,13 +4261,13 @@ out_movhi_mr_r (rtx insn, rtx op[], int *plen)
 
       : avr_asm_len ("sts %m0+1,%B1" CR_TAB
                      "sts %m0,%A1", op, plen, -4);
-  
+
   if (reg_base > 0)
     {
       if (reg_base != REG_X)
         return avr_asm_len ("std %0+1,%B1" CR_TAB
                             "st %0,%A1", op, plen, -2);
-      
+
       if (reg_src == REG_X)
         /* "st X+,r26" and "st -X,r26" are undefined.  */
         return !mem_volatile_p && reg_unused_after (insn, src)
@@ -4261,7 +4281,7 @@ out_movhi_mr_r (rtx insn, rtx op[], int *plen)
                          "st X,__tmp_reg__"    CR_TAB
                          "sbiw r26,1"          CR_TAB
                          "st X,r26", op, plen, -5);
-      
+
       return !mem_volatile_p && reg_unused_after (insn, base)
         ? avr_asm_len ("st X+,%A1" CR_TAB
                        "st X,%B1", op, plen, -2)
@@ -4277,7 +4297,7 @@ out_movhi_mr_r (rtx insn, rtx op[], int *plen)
         {
           if (reg_base != REG_Y)
             fatal_insn ("incorrect insn:",insn);
-          
+
           return disp <= 63 + MAX_LD_OFFSET (GET_MODE (dest))
             ? avr_asm_len ("adiw r28,%o0-62" CR_TAB
                            "std Y+63,%B1"    CR_TAB
@@ -4291,7 +4311,7 @@ out_movhi_mr_r (rtx insn, rtx op[], int *plen)
                            "subi r28,lo8(%o0)"  CR_TAB
                            "sbci r29,hi8(%o0)", op, plen, -6);
         }
-      
+
       if (reg_base != REG_X)
         return avr_asm_len ("std %B0,%B1" CR_TAB
                             "std %A0,%A1", op, plen, -2);
@@ -4320,7 +4340,7 @@ out_movhi_mr_r (rtx insn, rtx op[], int *plen)
       if (!mem_volatile_p)
         return avr_asm_len ("st %0,%A1"  CR_TAB
                             "st %0,%B1", op, plen, -2);
-      
+
       return REGNO (XEXP (base, 0)) == REG_X
         ? avr_asm_len ("adiw r26,1"  CR_TAB
                        "st X,%B1"    CR_TAB
@@ -4358,11 +4378,11 @@ compare_condition (rtx insn)
     {
       rtx pat = PATTERN (next);
       rtx src = SET_SRC (pat);
-      
+
       if (IF_THEN_ELSE == GET_CODE (src))
         return GET_CODE (XEXP (src, 0));
     }
-  
+
   return UNKNOWN;
 }
 
@@ -4401,7 +4421,7 @@ compare_eq_p (rtx insn)
 
       compare (XOP[0], XOP[1])
 
-   for an HI/SI register XOP[0] and an integer XOP[1].  Return "".
+   for a register XOP[0] and a compile-time constant XOP[1].  Return "".
    XOP[2] is an 8-bit scratch register as needed.
 
    PLEN == NULL:  Output instructions.
@@ -4414,7 +4434,7 @@ avr_out_compare (rtx insn, rtx *xop, int *plen)
   /* Register to compare and value to compare against. */
   rtx xreg = xop[0];
   rtx xval = xop[1];
-  
+
   /* MODE of the comparison.  */
   enum machine_mode mode;
 
@@ -4432,13 +4452,13 @@ avr_out_compare (rtx insn, rtx *xop, int *plen)
       xreg = avr_to_int_mode (xop[0]);
       xval = avr_to_int_mode (xop[1]);
     }
-  
+
   mode = GET_MODE (xreg);
 
   gcc_assert (REG_P (xreg));
   gcc_assert ((CONST_INT_P (xval) && n_bytes <= 4)
               || (const_double_operand (xval, VOIDmode) && n_bytes == 8));
-  
+
   if (plen)
     *plen = 0;
 
@@ -4455,7 +4475,7 @@ avr_out_compare (rtx insn, rtx *xop, int *plen)
         {
           avr_asm_len ("dec %A0" CR_TAB
                        "or %A0,%B0", xop, plen, 2);
-          
+
           if (n_bytes >= 3)
             avr_asm_len ("or %A0,%C0", xop, plen, 1);
 
@@ -4468,10 +4488,10 @@ avr_out_compare (rtx insn, rtx *xop, int *plen)
         {
           if (n_bytes >= 4)
             avr_asm_len ("and %A0,%D0", xop, plen, 1);
-          
+
           if (n_bytes >= 3)
             avr_asm_len ("and %A0,%C0", xop, plen, 1);
-          
+
           return avr_asm_len ("and %A0,%B0" CR_TAB
                               "com %A0", xop, plen, 2);
         }
@@ -4498,7 +4518,7 @@ avr_out_compare (rtx insn, rtx *xop, int *plen)
           && test_hard_reg_class (ADDW_REGS, reg8))
         {
           int val16 = trunc_int_for_mode (INTVAL (xval), HImode);
-          
+
           if (IN_RANGE (val16, 0, 63)
               && (val8 == 0
                   || reg_unused_after (insn, xreg)))
@@ -4518,7 +4538,7 @@ avr_out_compare (rtx insn, rtx *xop, int *plen)
         }
 
       /* Comparing against 0 is easy.  */
-      
+
       if (val8 == 0)
         {
           avr_asm_len (i == 0
@@ -4549,11 +4569,11 @@ avr_out_compare (rtx insn, rtx *xop, int *plen)
       /* Must load the value into the scratch register.  */
 
       gcc_assert (REG_P (xop[2]));
-              
+
       if (clobber_val != (int) val8)
         avr_asm_len ("ldi %2,%1", xop, plen, 1);
       clobber_val = (int) val8;
-              
+
       avr_asm_len (i == 0
                    ? "cp %0,%2"
                    : "cpc %0,%2", xop, plen, 1);
@@ -4699,7 +4719,7 @@ out_shift_with_cnt (const char *templ, rtx insn, rtx operands[],
       if (t_len * count <= max_len)
         {
           /* Output shifts inline with no loop - faster.  */
-          
+
           while (count-- > 0)
             avr_asm_len (templ, op, plen, t_len);
 
@@ -4738,7 +4758,7 @@ out_shift_with_cnt (const char *templ, rtx insn, rtx operands[],
   else if (MEM_P (op[2]))
     {
       rtx op_mov[2];
-      
+
       op_mov[0] = op[3] = tmp_reg_rtx;
       op_mov[1] = op[2];
 
@@ -4747,7 +4767,7 @@ out_shift_with_cnt (const char *templ, rtx insn, rtx operands[],
   else if (register_operand (op[2], QImode))
     {
       op[3] = op[2];
-      
+
       if (!reg_unused_after (insn, op[2])
           || reg_overlap_mentioned_p (op[0], op[2]))
         {
@@ -4795,11 +4815,11 @@ ashlqi3_out (rtx insn, rtx operands[], int *len)
 
          *len = 1;
          return "clr %0";
-         
+
        case 1:
          *len = 1;
          return "lsl %0";
-         
+
        case 2:
          *len = 2;
          return ("lsl %0" CR_TAB
@@ -4886,7 +4906,7 @@ ashlhi3_out (rtx insn, rtx operands[], int *len)
 
       if (!len)
        len = &k;
-      
+
       switch (INTVAL (operands[2]))
        {
        default:
@@ -5136,7 +5156,7 @@ avr_out_ashlpsi3 (rtx insn, rtx *op, int *plen)
 {
   if (plen)
     *plen = 0;
-  
+
   if (CONST_INT_P (op[2]))
     {
       switch (INTVAL (op[2]))
@@ -5153,7 +5173,7 @@ avr_out_ashlpsi3 (rtx insn, rtx *op, int *plen)
           {
             int reg0 = REGNO (op[0]);
             int reg1 = REGNO (op[1]);
-            
+
             if (reg0 >= reg1)
               return avr_asm_len ("mov %C0,%B1"  CR_TAB
                                   "mov %B0,%A1"  CR_TAB
@@ -5171,7 +5191,7 @@ avr_out_ashlpsi3 (rtx insn, rtx *op, int *plen)
 
             if (reg0 + 2 != reg1)
               avr_asm_len ("mov %C0,%A0", op, plen, 1);
-            
+
             return avr_asm_len ("clr %B0"  CR_TAB
                                 "clr %A0", op, plen, 2);
           }
@@ -5184,7 +5204,7 @@ avr_out_ashlpsi3 (rtx insn, rtx *op, int *plen)
                               "clr %A0", op, plen, 5);
         }
     }
-  
+
   out_shift_with_cnt ("lsl %A0" CR_TAB
                       "rol %B0" CR_TAB
                       "rol %C0", insn, op, plen, 3);
@@ -5201,10 +5221,10 @@ ashlsi3_out (rtx insn, rtx operands[], int *len)
     {
       int k;
       int *t = len;
-      
+
       if (!len)
        len = &k;
-      
+
       switch (INTVAL (operands[2]))
        {
        default:
@@ -5364,7 +5384,7 @@ ashrhi3_out (rtx insn, rtx operands[], int *len)
       int ldi_ok = test_hard_reg_class (LD_REGS, operands[0]);
       int k;
       int *t = len;
-      
+
       if (!len)
        len = &k;
 
@@ -5404,7 +5424,7 @@ ashrhi3_out (rtx insn, rtx operands[], int *len)
              return *len = 3, ("mov %A0,%B0" CR_TAB
                                "lsl %B0"     CR_TAB
                                "sbc %B0,%B0");
-           else 
+           else
              return *len = 4, ("mov %A0,%B1" CR_TAB
                                "clr %B0"     CR_TAB
                                "sbrc %A0,7"  CR_TAB
@@ -5528,7 +5548,7 @@ avr_out_ashrpsi3 (rtx insn, rtx *op, int *plen)
     {
       if (plen)
         *plen = 0;
-      
+
       switch (INTVAL (op[2]))
         {
         case 8:
@@ -5544,11 +5564,11 @@ avr_out_ashrpsi3 (rtx insn, rtx *op, int *plen)
                                 "dec %C0"     CR_TAB
                                 "mov %B0,%C1" CR_TAB
                                 "mov %A0,%B1", op, plen, 5);
-          
+
         case 16:
           if (dest != src + 2)
             avr_asm_len ("mov %A0,%C1", op, plen, 1);
-          
+
           return avr_asm_len ("clr %B0"     CR_TAB
                               "sbrc %A0,7"  CR_TAB
                               "com %B0"     CR_TAB
@@ -5567,7 +5587,7 @@ avr_out_ashrpsi3 (rtx insn, rtx *op, int *plen)
                               "mov %C0,%A0", op, plen, 4);
         } /* switch */
     }
-  
+
   out_shift_with_cnt ("asr %C0" CR_TAB
                       "ror %B0" CR_TAB
                       "ror %A0", insn, op, plen, 3);
@@ -5575,7 +5595,7 @@ avr_out_ashrpsi3 (rtx insn, rtx *op, int *plen)
 }
 
 
-/* 32bit arithmetic shift right  ((signed long)x >> i) */
+/* 32-bit arithmetic shift right  ((signed long)x >> i) */
 
 const char *
 ashrsi3_out (rtx insn, rtx operands[], int *len)
@@ -5584,10 +5604,10 @@ ashrsi3_out (rtx insn, rtx operands[], int *len)
     {
       int k;
       int *t = len;
-      
+
       if (!len)
        len = &k;
-      
+
       switch (INTVAL (operands[2]))
        {
        case 8:
@@ -5610,12 +5630,12 @@ ashrsi3_out (rtx insn, rtx operands[], int *len)
                      "mov %B0,%C1" CR_TAB
                      "mov %A0,%B1");
          }
-         
+
        case 16:
          {
            int reg0 = true_regnum (operands[0]);
            int reg1 = true_regnum (operands[1]);
-           
+
            if (reg0 == reg1 + 2)
              return *len = 4, ("clr %D0"     CR_TAB
                                "sbrc %B0,7"  CR_TAB
@@ -5627,7 +5647,7 @@ ashrsi3_out (rtx insn, rtx operands[], int *len)
                                "sbrc %B0,7"   CR_TAB
                                "com %D0"      CR_TAB
                                "mov %C0,%D0");
-           else 
+           else
              return *len = 6, ("mov %B0,%D1" CR_TAB
                                "mov %A0,%C1" CR_TAB
                                "clr %D0"     CR_TAB
@@ -5672,7 +5692,7 @@ ashrsi3_out (rtx insn, rtx operands[], int *len)
   return "";
 }
 
-/* 8bit logic shift right ((unsigned char)x >> i) */
+/* 8-bit logic shift right ((unsigned char)x >> i) */
 
 const char *
 lshrqi3_out (rtx insn, rtx operands[], int *len)
@@ -5683,7 +5703,7 @@ lshrqi3_out (rtx insn, rtx operands[], int *len)
 
       if (!len)
        len = &k;
-      
+
       switch (INTVAL (operands[2]))
        {
        default:
@@ -5706,7 +5726,7 @@ lshrqi3_out (rtx insn, rtx operands[], int *len)
          return ("lsr %0" CR_TAB
                  "lsr %0" CR_TAB
                  "lsr %0");
-         
+
        case 4:
          if (test_hard_reg_class (LD_REGS, operands[0]))
            {
@@ -5719,7 +5739,7 @@ lshrqi3_out (rtx insn, rtx operands[], int *len)
                  "lsr %0" CR_TAB
                  "lsr %0" CR_TAB
                  "lsr %0");
-         
+
        case 5:
          if (test_hard_reg_class (LD_REGS, operands[0]))
            {
@@ -5734,7 +5754,7 @@ lshrqi3_out (rtx insn, rtx operands[], int *len)
                  "lsr %0" CR_TAB
                  "lsr %0" CR_TAB
                  "lsr %0");
-         
+
        case 6:
          if (test_hard_reg_class (LD_REGS, operands[0]))
            {
@@ -5751,7 +5771,7 @@ lshrqi3_out (rtx insn, rtx operands[], int *len)
                  "lsr %0" CR_TAB
                  "lsr %0" CR_TAB
                  "lsr %0");
-         
+
        case 7:
          *len = 3;
          return ("rol %0" CR_TAB
@@ -5761,13 +5781,13 @@ lshrqi3_out (rtx insn, rtx operands[], int *len)
     }
   else if (CONSTANT_P (operands[2]))
     fatal_insn ("internal compiler error.  Incorrect shift:", insn);
-  
+
   out_shift_with_cnt ("lsr %0",
                       insn, operands, len, 1);
   return "";
 }
 
-/* 16bit logic shift right ((unsigned short)x >> i) */
+/* 16-bit logic shift right ((unsigned short)x >> i) */
 
 const char *
 lshrhi3_out (rtx insn, rtx operands[], int *len)
@@ -5781,7 +5801,7 @@ lshrhi3_out (rtx insn, rtx operands[], int *len)
 
       if (!len)
        len = &k;
-      
+
       switch (INTVAL (operands[2]))
        {
        default:
@@ -6036,7 +6056,7 @@ avr_out_lshrpsi3 (rtx insn, rtx *op, int *plen)
     {
       if (plen)
         *plen = 0;
-      
+
       switch (INTVAL (op[2]))
         {
         case 8:
@@ -6048,11 +6068,11 @@ avr_out_lshrpsi3 (rtx insn, rtx *op, int *plen)
             return avr_asm_len ("clr %C0"     CR_TAB
                                 "mov %B0,%C1" CR_TAB
                                 "mov %A0,%B1", op, plen, 3);
-          
+
         case 16:
           if (dest != src + 2)
             avr_asm_len ("mov %A0,%C1", op, plen, 1);
-          
+
           return avr_asm_len ("clr %B0"  CR_TAB
                               "clr %C0", op, plen, 2);
 
@@ -6070,7 +6090,7 @@ avr_out_lshrpsi3 (rtx insn, rtx *op, int *plen)
                               "clr %C0", op, plen, 5);
         } /* switch */
     }
-  
+
   out_shift_with_cnt ("lsr %C0" CR_TAB
                       "ror %B0" CR_TAB
                       "ror %A0", insn, op, plen, 3);
@@ -6078,7 +6098,7 @@ avr_out_lshrpsi3 (rtx insn, rtx *op, int *plen)
 }
 
 
-/* 32bit logic shift right ((unsigned int)x >> i) */
+/* 32-bit logic shift right ((unsigned int)x >> i) */
 
 const char *
 lshrsi3_out (rtx insn, rtx operands[], int *len)
@@ -6087,10 +6107,10 @@ lshrsi3_out (rtx insn, rtx operands[], int *len)
     {
       int k;
       int *t = len;
-      
+
       if (!len)
        len = &k;
-      
+
       switch (INTVAL (operands[2]))
        {
        default:
@@ -6121,9 +6141,9 @@ lshrsi3_out (rtx insn, rtx operands[], int *len)
              return ("clr %D0"     CR_TAB
                      "mov %C0,%D1" CR_TAB
                      "mov %B0,%C1" CR_TAB
-                     "mov %A0,%B1"); 
+                     "mov %A0,%B1");
          }
-         
+
        case 16:
          {
            int reg0 = true_regnum (operands[0]);
@@ -6142,7 +6162,7 @@ lshrsi3_out (rtx insn, rtx operands[], int *len)
                                "clr %C0"     CR_TAB
                                "clr %D0");
          }
-         
+
        case 24:
          return *len = 4, ("mov %A0,%D1" CR_TAB
                            "clr %B0"     CR_TAB
@@ -6171,11 +6191,11 @@ lshrsi3_out (rtx insn, rtx operands[], int *len)
 /* Output addition of register XOP[0] and compile time constant XOP[2].
    CODE == PLUS:  perform addition by using ADD instructions or
    CODE == MINUS: perform addition by using SUB instructions:
-   
+
       XOP[0] = XOP[0] + XOP[2]
-      
+
    Or perform addition/subtraction with register XOP[2] depending on CODE:
-   
+
       XOP[0] = XOP[0] +/- XOP[2]
 
    If PLEN == NULL, print assembler instructions to perform the operation;
@@ -6247,7 +6267,7 @@ avr_out_plus_1 (rtx *xop, int *plen, enum rtx_code code, int *pcc,
       if (reg_overlap_mentioned_p (xop[0], xop[2]))
         {
           gcc_assert (REGNO (xop[0]) == REGNO (xop[2]));
-          
+
           if (MINUS == code)
             return;
         }
@@ -6257,14 +6277,14 @@ avr_out_plus_1 (rtx *xop, int *plen, enum rtx_code code, int *pcc,
 
   /* Except in the case of ADIW with 16-bit register (see below)
      addition does not set cc0 in a usable way.  */
-  
+
   *pcc = (MINUS == code) ? CC_SET_CZN : CC_CLOBBER;
 
   if (CONST_FIXED_P (xval))
     xval = avr_to_int_mode (xval);
 
   /* Adding/Subtracting zero is a no-op.  */
-  
+
   if (xval == const0_rtx)
     {
       *pcc = CC_NONE;
@@ -6287,7 +6307,7 @@ avr_out_plus_1 (rtx *xop, int *plen, enum rtx_code code, int *pcc,
          V according to the sign of the subtrahend.  Notice the only case
          where this must be done is when NEG overflowed in case [2s] because
          the V computation needs the right sign of the subtrahend.  */
-      
+
       rtx msb = simplify_gen_subreg (QImode, xop[0], mode, n_bytes-1);
 
       avr_asm_len ("subi %0,128" CR_TAB
@@ -6313,10 +6333,10 @@ avr_out_plus_1 (rtx *xop, int *plen, enum rtx_code code, int *pcc,
       op[1] = gen_int_mode (val8, QImode);
 
       /* To get usable cc0 no low-bytes must have been skipped.  */
-      
+
       if (i && !started)
         *pcc = CC_CLOBBER;
-      
+
       if (!started
           && i % 2 == 0
           && i + 2 <= n_bytes
@@ -6382,7 +6402,7 @@ avr_out_plus_1 (rtx *xop, int *plen, enum rtx_code code, int *pcc,
           if (clobber_val != (int) val8)
             avr_asm_len ("ldi %2,%1", op, plen, 1);
           clobber_val = (int) val8;
-              
+
           avr_asm_len (started ? "adc %0,%2" : "add %0,%2", op, plen, 1);
 
           break; /* PLUS */
@@ -6398,12 +6418,12 @@ avr_out_plus_1 (rtx *xop, int *plen, enum rtx_code code, int *pcc,
               if (clobber_val != (int) val8)
                 avr_asm_len ("ldi %2,%1", op, plen, 1);
               clobber_val = (int) val8;
-              
+
               avr_asm_len (started ? "sbc %0,%2" : "sub %0,%2", op, plen, 1);
             }
 
           break; /* MINUS */
-          
+
         default:
           /* Unknown code */
           gcc_unreachable();
@@ -6421,16 +6441,16 @@ avr_out_plus_1 (rtx *xop, int *plen, enum rtx_code code, int *pcc,
   *pcc = (int) CC_CLOBBER;
 
   /* Vanilla addition/subtraction is done.  We are left with saturation.
-     
+
      We have to compute  A = A <op> B  where  A  is a register and
      B is a register or a non-zero compile time constant CONST.
      A is register class "r" if unsigned && B is REG.  Otherwise, A is in "d".
-     B stands for the original operand $2 in INSN.  In the case of B = CONST
+     B stands for the original operand $2 in INSN.  In the case of B = CONST,
      SIGN in { -1, 1 } is the sign of B.  Otherwise, SIGN is 0.
-     
+
      CODE is the instruction flavor we use in the asm sequence to perform <op>.
-     
-     
+
+
      unsigned
      operation        |  code |  sat if  |    b is      | sat value |  case
      -----------------+-------+----------+--------------+-----------+-------
@@ -6438,8 +6458,8 @@ avr_out_plus_1 (rtx *xop, int *plen, enum rtx_code code, int *pcc,
      +  as  a - (-b)  |  sub  |  C == 0  |  const       | u+ = 0xff |  [2u]
      -  as  a - b     |  sub  |  C == 1  |  const, reg  | u- = 0    |  [3u]
      -  as  a + (-b)  |  add  |  C == 0  |  const       | u- = 0    |  [4u]
-     
-     
+
+
      signed
      operation        |  code |  sat if  |    b is      | sat value |  case
      -----------------+-------+----------+--------------+-----------+-------
@@ -6447,10 +6467,10 @@ avr_out_plus_1 (rtx *xop, int *plen, enum rtx_code code, int *pcc,
      +  as  a - (-b)  |  sub  |  V == 1  |  const       | s+        |  [2s]
      -  as  a - b     |  sub  |  V == 1  |  const, reg  | s-        |  [3s]
      -  as  a + (-b)  |  add  |  V == 1  |  const       | s-        |  [4s]
-     
+
      s+  =  b < 0  ?  -0x80 :  0x7f
      s-  =  b < 0  ?   0x7f : -0x80
-     
+
      The cases a - b actually perform  a - (-(-b))  if B is CONST.
   */
 
@@ -6461,7 +6481,7 @@ avr_out_plus_1 (rtx *xop, int *plen, enum rtx_code code, int *pcc,
 
   bool need_copy = true;
   int len_call = 1 + AVR_HAVE_JMP_CALL;
-  
+
   switch (code_sat)
     {
     default:
@@ -6551,14 +6571,14 @@ avr_out_plus_1 (rtx *xop, int *plen, enum rtx_code code, int *pcc,
         }
       else
         gcc_unreachable();
-      
+
       break;
 
     case US_PLUS:
       /* [1u] : [2u] */
-      
+
       avr_asm_len (PLUS == code ? "brcc 0f" : "brcs 0f", op, plen, 1);
-      
+
       if (n_bytes == 8)
         {
           if (MINUS == code)
@@ -6576,7 +6596,7 @@ avr_out_plus_1 (rtx *xop, int *plen, enum rtx_code code, int *pcc,
                          op, plen, 1);
         }
       break; /* US_PLUS */
-      
+
     case US_MINUS:
       /* [4u] : [3u] */
 
@@ -6589,13 +6609,13 @@ avr_out_plus_1 (rtx *xop, int *plen, enum rtx_code code, int *pcc,
         }
       else
         avr_asm_len ("clr %0", op, plen, 1);
-      
+
       break;
     }
 
   /* We set the MSB in the unsigned case and the 2 MSBs in the signed case.
      Now copy the right value to the LSBs.  */
-  
+
   if (need_copy && n_bytes > 1)
     {
       if (US_MINUS == code_sat || US_PLUS == code_sat)
@@ -6650,7 +6670,7 @@ avr_out_plus_symbol (rtx *xop, enum rtx_code code, int *plen, int *pcc)
   enum machine_mode mode = GET_MODE (xop[0]);
 
   /* Only pointer modes want to add symbols.  */
-  
+
   gcc_assert (mode == HImode || mode == PSImode);
 
   *pcc = MINUS == code ? (int) CC_SET_CZN : (int) CC_SET_N;
@@ -6669,7 +6689,7 @@ avr_out_plus_symbol (rtx *xop, enum rtx_code code, int *plen, int *pcc)
 
 
 /* Prepare operands of addition/subtraction to be used with avr_out_plus_1.
-   
+
    INSN is a single_set insn with a binary operation as SET_SRC that is
    one of:  PLUS, SS_PLUS, US_PLUS, MINUS, SS_MINUS, US_MINUS.
 
@@ -6707,7 +6727,7 @@ avr_out_plus (rtx insn, rtx *xop, int *plen, int *pcc)
     pcc = &cc_dummy;
 
   /* PLUS and MINUS don't saturate:  Use modular wrap-around.  */
-  
+
   if (PLUS == code_sat || MINUS == code_sat)
     code_sat = UNKNOWN;
 
@@ -6731,7 +6751,7 @@ avr_out_plus (rtx insn, rtx *xop, int *plen, int *pcc)
         {
           return avr_out_plus_symbol (xop, code, plen, pcc);
         }
-      
+
       op[0] = avr_to_int_mode (xop[0]);
       op[1] = avr_to_int_mode (xop[1]);
       op[2] = avr_to_int_mode (xop[2]);
@@ -6739,7 +6759,7 @@ avr_out_plus (rtx insn, rtx *xop, int *plen, int *pcc)
 
   /* Saturations and 64-bit operations don't have a clobber operand.
      For the other cases, the caller will provide a proper XOP[3].  */
-  
+
   op[3] = PARALLEL == GET_CODE (PATTERN (insn)) ? xop[3] : NULL_RTX;
 
   /* Saturation will need the sign of the original operand.  */
@@ -6827,7 +6847,7 @@ avr_out_bitop (rtx insn, rtx *xop, int *plen)
 
       op[0] = reg8;
       op[1] = GEN_INT (val8);
-    
+
       switch (code)
         {
         case IOR:
@@ -6841,7 +6861,7 @@ avr_out_bitop (rtx insn, rtx *xop, int *plen)
               if (set_t != 1)
                 avr_asm_len ("set", op, plen, 1);
               set_t = 1;
-              
+
               op[1] = GEN_INT (exact_log2 (val8));
               avr_asm_len ("bld %0,%1", op, plen, 1);
             }
@@ -6860,7 +6880,7 @@ avr_out_bitop (rtx insn, rtx *xop, int *plen)
               if (clobber_val != (int) val8)
                 avr_asm_len ("ldi %2,%1", op, plen, 1);
               clobber_val = (int) val8;
-              
+
               avr_asm_len ("or %0,%2", op, plen, 1);
             }
 
@@ -6879,7 +6899,7 @@ avr_out_bitop (rtx insn, rtx *xop, int *plen)
               if (set_t != 0)
                 avr_asm_len ("clt", op, plen, 1);
               set_t = 0;
-              
+
               op[1] = GEN_INT (exact_log2 (GET_MODE_MASK (QImode) & ~val8));
               avr_asm_len ("bld %0,%1", op, plen, 1);
             }
@@ -6888,12 +6908,12 @@ avr_out_bitop (rtx insn, rtx *xop, int *plen)
               if (clobber_val != (int) val8)
                 avr_asm_len ("ldi %2,%1", op, plen, 1);
               clobber_val = (int) val8;
-              
+
               avr_asm_len ("and %0,%2", op, plen, 1);
             }
 
           continue; /* AND */
-          
+
         case XOR:
 
           if (0 == pop8)
@@ -6907,12 +6927,12 @@ avr_out_bitop (rtx insn, rtx *xop, int *plen)
               if (clobber_val != (int) val8)
                 avr_asm_len ("ldi %2,%1", op, plen, 1);
               clobber_val = (int) val8;
-              
+
               avr_asm_len ("eor %0,%2", op, plen, 1);
             }
 
           continue; /* XOR */
-          
+
         default:
           /* Unknown rtx_code */
           gcc_unreachable();
@@ -6940,7 +6960,7 @@ avr_out_addto_sp (rtx *op, int *plen)
     {
       if (flag_verbose_asm || flag_print_asm_name)
         avr_asm_len (ASM_COMMENT_START "SP -= %n0", op, plen, 0);
-  
+
       while (addend <= -pc_len)
         {
           addend += pc_len;
@@ -6984,7 +7004,7 @@ avr_out_fract (rtx insn, rtx operands[], bool intsigned, int *plen)
   bool lsb_in_carry = false;
   const char *code_ashift = "lsl %0";
 
-  
+
 #define MAY_CLOBBER(RR)                                                 \
   /* Shorthand used below.  */                                          \
   ((sign_bytes                                                          \
@@ -7051,7 +7071,7 @@ avr_out_fract (rtx insn, rtx operands[], bool intsigned, int *plen)
 
   // Do we have a 16-Bit register that is cleared?
   rtx clrw = NULL_RTX;
-      
+
   bool sign_extend = src.sbit && sign_bytes;
 
   if (0 == dest.fbit % 8 && 7 == src.fbit % 8)
@@ -7091,7 +7111,7 @@ avr_out_fract (rtx insn, rtx operands[], bool intsigned, int *plen)
       // is the source rtx for the current loop iteration.
       const char *code = NULL;
       int stepw = 0;
-      
+
       if (clr0)
         {
           if (AVR_HAVE_MOVW && clr1 && clrw)
@@ -7226,7 +7246,7 @@ avr_out_fract (rtx insn, rtx operands[], bool intsigned, int *plen)
   if (sign_extend && !sign_in_carry)
     {
       unsigned s0 = src.regno_msb;
-      
+
       if (MAY_CLOBBER (s0))
         avr_asm_len ("lsl %0", &all_regs_rtx[s0], plen, 1);
       else
@@ -7322,7 +7342,7 @@ avr_rotate_bytes (rtx operands[])
     if (SCRATCH != GET_CODE (scratch)
         && HImode == GET_MODE (scratch)
         && QImode == move_mode)
-      scratch = simplify_gen_subreg (move_mode, scratch, HImode, 0); 
+      scratch = simplify_gen_subreg (move_mode, scratch, HImode, 0);
 
     move_size = GET_MODE_SIZE (move_mode);
     /* Number of bytes/words to rotate.  */
@@ -7342,8 +7362,8 @@ avr_rotate_bytes (rtx operands[])
             emit_move_insn (src, gen_rtx_XOR (QImode, src, dst));
             emit_move_insn (dst, gen_rtx_XOR (QImode, dst, src));
          }
-      }    
-    else  
+      }
+    else
       {
 #define MAX_SIZE 8 /* GET_MODE_SIZE (DImode) / GET_MODE_SIZE (QImode)  */
        /* Create linked list of moves to determine move order.  */
@@ -7358,7 +7378,7 @@ avr_rotate_bytes (rtx operands[])
        for (i = 0; i < size; i++)
          {
            int from = i;
-           int to = (from + offset) % size;          
+           int to = (from + offset) % size;
            move[i].src = simplify_gen_subreg (move_mode, operands[1],
                                                mode, from * move_size);
            move[i].dst = simplify_gen_subreg (move_mode, operands[0],
@@ -7422,13 +7442,13 @@ avr_rotate_bytes (rtx operands[])
                move[size].src = move[blocked].dst;
                move[size].dst =  scratch;
                /* Scratch move is never blocked.  */
-               move[size].links = -1; 
+               move[size].links = -1;
                /* Make sure we have valid link.  */
                gcc_assert (move[blocked].links != -1);
                /* Replace src of  blocking move with scratch reg.  */
                move[move[blocked].links].src = scratch;
                /* Make dependent on scratch move occuring.  */
-               move[blocked].links = size; 
+               move[blocked].links = size;
                size=size+1;
              }
          }
@@ -7438,11 +7458,12 @@ avr_rotate_bytes (rtx operands[])
 }
 
 
+/* Worker function for `ADJUST_INSN_LENGTH'.  */
 /* Modifies the length assigned to instruction INSN
    LEN is the initially computed length of the insn.  */
 
 int
-adjust_insn_length (rtx insn, int len)
+avr_adjust_insn_length (rtx insn, int len)
 {
   rtx *op = recog_data.operand;
   enum attr_adjust_len adjust_len;
@@ -7451,7 +7472,7 @@ adjust_insn_length (rtx insn, int len)
      the length need not/must not be adjusted for these insns.
      It is easier to state this in an insn attribute "adjust_len" than
      to clutter up code here...  */
-  
+
   if (-1 == recog_memoized (insn))
     {
       return len;
@@ -7465,27 +7486,27 @@ adjust_insn_length (rtx insn, int len)
     {
       /* Nothing to adjust: The length from attribute "length" is fine.
          This is the default.  */
-      
+
       return len;
     }
-  
+
   /* Extract insn's operands.  */
-  
+
   extract_constrain_insn_cached (insn);
-  
+
   /* Dispatch to right function.  */
-  
+
   switch (adjust_len)
     {
     case ADJUST_LEN_RELOAD_IN16: output_reload_inhi (op, op[2], &len); break;
     case ADJUST_LEN_RELOAD_IN24: avr_out_reload_inpsi (op, op[2], &len); break;
     case ADJUST_LEN_RELOAD_IN32: output_reload_insisf (op, op[2], &len); break;
-      
+
     case ADJUST_LEN_OUT_BITOP: avr_out_bitop (insn, op, &len); break;
-      
+
     case ADJUST_LEN_PLUS: avr_out_plus (insn, op, &len); break;
     case ADJUST_LEN_ADDTO_SP: avr_out_addto_sp (op, &len); break;
-      
+
     case ADJUST_LEN_MOV8:  output_movqi (insn, op, &len); break;
     case ADJUST_LEN_MOV16: output_movhi (insn, op, &len); break;
     case ADJUST_LEN_MOV24: avr_out_movpsi (insn, op, &len); break;
@@ -7514,7 +7535,7 @@ adjust_insn_length (rtx insn, int len)
     case ADJUST_LEN_ASHLQI: ashlqi3_out (insn, op, &len); break;
     case ADJUST_LEN_ASHLHI: ashlhi3_out (insn, op, &len); break;
     case ADJUST_LEN_ASHLSI: ashlsi3_out (insn, op, &len); break;
-      
+
     case ADJUST_LEN_ASHLPSI: avr_out_ashlpsi3 (insn, op, &len); break;
     case ADJUST_LEN_ASHRPSI: avr_out_ashrpsi3 (insn, op, &len); break;
     case ADJUST_LEN_LSHRPSI: avr_out_lshrpsi3 (insn, op, &len); break;
@@ -7628,7 +7649,7 @@ _reg_unused_after (rtx insn, rtx reg)
                && REG_P (XEXP (XEXP (tem, 0), 0))
                && reg_overlap_mentioned_p (reg, XEXP (XEXP (tem, 0), 0)))
              return 0;
-         if (call_used_regs[REGNO (reg)]) 
+         if (call_used_regs[REGNO (reg)])
            return 1;
        }
 
@@ -7645,6 +7666,7 @@ _reg_unused_after (rtx insn, rtx reg)
 }
 
 
+/* Implement `TARGET_ASM_INTEGER'.  */
 /* Target hook for assembling integer objects.  The AVR version needs
    special handling for references to certain labels.  */
 
@@ -7657,7 +7679,7 @@ avr_assemble_integer (rtx x, unsigned int size, int aligned_p)
       fputs ("\t.word\tgs(", asm_out_file);
       output_addr_const (asm_out_file, x);
       fputs (")\n", asm_out_file);
-      
+
       return true;
     }
   else if (GET_MODE (x) == PSImode)
@@ -7667,15 +7689,15 @@ avr_assemble_integer (rtx x, unsigned int size, int aligned_p)
       fputs ("\t.byte\tlo8(", asm_out_file);
       output_addr_const (asm_out_file, x);
       fputs (")" ASM_COMMENT_START "need binutils PR13503\n", asm_out_file);
-      
+
       fputs ("\t.byte\thi8(", asm_out_file);
       output_addr_const (asm_out_file, x);
       fputs (")" ASM_COMMENT_START "need binutils PR13503\n", asm_out_file);
-      
+
       fputs ("\t.byte\thh8(", asm_out_file);
       output_addr_const (asm_out_file, x);
       fputs (")" ASM_COMMENT_START "need binutils PR13503\n", asm_out_file);
-      
+
       return true;
     }
   else if (CONST_FIXED_P (x))
@@ -7692,11 +7714,12 @@ avr_assemble_integer (rtx x, unsigned int size, int aligned_p)
 
       return true;
     }
-  
+
   return default_assemble_integer (x, size, aligned_p);
 }
 
 
+/* Implement `TARGET_CLASS_LIKELY_SPILLED_P'.  */
 /* Return value is nonzero if pseudos that have been
    assigned to registers of class CLASS would likely be spilled
    because registers of CLASS are needed for spill registers.  */
@@ -7707,18 +7730,19 @@ avr_class_likely_spilled_p (reg_class_t c)
   return (c != ALL_REGS && c != ADDW_REGS);
 }
 
-/* Valid attributes:
-   progmem - put data to program memory;
-   signal - make a function to be hardware interrupt. After function
-   prologue interrupts are disabled;
-   interrupt - make a function to be hardware interrupt. After function
-   prologue interrupts are enabled;
-   naked     - don't generate function prologue/epilogue and `ret' command.
 
-   Only `progmem' attribute valid for type.  */
+/* Valid attributes:
+   progmem   -  Put data to program memory.
+   signal    -  Make a function to be hardware interrupt.
+                After function prologue interrupts remain disabled.
+   interrupt -  Make a function to be hardware interrupt. Before function
+                prologue interrupts are enabled by means of SEI.
+   naked     -  Don't generate function prologue/epilogue and RET
+                instruction.  */
 
 /* Handle a "progmem" attribute; arguments as in
    struct attribute_spec.handler.  */
+
 static tree
 avr_handle_progmem_attribute (tree *node, tree name,
                              tree args ATTRIBUTE_UNUSED,
@@ -7817,7 +7841,7 @@ avr_attribute_table[] =
    means of attribute `progmem' or some address-space qualifier.
    Return non-zero if DECL is data that must end up in Flash and
    zero if the data lives in RAM (.bss, .data, .rodata, ...).
-   
+
    Return 2   if DECL is located in 24-bit flash address-space
    Return 1   if DECL is located in 16-bit flash address-space
    Return -1  if attribute `progmem' occurs in DECL or ATTRIBUTES
@@ -7842,7 +7866,7 @@ avr_progmem_p (tree decl, tree attributes)
     return -1;
 
   a = decl;
+
   do
     a = TREE_TYPE(a);
   while (TREE_CODE (a) == ARRAY_TYPE);
@@ -7852,7 +7876,7 @@ avr_progmem_p (tree decl, tree attributes)
 
   if (NULL_TREE != lookup_attribute ("progmem", TYPE_ATTRIBUTES (a)))
     return -1;
-  
+
   return 0;
 }
 
@@ -7861,7 +7885,7 @@ avr_progmem_p (tree decl, tree attributes)
    Return ADDR_SPACE_GENERIC (i.e. 0) if all pointers targeting
    the AS are also declared to be CONST.
    Otherwise, return the respective address space, i.e. a value != 0.  */
-   
+
 static addr_space_t
 avr_nonconst_pointer_addrspace (tree typ)
 {
@@ -7874,7 +7898,7 @@ avr_nonconst_pointer_addrspace (tree typ)
       tree target = TREE_TYPE (typ);
 
       /* Pointer to function: Test the function's return type.  */
-      
+
       if (FUNCTION_TYPE == TREE_CODE (target))
         return avr_nonconst_pointer_addrspace (TREE_TYPE (target));
 
@@ -7885,9 +7909,9 @@ avr_nonconst_pointer_addrspace (tree typ)
 
       /* Pointers to non-generic address space must be const.
          Refuse address spaces outside the device's flash.  */
-          
+
       as = TYPE_ADDR_SPACE (target);
-        
+
       if (!ADDR_SPACE_GENERIC_P (as)
           && (!TYPE_READONLY (target)
               || avr_addrspace[as].segment >= avr_current_device->n_flash))
@@ -7896,7 +7920,7 @@ avr_nonconst_pointer_addrspace (tree typ)
         }
 
       /* Scan pointer's target type.  */
-      
+
       return avr_nonconst_pointer_addrspace (target);
     }
 
@@ -7912,14 +7936,14 @@ static bool
 avr_pgm_check_var_decl (tree node)
 {
   const char *reason = NULL;
-  
+
   addr_space_t as = ADDR_SPACE_GENERIC;
 
   gcc_assert (as == 0);
-  
+
   if (avr_log.progmem)
     avr_edump ("%?: %t\n", node);
-  
+
   switch (TREE_CODE (node))
     {
     default:
@@ -7934,12 +7958,12 @@ avr_pgm_check_var_decl (tree node)
       if (as = avr_nonconst_pointer_addrspace (TREE_TYPE (node)), as)
         reason = "function parameter";
       break;
-        
+
     case FIELD_DECL:
       if (as = avr_nonconst_pointer_addrspace (TREE_TYPE (node)), as)
         reason = "structure field";
       break;
-        
+
     case FUNCTION_DECL:
       if (as = avr_nonconst_pointer_addrspace (TREE_TYPE (TREE_TYPE (node))),
           as)
@@ -7996,7 +8020,7 @@ avr_insert_attributes (tree node, tree *attributes)
 
       /* For C++, we have to peel arrays in order to get correct
          determination of readonlyness.  */
-      
+
       do
         node0 = TREE_TYPE (node0);
       while (TREE_CODE (node0) == ARRAY_TYPE);
@@ -8012,7 +8036,7 @@ avr_insert_attributes (tree node, tree *attributes)
                  " beyond flash of %qs",
                  node, avr_addrspace[as].name, avr_current_device->name);
         }
-      
+
       if (!TYPE_READONLY (node0)
           && !TREE_READONLY (node))
         {
@@ -8020,10 +8044,10 @@ avr_insert_attributes (tree node, tree *attributes)
 
           if (!ADDR_SPACE_GENERIC_P (as))
             reason = avr_addrspace[as].name;
-          
+
           if (avr_log.progmem)
             avr_edump ("\n%?: %t\n%t\n", node, node0);
-          
+
           error ("variable %q+D must be const in order to be put into"
                  " read-only section by means of %qs", node, reason);
         }
@@ -8062,7 +8086,7 @@ static void
 avr_output_data_section_asm_op (const void *data)
 {
   avr_need_copy_data_p = true;
-  
+
   /* Dispatch to default.  */
   output_section_asm_op (data);
 }
@@ -8075,7 +8099,7 @@ static void
 avr_output_bss_section_asm_op (const void *data)
 {
   avr_need_clear_bss_p = true;
-  
+
   /* Dispatch to default.  */
   output_section_asm_op (data);
 }
@@ -8098,7 +8122,7 @@ avr_asm_init_sections (void)
 {
   /* Set up a section for jump tables.  Alignment is handled by
      ASM_OUTPUT_BEFORE_CASE_LABEL.  */
-  
+
   if (AVR_HAVE_JMP_CALL)
     {
       progmem_swtable_section
@@ -8116,7 +8140,7 @@ avr_asm_init_sections (void)
 
   /* Override section callbacks to keep track of `avr_need_clear_bss_p'
      resp. `avr_need_copy_data_p'.  */
-  
+
   readonly_data_section->unnamed.callback = avr_output_data_section_asm_op;
   data_section->unnamed.callback = avr_output_data_section_asm_op;
   bss_section->unnamed.callback = avr_output_bss_section_asm_op;
@@ -8172,12 +8196,12 @@ avr_asm_function_rodata_section (tree decl)
                                             name + strlen (old_prefix), NULL));
               flags &= ~SECTION_CODE;
               flags |= AVR_HAVE_JMP_CALL ? 0 : SECTION_CODE;
-              
+
               return get_section (rname, flags, frodata->named.decl);
             }
         }
     }
-        
+
   return progmem_swtable_section;
 }
 
@@ -8205,18 +8229,21 @@ avr_asm_named_section (const char *name, unsigned int flags, tree decl)
       default_elf_asm_named_section (new_prefix, flags, decl);
       return;
     }
-  
+
   if (!avr_need_copy_data_p)
     avr_need_copy_data_p = (STR_PREFIX_P (name, ".data")
                             || STR_PREFIX_P (name, ".rodata")
                             || STR_PREFIX_P (name, ".gnu.linkonce.d"));
-  
+
   if (!avr_need_clear_bss_p)
     avr_need_clear_bss_p = STR_PREFIX_P (name, ".bss");
-  
+
   default_elf_asm_named_section (name, flags, decl);
 }
 
+
+/* Implement `TARGET_SECTION_TYPE_FLAGS'.  */
+
 static unsigned int
 avr_section_type_flags (tree decl, const char *name, int reloc)
 {
@@ -8248,7 +8275,7 @@ avr_section_type_flags (tree decl, const char *name, int reloc)
       flags &= ~SECTION_WRITE;
       flags &= ~SECTION_BSS;
     }
-  
+
   return flags;
 }
 
@@ -8261,7 +8288,7 @@ avr_encode_section_info (tree decl, rtx rtl, int new_decl_p)
   /* In avr_handle_progmem_attribute, DECL_INITIAL is not yet
      readily available, see PR34734.  So we postpone the warning
      about uninitialized data in program memory section until here.  */
-   
+
   if (new_decl_p
       && decl && DECL_P (decl)
       && NULL_TREE == DECL_INITIAL (decl)
@@ -8285,7 +8312,7 @@ avr_encode_section_info (tree decl, rtx rtl, int new_decl_p)
 
       /* PSTR strings are in generic space but located in flash:
          patch address space.  */
-      
+
       if (-1 == avr_progmem_p (decl, DECL_ATTRIBUTES (decl)))
         as = ADDR_SPACE_FLASH;
 
@@ -8300,7 +8327,7 @@ static section *
 avr_asm_select_section (tree decl, int reloc, unsigned HOST_WIDE_INT align)
 {
   section * sect = default_elf_select_section (decl, reloc, align);
-  
+
   if (decl && DECL_P (decl)
       && avr_progmem_p (decl, DECL_ATTRIBUTES (decl)))
     {
@@ -8311,7 +8338,7 @@ avr_asm_select_section (tree decl, int reloc, unsigned HOST_WIDE_INT align)
 
       if (ADDR_SPACE_GENERIC_P (as))
         as = ADDR_SPACE_FLASH;
-      
+
       if (sect->common.flags & SECTION_NAMED)
         {
           const char * name = sect->named.name;
@@ -8382,10 +8409,10 @@ static void
 avr_file_end (void)
 {
   /* Output these only if there is anything in the
-     .data* / .rodata* / .gnu.linkonce.* resp. .bss*
+     .data* / .rodata* / .gnu.linkonce.* resp. .bss* or COMMON
      input section(s) - some code size can be saved by not
      linking in the initialization code from libgcc if resp.
-     sections are empty.  */
+     sections are empty, see PR18145.  */
 
   if (avr_need_copy_data_p)
     fputs (".global __do_copy_data\n", asm_out_file);
@@ -8394,6 +8421,8 @@ avr_file_end (void)
     fputs (".global __do_clear_bss\n", asm_out_file);
 }
 
+
+/* Worker function for `ADJUST_REG_ALLOC_ORDER'.  */
 /* Choose the order in which to allocate hard registers for
    pseudo-registers local to a basic block.
 
@@ -8402,51 +8431,42 @@ avr_file_end (void)
    next register; and so on.  */
 
 void
-order_regs_for_local_alloc (void)
+avr_adjust_reg_alloc_order (void)
 {
   unsigned int i;
-  static const int order_0[] = {
-    24,25,
-    18,19,
-    20,21,
-    22,23,
-    30,31,
-    26,27,
-    28,29,
-    17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,
-    0,1,
-    32,33,34,35
+  static const int order_0[] =
+    {
+      24, 25,
+      18, 19, 20, 21, 22, 23,
+      30, 31,
+      26, 27, 28, 29,
+      17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2,
+      0, 1,
+      32, 33, 34, 35
   };
-  static const int order_1[] = {
-    18,19,
-    20,21,
-    22,23,
-    24,25,
-    30,31,
-    26,27,
-    28,29,
-    17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,
-    0,1,
-    32,33,34,35
+  static const int order_1[] =
+    {
+      18, 19, 20, 21, 22, 23, 24, 25,
+      30, 31,
+      26, 27, 28, 29,
+      17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2,
+      0, 1,
+      32, 33, 34, 35
   };
-  static const int order_2[] = {
-    25,24,
-    23,22,
-    21,20,
-    19,18,
-    30,31,
-    26,27,
-    28,29,
-    17,16,
-    15,14,13,12,11,10,9,8,7,6,5,4,3,2,
-    1,0,
-    32,33,34,35
+  static const int order_2[] =
+    {
+      25, 24, 23, 22, 21, 20, 19, 18,
+      30, 31,
+      26, 27, 28, 29,
+      17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2,
+      1, 0,
+      32, 33, 34, 35
   };
-  
+
   const int *order = (TARGET_ORDER_1 ? order_1 :
                      TARGET_ORDER_2 ? order_2 :
                      order_0);
-  for (i=0; i < ARRAY_SIZE (order_0); ++i)
+  for (i = 0; i < ARRAY_SIZE (order_0); ++i)
       reg_alloc_order[i] = order[i];
 }
 
@@ -8801,9 +8821,9 @@ avr_rtx_costs_1 (rtx x, int codearg, int outer_code ATTRIBUTE_UNUSED,
                 /* Add some additional costs besides CALL like moves etc.  */
                 *total = COSTS_N_INSNS (AVR_HAVE_JMP_CALL ? 5 : 4);
             }
-          
+
           return true;
-          
+
        default:
          return false;
        }
@@ -8861,7 +8881,7 @@ avr_rtx_costs_1 (rtx x, int codearg, int outer_code ATTRIBUTE_UNUSED,
          return false;
        }
       *total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, 0, speed);
-      return true;    
+      return true;
 
     case ASHIFT:
       switch (mode)
@@ -8896,14 +8916,14 @@ avr_rtx_costs_1 (rtx x, int codearg, int outer_code ATTRIBUTE_UNUSED,
                   return true;
                 }
             }
-          
+
           if (const1_rtx == (XEXP (x, 1))
               && SIGN_EXTEND == GET_CODE (XEXP (x, 0)))
             {
               *total = COSTS_N_INSNS (2);
               return true;
             }
-          
+
          if (GET_CODE (XEXP (x, 1)) != CONST_INT)
            {
              *total = COSTS_N_INSNS (!speed ? 5 : 41);
@@ -9373,7 +9393,7 @@ avr_address_cost (rtx x, enum machine_mode mode ATTRIBUTE_UNUSED,
                   bool speed ATTRIBUTE_UNUSED)
 {
   int cost = 4;
-  
+
   if (GET_CODE (x) == PLUS
       && CONST_INT_P (XEXP (x, 1))
       && (REG_P (XEXP (x, 0))
@@ -9391,7 +9411,7 @@ avr_address_cost (rtx x, enum machine_mode mode ATTRIBUTE_UNUSED,
 
   if (avr_log.address_cost)
     avr_edump ("\n%?: %d = %r\n", cost, x);
-  
+
   return cost;
 }
 
@@ -9402,7 +9422,7 @@ int
 extra_constraint_Q (rtx x)
 {
   int ok = 0;
-  
+
   if (GET_CODE (XEXP (x,0)) == PLUS
       && REG_P (XEXP (XEXP (x,0), 0))
       && GET_CODE (XEXP (XEXP (x,0), 1)) == CONST_INT
@@ -9411,7 +9431,7 @@ extra_constraint_Q (rtx x)
     {
       rtx xx = XEXP (XEXP (x,0), 0);
       int regno = REGNO (xx);
-      
+
       ok = (/* allocate pseudos */
             regno >= FIRST_PSEUDO_REGISTER
             /* strictly check */
@@ -9419,7 +9439,7 @@ extra_constraint_Q (rtx x)
             /* XXX frame & arg pointer checks */
             || xx == frame_pointer_rtx
             || xx == arg_pointer_rtx);
-      
+
       if (avr_log.constraints)
         avr_edump ("\n%?=%d reload_completed=%d reload_in_progress=%d\n %r\n",
                    ok, reload_completed, reload_in_progress, x);
@@ -9481,7 +9501,7 @@ avr_compare_pattern (rtx insn)
        cc0 = compare (Reg, Num)
        if (cc0 == 0)
          goto L1
-         
+
        cc0 = compare (Reg, Num)
        if (cc0 > 0)
          goto L2
@@ -9493,7 +9513,7 @@ avr_compare_pattern (rtx insn)
 
    This function relies on the way switch/case is being expaned
    as binary decision tree.  For example code see PR 49903.
-         
+
    Return TRUE if optimization performed.
    Return FALSE if nothing changed.
 
@@ -9504,8 +9524,8 @@ avr_compare_pattern (rtx insn)
    might have been transormed by `avr_reorg'.
 
    RTL peephole won't do because peephole2 does not scan across
-   basic blocks.  */                
-                        
+   basic blocks.  */
+
 static bool
 avr_reorg_remove_redundant_compare (rtx insn1)
 {
@@ -9513,7 +9533,7 @@ avr_reorg_remove_redundant_compare (rtx insn1)
   rtx comp2, ifelse2, xcond2, branch2, insn2;
   enum rtx_code code;
   rtx jump, target, cond;
-  
+
   /* Look out for:  compare1 - branch1 - compare2 - branch2  */
 
   branch1 = next_nonnote_nondebug_insn (insn1);
@@ -9532,7 +9552,7 @@ avr_reorg_remove_redundant_compare (rtx insn1)
   comp2 = avr_compare_pattern (insn2);
   xcond1 = single_set (branch1);
   xcond2 = single_set (branch2);
-  
+
   if (!comp1 || !comp2
       || !rtx_equal_p (comp1, comp2)
       || !xcond1 || SET_DEST (xcond1) != pc_rtx
@@ -9575,7 +9595,7 @@ avr_reorg_remove_redundant_compare (rtx insn1)
                                (const_int 0))
                            (label_ref L1)
                            (pc)))
-                           
+
         (set (cc0)
              (compare (reg:M N)
                       (const_int VAL)))
@@ -9591,17 +9611,17 @@ avr_reorg_remove_redundant_compare (rtx insn1)
   /* Map GT/GTU to GE/GEU which is easier for AVR.
      The first two instructions compare/branch on EQ
      so we may replace the difficult
-        
+
         if (x == VAL)   goto L1;
         if (x > VAL)    goto L2;
 
      with easy
-         
+
          if (x == VAL)   goto L1;
          if (x >= VAL)   goto L2;
 
      Similarly, replace LE/LEU by LT/LTU.  */
-  
+
   switch (code)
     {
     case EQ:
@@ -9613,7 +9633,7 @@ avr_reorg_remove_redundant_compare (rtx insn1)
     case GT:  case GTU:
       code = avr_normalize_condition (code);
       break;
-      
+
     default:
       return false;
     }
@@ -9635,7 +9655,7 @@ avr_reorg_remove_redundant_compare (rtx insn1)
 
   /* The comparisons in insn1 and insn2 are exactly the same;
      insn2 is superfluous so delete it.  */
-     
+
   delete_insn (insn2);
   delete_insn (branch1);
   delete_insn (branch2);
@@ -9651,11 +9671,11 @@ static void
 avr_reorg (void)
 {
   rtx insn = get_insns();
-  
+
   for (insn = next_real_insn (insn); insn; insn = next_real_insn (insn))
     {
       rtx pattern = avr_compare_pattern (insn);
-      
+
       if (!pattern)
         continue;
 
@@ -9668,12 +9688,12 @@ avr_reorg (void)
       if (compare_diff_p (insn))
        {
           /* Now we work under compare insn with difficult branch.  */
-          
+
           rtx next = next_real_insn (insn);
           rtx pat = PATTERN (next);
 
           pattern = SET_SRC (pattern);
-          
+
           if (true_regnum (XEXP (pattern, 0)) >= 0
               && true_regnum (XEXP (pattern, 1)) >= 0)
             {
@@ -9691,7 +9711,7 @@ avr_reorg (void)
               /* This is a tst insn, we can reverse it.  */
               rtx src = SET_SRC (pat);
               rtx t = XEXP (src,0);
-    
+
               PUT_CODE (t, swap_condition (GET_CODE (t)));
               XEXP (pattern, 1) = XEXP (pattern, 0);
               XEXP (pattern, 0) = const0_rtx;
@@ -9705,7 +9725,7 @@ avr_reorg (void)
               rtx src = SET_SRC (pat);
               rtx t = XEXP (src,0);
               enum machine_mode mode = GET_MODE (XEXP (pattern, 0));
-              
+
               if (avr_simplify_comparison_p (mode, GET_CODE (t), x))
                 {
                   XEXP (pattern, 1) = gen_int_mode (INTVAL (x) + 1, mode);
@@ -9726,7 +9746,8 @@ avr_ret_register (void)
   return 24;
 }
 
-/* Worker function for TARGET_FUNCTION_VALUE_REGNO_P.  */
+
+/* Implement `TARGET_FUNCTION_VALUE_REGNO_P'.  */
 
 static bool
 avr_function_value_regno_p (const unsigned int regno)
@@ -9734,6 +9755,8 @@ avr_function_value_regno_p (const unsigned int regno)
   return (regno == avr_ret_register ());
 }
 
+
+/* Implement `TARGET_LIBCALL_VALUE'.  */
 /* Create an RTX representing the place where a
    library function returns a value of mode MODE.  */
 
@@ -9742,13 +9765,15 @@ avr_libcall_value (enum machine_mode mode,
                   const_rtx func ATTRIBUTE_UNUSED)
 {
   int offs = GET_MODE_SIZE (mode);
-  
+
   if (offs <= 4)
     offs = (offs + 1) & ~1;
-  
+
   return gen_rtx_REG (mode, avr_ret_register () + 2 - offs);
 }
 
+
+/* Implement `TARGET_FUNCTION_VALUE'.  */
 /* Create an RTX representing the place where a
    function returns a value of data type VALTYPE.  */
 
@@ -9761,7 +9786,7 @@ avr_function_value (const_tree type,
 
   if (TYPE_MODE (type) != BLKmode)
     return avr_libcall_value (TYPE_MODE (type), NULL_RTX);
-  
+
   offs = int_size_in_bytes (type);
   if (offs < 2)
     offs = 2;
@@ -9769,7 +9794,7 @@ avr_function_value (const_tree type,
     offs = GET_MODE_SIZE (SImode);
   else if (offs > GET_MODE_SIZE (SImode) && offs < GET_MODE_SIZE (DImode))
     offs = GET_MODE_SIZE (DImode);
-  
+
   return gen_rtx_REG (BLKmode, avr_ret_register () + 2 - offs);
 }
 
@@ -9804,7 +9829,7 @@ avr_2word_insn_p (rtx insn)
     {
     default:
       return false;
-      
+
     case CODE_FOR_movqi_insn:
     case CODE_FOR_movuqq_insn:
     case CODE_FOR_movqq_insn:
@@ -9812,9 +9837,9 @@ avr_2word_insn_p (rtx insn)
         rtx set  = single_set (insn);
         rtx src  = SET_SRC (set);
         rtx dest = SET_DEST (set);
-        
+
         /* Factor out LDS and STS from movqi_insn.  */
-        
+
         if (MEM_P (dest)
             && (REG_P (src) || src == CONST0_RTX (GET_MODE (dest))))
           {
@@ -9825,7 +9850,7 @@ avr_2word_insn_p (rtx insn)
           {
             return CONSTANT_ADDRESS_P (XEXP (src, 0));
           }
-        
+
         return false;
       }
 
@@ -9845,12 +9870,14 @@ jump_over_one_insn_p (rtx insn, rtx dest)
   int jump_addr = INSN_ADDRESSES (INSN_UID (insn));
   int dest_addr = INSN_ADDRESSES (uid);
   int jump_offset = dest_addr - jump_addr - get_attr_length (insn);
-  
+
   return (jump_offset == 1
           || (jump_offset == 2
               && avr_2word_insn_p (next_active_insn (insn))));
 }
 
+
+/* Worker function for `HARD_REGNO_MODE_OK'.  */
 /* Returns 1 if a value of mode MODE can be stored starting with hard
    register number REGNO.  On the enhanced core, anything larger than
    1 byte must start in even numbered register for "movw" to work
@@ -9866,9 +9893,9 @@ avr_hard_regno_mode_ok (int regno, enum machine_mode mode)
         handle SUBREGs of hard regsisters like this.
         This could be fixed in reload.  However, it appears
         that fixing reload is not wanted by reload people.  */
-  
+
   /* Any GENERAL_REGS register can hold 8-bit values.  */
-  
+
   if (GET_MODE_SIZE (mode) == 1)
     return 1;
 
@@ -9876,13 +9903,13 @@ avr_hard_regno_mode_ok (int regno, enum machine_mode mode)
         However, it turned out that it can reduce the number
         of spill fails.  AVR and it's poor endowment with
         address registers is extreme stress test for reload.  */
-  
+
   if (GET_MODE_SIZE (mode) >= 4
       && regno >= REG_X)
     return 0;
 
   /* All modes larger than 8 bits should start in an even register.  */
-  
+
   return !(regno & 1);
 }
 
@@ -9896,13 +9923,13 @@ avr_hard_regno_call_part_clobbered (unsigned regno, enum machine_mode mode)
         represent valid hard registers like, e.g. HI:29.  Returning TRUE
         for such registers can lead to performance degradation as mentioned
         in PR53595.  Thus, report invalid hard registers as FALSE.  */
-  
+
   if (!avr_hard_regno_mode_ok (regno, mode))
     return 0;
-  
+
   /* Return true if any of the following boundaries is crossed:
      17/18, 27/28 and 29/30.  */
-  
+
   return ((regno < 18 && regno + GET_MODE_SIZE (mode) > 18)
           || (regno < REG_Y && regno + GET_MODE_SIZE (mode) > REG_Y)
           || (regno < REG_Z && regno + GET_MODE_SIZE (mode) > REG_Z));
@@ -9920,7 +9947,7 @@ avr_mode_code_base_reg_class (enum machine_mode mode ATTRIBUTE_UNUSED,
     {
       return POINTER_Z_REGS;
     }
+
   if (!avr_strict_X)
     return reload_completed ? BASE_POINTER_REGS : POINTER_REGS;
 
@@ -9938,7 +9965,7 @@ avr_regno_mode_code_ok_for_base_p (int regno,
                                    RTX_CODE index_code ATTRIBUTE_UNUSED)
 {
   bool ok = false;
-  
+
   if (!ADDR_SPACE_GENERIC_P (as))
     {
       if (regno < FIRST_PSEUDO_REGISTER
@@ -9946,17 +9973,17 @@ avr_regno_mode_code_ok_for_base_p (int regno,
         {
           return true;
         }
-      
+
       if (reg_renumber)
         {
           regno = reg_renumber[regno];
-          
+
           if (regno == REG_Z)
             {
               return true;
             }
         }
-      
+
       return false;
     }
 
@@ -10019,16 +10046,16 @@ output_reload_in_const (rtx *op, rtx clobber_reg, int *len, bool clear_p)
   bool set_p = false;
   enum machine_mode mode = GET_MODE (dest);
   int n, n_bytes = GET_MODE_SIZE (mode);
-  
+
   gcc_assert (REG_P (dest)
               && CONSTANT_P (src));
 
   if (len)
     *len = 0;
-  
+
   /* (REG:SI 14) is special: It's neither in LD_REGS nor in NO_LD_REGS
      but has some subregs that are in LD_REGS.  Use the MSB (REG:QI 17).  */
-  
+
   if (REGNO (dest) < 16
       && REGNO (dest) + GET_MODE_SIZE (mode) > 16)
     {
@@ -10038,7 +10065,7 @@ output_reload_in_const (rtx *op, rtx clobber_reg, int *len, bool clear_p)
   /* We might need a clobber reg but don't have one.  Look at the value to
      be loaded more closely.  A clobber is only needed if it is a symbol
      or contains a byte that is neither 0, -1 or a power of 2.  */
-  
+
   if (NULL_RTX == clobber_reg
       && !test_hard_reg_class (LD_REGS, dest)
       && (! (CONST_INT_P (src) || CONST_FIXED_P (src) || CONST_DOUBLE_P (src))
@@ -10047,14 +10074,14 @@ output_reload_in_const (rtx *op, rtx clobber_reg, int *len, bool clear_p)
     {
       /* We have no clobber register but need one.  Cook one up.
          That's cheaper than loading from constant pool.  */
-      
+
       cooked_clobber_p = true;
       clobber_reg = all_regs_rtx[REG_Z + 1];
       avr_asm_len ("mov __tmp_reg__,%0", &clobber_reg, len, 1);
     }
 
   /* Now start filling DEST from LSB to MSB.  */
-  
+
   for (n = 0; n < n_bytes; n++)
     {
       int ldreg_p;
@@ -10078,13 +10105,13 @@ output_reload_in_const (rtx *op, rtx clobber_reg, int *len, bool clear_p)
               { "ldi %2,hlo8(%1)" CR_TAB "mov %0,%2",    "ldi %0,hlo8(%1)" },
               { "ldi %2,hhi8(%1)" CR_TAB "mov %0,%2",    "ldi %0,hhi8(%1)" }
             };
-          
+
           xop[0] = xdest[n];
           xop[1] = src;
           xop[2] = clobber_reg;
 
           avr_asm_len (asm_code[n][ldreg_p], xop, len, ldreg_p ? 1 : 2);
-          
+
           continue;
         }
 
@@ -10094,7 +10121,7 @@ output_reload_in_const (rtx *op, rtx clobber_reg, int *len, bool clear_p)
       ival[n] = INTVAL (xval);
 
       /* Look if we can reuse the low word by means of MOVW.  */
-      
+
       if (n == 2
           && n_bytes >= 4
           && AVR_HAVE_MOVW)
@@ -10109,13 +10136,13 @@ output_reload_in_const (rtx *op, rtx clobber_reg, int *len, bool clear_p)
                 {
                   avr_asm_len ("movw %C0,%A0", &op[0], len, 1);
                 }
-              
+
               break;
             }
         }
 
       /* Don't use CLR so that cc0 is set as expected.  */
-      
+
       if (ival[n] == 0)
         {
           if (!clear_p)
@@ -10133,7 +10160,7 @@ output_reload_in_const (rtx *op, rtx clobber_reg, int *len, bool clear_p)
         }
 
       /* LD_REGS can use LDI to move a constant value */
-      
+
       if (ldreg_p)
         {
           xop[0] = xdest[n];
@@ -10143,13 +10170,13 @@ output_reload_in_const (rtx *op, rtx clobber_reg, int *len, bool clear_p)
         }
 
       /* Try to reuse value already loaded in some lower byte. */
-      
+
       for (j = 0; j < n; j++)
         if (ival[j] == ival[n])
           {
             xop[0] = xdest[n];
             xop[1] = xdest[j];
-            
+
             avr_asm_len ("mov %0,%1", xop, len, 1);
             done_byte = true;
             break;
@@ -10159,12 +10186,12 @@ output_reload_in_const (rtx *op, rtx clobber_reg, int *len, bool clear_p)
         continue;
 
       /* Need no clobber reg for -1: Use CLR/DEC */
-      
+
       if (-1 == ival[n])
         {
           if (!clear_p)
             avr_asm_len ("clr %0", &xdest[n], len, 1);
-          
+
           avr_asm_len ("dec %0", &xdest[n], len, 1);
           continue;
         }
@@ -10172,7 +10199,7 @@ output_reload_in_const (rtx *op, rtx clobber_reg, int *len, bool clear_p)
         {
           if (!clear_p)
             avr_asm_len ("clr %0", &xdest[n], len, 1);
-          
+
           avr_asm_len ("inc %0", &xdest[n], len, 1);
           continue;
         }
@@ -10196,7 +10223,7 @@ output_reload_in_const (rtx *op, rtx clobber_reg, int *len, bool clear_p)
 
           if (!clear_p)
             avr_asm_len ("clr %0", xop, len, 1);
-          
+
           avr_asm_len ("bld %0,%1", xop, len, 1);
           continue;
         }
@@ -10204,18 +10231,18 @@ output_reload_in_const (rtx *op, rtx clobber_reg, int *len, bool clear_p)
       /* We actually need the LD_REGS clobber reg.  */
 
       gcc_assert (NULL_RTX != clobber_reg);
-        
+
       xop[0] = xdest[n];
       xop[1] = xval;
       xop[2] = clobber_reg;
       clobber_val = ival[n];
-        
+
       avr_asm_len ("ldi %2,lo8(%1)" CR_TAB
                    "mov %0,%2", xop, len, 2);
     }
-  
+
   /* If we cooked up a clobber reg above, restore it.  */
-  
+
   if (cooked_clobber_p)
     {
       avr_asm_len ("mov %0,__tmp_reg__", &clobber_reg, len, 1);
@@ -10248,7 +10275,7 @@ output_reload_inhi (rtx *op, rtx clobber_reg, int *plen)
    need a clobber reg or have to cook one up.
 
    LEN == NULL: Output instructions.
-   
+
    LEN != NULL: Output nothing.  Set *LEN to number of words occupied
                 by the insns printed.
 
@@ -10264,7 +10291,7 @@ output_reload_insisf (rtx *op, rtx clobber_reg, int *len)
           || CONST_DOUBLE_P (op[1])))
     {
       int len_clr, len_noclr;
-      
+
       /* In some cases it is better to clear the destination beforehand, e.g.
 
              CLR R2   CLR R3   MOVW R4,R2   INC R2
@@ -10276,20 +10303,20 @@ output_reload_insisf (rtx *op, rtx clobber_reg, int *len)
          We find it too tedious to work that out in the print function.
          Instead, we call the print function twice to get the lengths of
          both methods and use the shortest one.  */
-         
+
       output_reload_in_const (op, clobber_reg, &len_clr, true);
       output_reload_in_const (op, clobber_reg, &len_noclr, false);
-      
+
       if (len_noclr - len_clr == 4)
         {
           /* Default needs 4 CLR instructions: clear register beforehand.  */
-          
+
           avr_asm_len ("mov %A0,__zero_reg__" CR_TAB
                        "mov %B0,__zero_reg__" CR_TAB
                        "movw %C0,%A0", &op[0], len, 3);
-          
+
           output_reload_in_const (op, clobber_reg, len, true);
-          
+
           if (len)
             *len += 3;
 
@@ -10303,7 +10330,7 @@ output_reload_insisf (rtx *op, rtx clobber_reg, int *len)
   return "";
 }
 
-const char *
+const char*
 avr_out_reload_inpsi (rtx *op, rtx clobber_reg, int *len)
 {
   output_reload_in_const (op, clobber_reg, len, false);
@@ -10311,6 +10338,8 @@ avr_out_reload_inpsi (rtx *op, rtx clobber_reg, int *len)
 }
 
 
+/* Worker function for `ASM_OUTPUT_ADDR_VEC_ELT'.  */
+
 void
 avr_output_addr_vec_elt (FILE *stream, int value)
 {
@@ -10320,6 +10349,8 @@ avr_output_addr_vec_elt (FILE *stream, int value)
     fprintf (stream, "\trjmp .L%d\n", value);
 }
 
+
+/* Implement `TARGET_HARD_REGNO_SCRATCH_OK'.  */
 /* Returns true if SCRATCH are safe to be allocated as a scratch
    registers (for a define_peephole2) in the current function.  */
 
@@ -10346,6 +10377,8 @@ avr_hard_regno_scratch_ok (unsigned int regno)
   return true;
 }
 
+
+/* Worker function for `HARD_REGNO_RENAME_OK'.  */
 /* Return nonzero if register OLD_REG can be renamed to register NEW_REG.  */
 
 int
@@ -10370,7 +10403,7 @@ avr_hard_regno_rename_ok (unsigned int old_reg,
     {
       return 0;
     }
-  
+
   return 1;
 }
 
@@ -10382,7 +10415,7 @@ avr_hard_regno_rename_ok (unsigned int old_reg,
    Operand 2: bit number.
    Operand 3: label to jump to if the test is true.  */
 
-const char *
+const char*
 avr_out_sbxx_branch (rtx insn, rtx operands[])
 {
   enum rtx_code comp = GET_CODE (operands[0]);
@@ -10401,7 +10434,7 @@ avr_out_sbxx_branch (rtx insn, rtx operands[])
     {
     default:
       gcc_unreachable();
-      
+
     case CONST_INT:
 
       if (low_io_address_operand (operands[1], QImode))
@@ -10442,7 +10475,7 @@ avr_out_sbxx_branch (rtx insn, rtx operands[])
   return "";
 }
 
-/* Worker function for TARGET_ASM_CONSTRUCTOR.  */
+/* Worker function for `TARGET_ASM_CONSTRUCTOR'.  */
 
 static void
 avr_asm_out_ctor (rtx symbol, int priority)
@@ -10451,7 +10484,8 @@ avr_asm_out_ctor (rtx symbol, int priority)
   default_ctor_section_asm_out_constructor (symbol, priority);
 }
 
-/* Worker function for TARGET_ASM_DESTRUCTOR.  */
+
+/* Worker function for `TARGET_ASM_DESTRUCTOR'.  */
 
 static void
 avr_asm_out_dtor (rtx symbol, int priority)
@@ -10460,7 +10494,8 @@ avr_asm_out_dtor (rtx symbol, int priority)
   default_dtor_section_asm_out_destructor (symbol, priority);
 }
 
-/* Worker function for TARGET_RETURN_IN_MEMORY.  */
+
+/* Worker function for `TARGET_RETURN_IN_MEMORY'.  */
 
 static bool
 avr_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
@@ -10486,7 +10521,7 @@ avr_case_values_threshold (void)
      comparisons can be used in the if-else tree or not, on the
      range of the case values, if the case value can be reused, on the
      register allocation, etc.  '7' appears to be a good choice.  */
-     
+
   return 7;
 }
 
@@ -10520,15 +10555,15 @@ avr_reg_ok_for_pgm_addr (rtx reg, bool strict)
     {
       return REGNO (reg) == REG_Z;
     }
-  
+
   /* Avoid combine to propagate hard regs.  */
-  
+
   if (can_create_pseudo_p()
       && REGNO (reg) < REG_Z)
     {
       return false;
     }
-  
+
   return true;
 }
 
@@ -10545,7 +10580,7 @@ avr_addr_space_legitimate_address_p (enum machine_mode mode, rtx x,
     {
     default:
       gcc_unreachable();
-      
+
     case ADDR_SPACE_GENERIC:
       return avr_legitimate_address_p (mode, x, strict);
 
@@ -10561,17 +10596,17 @@ avr_addr_space_legitimate_address_p (enum machine_mode mode, rtx x,
         case REG:
           ok = avr_reg_ok_for_pgm_addr (x, strict);
           break;
-          
+
         case POST_INC:
           ok = avr_reg_ok_for_pgm_addr (XEXP (x, 0), strict);
           break;
-          
+
         default:
           break;
         }
 
       break; /* FLASH */
-      
+
     case ADDR_SPACE_MEMX:
       if (REG_P (x))
         ok = (!strict
@@ -10587,7 +10622,7 @@ avr_addr_space_legitimate_address_p (enum machine_mode mode, rtx x,
                 && REG_P (lo)
                 && REGNO (lo) == REG_Z);
         }
-      
+
       break; /* MEMX */
     }
 
@@ -10597,7 +10632,7 @@ avr_addr_space_legitimate_address_p (enum machine_mode mode, rtx x,
                  "reload_completed=%d reload_in_progress=%d %s:",
                  ok, mode, strict, reload_completed, reload_in_progress,
                  reg_renumber ? "(reg_renumber)" : "");
-      
+
       if (GET_CODE (x) == PLUS
           && REG_P (XEXP (x, 0))
           && CONST_INT_P (XEXP (x, 1))
@@ -10607,7 +10642,7 @@ avr_addr_space_legitimate_address_p (enum machine_mode mode, rtx x,
           avr_edump ("(r%d ---> r%d)", REGNO (XEXP (x, 0)),
                      true_regnum (XEXP (x, 0)));
         }
-      
+
       avr_edump ("\n%r\n", x);
     }
 
@@ -10646,7 +10681,7 @@ avr_addr_space_convert (rtx src, tree type_from, tree type_to)
                src, type_from, type_to);
 
   /* Up-casting from 16-bit to 24-bit pointer.  */
-  
+
   if (as_from != ADDR_SPACE_MEMX
       && as_to == ADDR_SPACE_MEMX)
     {
@@ -10670,17 +10705,17 @@ avr_addr_space_convert (rtx src, tree type_from, tree type_to)
         }
 
       /* Linearize memory: RAM has bit 23 set.  */
-             
+
       msb = ADDR_SPACE_GENERIC_P (as_from)
         ? 0x80
         : avr_addrspace[as_from].segment;
 
       src = force_reg (Pmode, src);
-      
+
       emit_insn (msb == 0
                  ? gen_zero_extendhipsi2 (reg, src)
                  : gen_n_extendhipsi2 (reg, gen_int_mode (msb, QImode), src));
-          
+
       return reg;
     }
 
@@ -10692,12 +10727,12 @@ avr_addr_space_convert (rtx src, tree type_from, tree type_to)
       rtx new_src = gen_reg_rtx (Pmode);
 
       src = force_reg (PSImode, src);
-      
+
       emit_move_insn (new_src,
                       simplify_gen_subreg (Pmode, src, PSImode, 0));
       return new_src;
     }
-  
+
   return src;
 }
 
@@ -10709,7 +10744,7 @@ avr_addr_space_subset_p (addr_space_t subset ATTRIBUTE_UNUSED,
                          addr_space_t superset ATTRIBUTE_UNUSED)
 {
   /* Allow any kind of pointer mess.  */
-  
+
   return true;
 }
 
@@ -10758,7 +10793,7 @@ avr_emit_movmemhi (rtx *xop)
   else
     {
       int segment = avr_addrspace[as].segment;
-      
+
       if (segment
           && avr_current_device->n_flash > 1)
         {
@@ -10769,7 +10804,7 @@ avr_emit_movmemhi (rtx *xop)
         {
           as = ADDR_SPACE_FLASH;
         }
-      
+
       addr1 = a_src;
 
       loop_mode = (count <= 0x100) ? QImode : HImode;
@@ -10798,7 +10833,7 @@ avr_emit_movmemhi (rtx *xop)
     {
       /* Load instruction ([E]LPM or LD) is known at compile time:
          Do the copy-loop inline.  */
-      
+
       rtx (*fun) (rtx, rtx, rtx)
         = QImode == loop_mode ? gen_movmem_qi : gen_movmem_hi;
 
@@ -10810,7 +10845,7 @@ avr_emit_movmemhi (rtx *xop)
         = QImode == loop_mode ? gen_movmemx_qi : gen_movmemx_hi;
 
       emit_move_insn (gen_rtx_REG (QImode, 23), a_hi8);
-      
+
       insn = fun (xas, GEN_INT (avr_addr.rampz));
     }
 
@@ -10853,12 +10888,12 @@ avr_out_movmem (rtx insn ATTRIBUTE_UNUSED, rtx *op, int *plen)
     {
     default:
       gcc_unreachable();
-      
+
     case ADDR_SPACE_GENERIC:
 
       avr_asm_len ("ld %2,Z+", xop, plen, 1);
       break;
-      
+
     case ADDR_SPACE_FLASH:
 
       if (AVR_HAVE_LPMX)
@@ -10867,7 +10902,7 @@ avr_out_movmem (rtx insn ATTRIBUTE_UNUSED, rtx *op, int *plen)
         avr_asm_len ("lpm" CR_TAB
                      "adiw r30,1", xop, plen, 2);
       break;
-      
+
     case ADDR_SPACE_FLASH1:
     case ADDR_SPACE_FLASH2:
     case ADDR_SPACE_FLASH3:
@@ -10903,7 +10938,7 @@ avr_out_movmem (rtx insn ATTRIBUTE_UNUSED, rtx *op, int *plen)
     }
 
   /* Loop until zero */
-  
+
   return avr_asm_len ("brne 0b", xop, plen, 1);
 }
 
@@ -10925,7 +10960,7 @@ avr_expand_delay_cycles (rtx operands0)
   unsigned HOST_WIDE_INT cycles = UINTVAL (operands0) & GET_MODE_MASK (SImode);
   unsigned HOST_WIDE_INT cycles_used;
   unsigned HOST_WIDE_INT loop_count;
-  
+
   if (IN_RANGE (cycles, 83886082, 0xFFFFFFFF))
     {
       loop_count = ((cycles - 9) / 6) + 1;
@@ -10934,7 +10969,7 @@ avr_expand_delay_cycles (rtx operands0)
                                      avr_mem_clobber()));
       cycles -= cycles_used;
     }
-  
+
   if (IN_RANGE (cycles, 262145, 83886081))
     {
       loop_count = ((cycles - 7) / 5) + 1;
@@ -10945,7 +10980,7 @@ avr_expand_delay_cycles (rtx operands0)
                                      avr_mem_clobber()));
       cycles -= cycles_used;
     }
-  
+
   if (IN_RANGE (cycles, 768, 262144))
     {
       loop_count = ((cycles - 5) / 4) + 1;
@@ -10956,18 +10991,18 @@ avr_expand_delay_cycles (rtx operands0)
                                      avr_mem_clobber()));
       cycles -= cycles_used;
     }
-  
+
   if (IN_RANGE (cycles, 6, 767))
     {
       loop_count = cycles / 3;
-      if (loop_count > 255) 
+      if (loop_count > 255)
         loop_count = 255;
       cycles_used = loop_count * 3;
       emit_insn (gen_delay_cycles_1 (gen_int_mode (loop_count, QImode),
                                      avr_mem_clobber()));
       cycles -= cycles_used;
       }
-  
+
   while (cycles >= 2)
     {
       emit_insn (gen_nopv (GEN_INT(2)));
@@ -10991,7 +11026,7 @@ avr_double_int_push_digit (double_int val, int base,
   val = 0 == base
     ? val.llshift (32, 64)
     : val * double_int::from_uhwi (base);
-  
+
   return val + double_int::from_uhwi (digit);
 }
 
@@ -11014,13 +11049,13 @@ enum
 
     /* Size of preimage of non-fixed points in { 0 ... 7 } */
     MAP_NONFIXED_0_7,
-    
+
     /* Mask representing the fixed points in { 0 ... 7 } */
     MAP_MASK_FIXED_0_7,
-    
+
     /* Size of the preimage of { 0 ... 7 } */
     MAP_PREIMAGE_0_7,
-    
+
     /* Mask that represents the preimage of { f } */
     MAP_MASK_PREIMAGE_F
   };
@@ -11047,7 +11082,7 @@ avr_map_metric (double_int a, int mode)
       else
         gcc_unreachable();
     }
-  
+
   return metric;
 }
 
@@ -11077,7 +11112,7 @@ avr_has_nibble_0xf (rtx ival)
    nibble of the result, we can just as well rotate the bits before inserting
    them and use the map 0x7654ffff which is cheaper than the original map.
    For this example G = G^-1 = 0x32107654 and F o G^-1 = 0x7654ffff.  */
-   
+
 typedef struct
 {
   /* tree code of binary function G */
@@ -11122,7 +11157,7 @@ static const avr_map_op_t avr_map_op[] =
 /* Try to decompose F as F = (F o G^-1) o G as described above.
    The result is a struct representing F o G^-1 and G.
    If result.cost < 0 then such a decomposition does not exist.  */
-   
+
 static avr_map_op_t
 avr_map_decompose (double_int f, const avr_map_op_t *g, bool val_const_p)
 {
@@ -11132,23 +11167,23 @@ avr_map_decompose (double_int f, const avr_map_op_t *g, bool val_const_p)
   double_int ginv = double_int::from_uhwi (g->ginv);
 
   f_ginv.cost = -1;
-  
+
   /* Step 1:  Computing F o G^-1  */
 
   for (i = 7; i >= 0; i--)
     {
       int x = avr_map (f, i);
-      
+
       if (x <= 7)
         {
           x = avr_map (ginv, x);
 
           /* The bit is no element of the image of G: no avail (cost = -1)  */
-          
+
           if (x > 7)
             return f_ginv;
         }
-      
+
       f_ginv.map = avr_double_int_push_digit (f_ginv.map, 16, x);
     }
 
@@ -11177,12 +11212,12 @@ avr_map_decompose (double_int f, const avr_map_op_t *g, bool val_const_p)
       xop[1] = gen_int_mode (f_ginv.map.to_uhwi (), SImode);
       xop[2] = all_regs_rtx[25];
       xop[3] = val_used_p ? xop[0] : const0_rtx;
-  
+
       avr_out_insert_bits (xop, &f_ginv.cost);
-      
+
       f_ginv.cost += val_const_p && val_used_p ? 1 : 0;
     }
-  
+
   /* Step 2b:  Add cost of G  */
 
   f_ginv.cost += g->cost;
@@ -11209,12 +11244,12 @@ avr_move_bits (rtx *xop, double_int map, bool fixp_p, int *plen)
   int t_bit_src = -1;
 
   /* We order the operations according to the requested source bit b.  */
-  
+
   for (b = 0; b < 8; b++)
     for (bit_dest = 0; bit_dest < 8; bit_dest++)
       {
         int bit_src = avr_map (map, bit_dest);
-        
+
         if (b != bit_src
             || bit_src >= 8
             /* Same position: No need to copy as requested by FIXP_P.  */
@@ -11224,7 +11259,7 @@ avr_move_bits (rtx *xop, double_int map, bool fixp_p, int *plen)
         if (t_bit_src != bit_src)
           {
             /* Source bit is not yet in T: Store it to T.  */
-              
+
             t_bit_src = bit_src;
 
             xop[3] = GEN_INT (bit_src);
@@ -11232,7 +11267,7 @@ avr_move_bits (rtx *xop, double_int map, bool fixp_p, int *plen)
           }
 
         /* Load destination bit with T.  */
-        
+
         xop[3] = GEN_INT (bit_dest);
         avr_asm_len ("bld %T0%T3", xop, plen, 1);
       }
@@ -11241,7 +11276,7 @@ avr_move_bits (rtx *xop, double_int map, bool fixp_p, int *plen)
 
 /* PLEN == 0: Print assembler code for `insert_bits'.
    PLEN != 0: Compute code length in bytes.
-   
+
    OP[0]:  Result
    OP[1]:  The mapping composed of nibbles. If nibble no. N is
            0:   Bit N of result is copied from bit OP[2].0
@@ -11264,7 +11299,7 @@ avr_out_insert_bits (rtx *op, int *plen)
   xop[2] = op[3];
 
   gcc_assert (REG_P (xop[2]) || CONST_INT_P (xop[2]));
-          
+
   if (plen)
     *plen = 0;
   else if (flag_print_asm_name)
@@ -11274,13 +11309,13 @@ avr_out_insert_bits (rtx *op, int *plen)
 
   /* If MAP has fixed points it might be better to initialize the result
      with the bits to be inserted instead of moving all bits by hand.  */
-      
+
   mask_fixed = avr_map_metric (map, MAP_MASK_FIXED_0_7);
 
   if (REGNO (xop[0]) == REGNO (xop[1]))
     {
       /* Avoid early-clobber conflicts */
-      
+
       avr_asm_len ("mov __tmp_reg__,%1", xop, plen, 1);
       xop[1] = tmp_reg_rtx;
       fixp_p = false;
@@ -11289,21 +11324,21 @@ avr_out_insert_bits (rtx *op, int *plen)
   if (avr_map_metric (map, MAP_MASK_PREIMAGE_F))
     {
       /* XOP[2] is used and reloaded to XOP[0] already */
-      
+
       int n_fix = 0, n_nofix = 0;
-      
+
       gcc_assert (REG_P (xop[2]));
-      
+
       /* Get the code size of the bit insertions; once with all bits
          moved and once with fixed points omitted.  */
-  
+
       avr_move_bits (xop, map, true, &n_fix);
       avr_move_bits (xop, map, false, &n_nofix);
 
       if (fixp_p && n_fix - n_nofix > 3)
         {
           xop[3] = gen_int_mode (~mask_fixed, QImode);
-        
+
           avr_asm_len ("eor %0,%1"   CR_TAB
                        "andi %0,%3"  CR_TAB
                        "eor %0,%1", xop, plen, 3);
@@ -11313,18 +11348,18 @@ avr_out_insert_bits (rtx *op, int *plen)
   else
     {
       /* XOP[2] is unused */
-      
+
       if (fixp_p && mask_fixed)
         {
           avr_asm_len ("mov %0,%1", xop, plen, 1);
           fixp_p = false;
         }
     }
-  
+
   /* Move/insert remaining bits.  */
 
   avr_move_bits (xop, map, fixp_p, plen);
-  
+
   return "";
 }
 
@@ -11333,9 +11368,8 @@ avr_out_insert_bits (rtx *op, int *plen)
 
 enum avr_builtin_id
   {
-    
 #define DEF_BUILTIN(NAME, N_ARGS, ID, TYPE, CODE) ID,
-#include "builtins.def"  
+#include "builtins.def"
 #undef DEF_BUILTIN
 
     AVR_BUILTIN_COUNT
@@ -11360,7 +11394,7 @@ avr_bdesc[AVR_BUILTIN_COUNT] =
 
 #define DEF_BUILTIN(NAME, N_ARGS, ID, TYPE, ICODE)      \
     { (enum insn_code) ICODE, NAME, N_ARGS, NULL_TREE },
-#include "builtins.def"  
+#include "builtins.def"
 #undef DEF_BUILTIN
   };
 
@@ -11397,26 +11431,26 @@ avr_init_builtins (void)
   tree void_ftype_void
     = build_function_type_list (void_type_node, NULL_TREE);
   tree uchar_ftype_uchar
-    = build_function_type_list (unsigned_char_type_node, 
+    = build_function_type_list (unsigned_char_type_node,
                                 unsigned_char_type_node,
                                 NULL_TREE);
   tree uint_ftype_uchar_uchar
-    = build_function_type_list (unsigned_type_node, 
+    = build_function_type_list (unsigned_type_node,
+                                unsigned_char_type_node,
                                 unsigned_char_type_node,
-                                unsigned_char_type_node, 
                                 NULL_TREE);
   tree int_ftype_char_char
-    = build_function_type_list (integer_type_node, 
+    = build_function_type_list (integer_type_node,
+                                char_type_node,
                                 char_type_node,
-                                char_type_node, 
                                 NULL_TREE);
   tree int_ftype_char_uchar
-    = build_function_type_list (integer_type_node, 
+    = build_function_type_list (integer_type_node,
                                 char_type_node,
-                                unsigned_char_type_node, 
+                                unsigned_char_type_node,
                                 NULL_TREE);
   tree void_ftype_ulong
-    = build_function_type_list (void_type_node, 
+    = build_function_type_list (void_type_node,
                                 long_unsigned_type_node,
                                 NULL_TREE);
 
@@ -11434,7 +11468,7 @@ avr_init_builtins (void)
 
   tree const_memx_ptr_type_node
       = build_pointer_type_for_mode (const_memx_void_node, PSImode, false);
-  
+
   tree char_ftype_const_memx_ptr
       = build_function_type_list (char_type_node,
                                   const_memx_ptr_type_node,
@@ -11444,9 +11478,9 @@ avr_init_builtins (void)
   gcc_assert (ID < AVR_BUILTIN_COUNT);                                  \
   avr_bdesc[ID].fndecl                                                  \
     = add_builtin_function (NAME, TYPE, ID, BUILT_IN_MD, NULL, NULL_TREE);
-#include "builtins.def"  
+#include "builtins.def"
 #undef DEF_BUILTIN
-  
+
   avr_init_builtin_int24 ();
 }
 
@@ -11462,7 +11496,7 @@ avr_default_expand_builtin (enum insn_code icode, tree exp, rtx target)
   enum machine_mode tmode = insn_data[icode].operand[0].mode;
 
   gcc_assert (n_args >= 1 && n_args <= 3);
-              
+
   if (target == NULL_RTX
       || GET_MODE (target) != tmode
       || !insn_data[icode].operand[0].predicate (target, tmode))
@@ -11485,7 +11519,7 @@ avr_default_expand_builtin (enum insn_code icode, tree exp, rtx target)
 
       /* In case the insn wants input operands in modes different from
          the result, abort.  */
-  
+
       gcc_assert (opmode == mode || opmode == VOIDmode);
 
       if (!insn_data[icode].operand[n+1].predicate (op, mode))
@@ -11503,7 +11537,7 @@ avr_default_expand_builtin (enum insn_code icode, tree exp, rtx target)
     default:
       gcc_unreachable();
     }
-  
+
   if (pat == NULL_RTX)
     return NULL_RTX;
 
@@ -11540,7 +11574,7 @@ avr_expand_builtin (tree exp, rtx target,
     case AVR_BUILTIN_NOP:
       emit_insn (gen_nopv (GEN_INT(1)));
       return 0;
-      
+
     case AVR_BUILTIN_DELAY_CYCLES:
       {
         arg0 = CALL_EXPR_ARG (exp, 0);
@@ -11593,7 +11627,7 @@ avr_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED, tree *arg,
 
   if (!optimize)
     return NULL_TREE;
-  
+
   switch (fcode)
     {
     default:
@@ -11604,7 +11638,7 @@ avr_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED, tree *arg,
         return fold_build2 (LROTATE_EXPR, val_type, arg[0],
                             build_int_cst (val_type, 4));
       }
-  
+
     case AVR_BUILTIN_INSERT_BITS:
       {
         tree tbits = arg[1];
@@ -11620,10 +11654,10 @@ avr_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED, tree *arg,
           {
             /* No constant as first argument: Don't fold this and run into
                error in avr_expand_builtin.  */
-            
+
             break;
           }
-        
+
         map = tree_to_double_int (arg[0]);
         tmap = double_int_to_tree (map_type, map);
 
@@ -11633,7 +11667,7 @@ avr_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED, tree *arg,
             /* There are no F in the map, i.e. 3rd operand is unused.
                Replace that argument with some constant to render
                respective input unused.  */
-            
+
             tval = build_int_cst (val_type, 0);
             changed = true;
           }
@@ -11643,7 +11677,7 @@ avr_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED, tree *arg,
           {
             /* Similar for the bits to be inserted. If they are unused,
                we can just as well pass 0.  */
-            
+
             tbits = build_int_cst (val_type, 0);
           }
 
@@ -11692,10 +11726,10 @@ avr_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED, tree *arg,
 
         if (avr_log.builtin)
           avr_edump ("\n%?: %X\n%?: ROL cost: ", map);
-        
+
         best_g = avr_map_op[0];
         best_g.cost = 1000;
-        
+
         for (i = 0; i < sizeof (avr_map_op) / sizeof (*avr_map_op); i++)
           {
             avr_map_op_t g
@@ -11708,29 +11742,29 @@ avr_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED, tree *arg,
 
         if (avr_log.builtin)
           avr_edump ("\n");
-                     
+
         if (best_g.arg == 0)
           /* No optimization found */
           break;
-        
+
         /* Apply operation G to the 2nd argument.  */
-              
+
         if (avr_log.builtin)
           avr_edump ("%?: using OP(%s%d, %X) cost %d\n",
                      best_g.str, best_g.arg, best_g.map, best_g.cost);
 
         /* Do right-shifts arithmetically: They copy the MSB instead of
            shifting in a non-usable value (0) as with logic right-shift.  */
-        
+
         tbits = fold_convert (signed_char_type_node, tbits);
         tbits = fold_build2 (best_g.code, signed_char_type_node, tbits,
                              build_int_cst (val_type, best_g.arg));
         tbits = fold_convert (val_type, tbits);
 
         /* Use map o G^-1 instead of original map to undo the effect of G.  */
-        
+
         tmap = double_int_to_tree (map_type, best_g.map);
-        
+
         return build_call_expr (fndecl, 3, tmap, tbits, tval);
       } /* AVR_BUILTIN_INSERT_BITS */
     }
index df3a04e3198b43accb46922ff516c1a6c55139e2..7491f348a252d9fdd334ac5803b21b7b728e7e3b 100644 (file)
@@ -201,10 +201,11 @@ enum
     32,33,34,35                                        \
     }
 
-#define ADJUST_REG_ALLOC_ORDER order_regs_for_local_alloc ()
+#define ADJUST_REG_ALLOC_ORDER avr_adjust_reg_alloc_order()
 
 
-#define HARD_REGNO_NREGS(REGNO, MODE) ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
+#define HARD_REGNO_NREGS(REGNO, MODE)                                   \
+  ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
 
 #define HARD_REGNO_MODE_OK(REGNO, MODE) avr_hard_regno_mode_ok(REGNO, MODE)
 
@@ -318,15 +319,19 @@ enum reg_class {
    for POST_DEC targets (PR27386).  */
 /*#define PUSH_ROUNDING(NPUSHED) (NPUSHED)*/
 
-typedef struct avr_args {
-  int nregs;                   /* # registers available for passing */
-  int regno;                   /* next available register number */
+typedef struct avr_args
+{
+  /* # Registers available for passing */
+  int nregs;
+
+  /* Next available register number */
+  int regno;
 } CUMULATIVE_ARGS;
 
 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
-  init_cumulative_args (&(CUM), FNTYPE, LIBNAME, FNDECL)
+  avr_init_cumulative_args (&(CUM), FNTYPE, LIBNAME, FNDECL)
 
-#define FUNCTION_ARG_REGNO_P(r) function_arg_regno_p(r)
+#define FUNCTION_ARG_REGNO_P(r) avr_function_arg_regno_p(r)
 
 #define DEFAULT_PCC_STRUCT_RETURN 0
 
@@ -415,7 +420,8 @@ typedef struct avr_args {
     "r24","r25","r26","r27","r28","r29","r30","r31",   \
     "__SP_L__","__SP_H__","argL","argH"}
 
-#define FINAL_PRESCAN_INSN(insn, operand, nop) final_prescan_insn (insn, operand,nop)
+#define FINAL_PRESCAN_INSN(insn, operand, nop)  \
+  avr_final_prescan_insn (insn, operand,nop)
 
 #define ASM_OUTPUT_REG_PUSH(STREAM, REGNO)     \
 {                                              \
@@ -429,8 +435,8 @@ typedef struct avr_args {
   fprintf (STREAM, "\tpop\tr%d", REGNO);       \
 }
 
-#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE)         \
-  avr_output_addr_vec_elt(STREAM, VALUE)
+#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE)  \
+  avr_output_addr_vec_elt (STREAM, VALUE)
 
 #define ASM_OUTPUT_ALIGN(STREAM, POWER)                 \
   do {                                                  \
@@ -459,7 +465,7 @@ typedef struct avr_args {
    after execution of an instruction whose pattern is EXP.
    Do not alter them if the instruction would not alter the cc's.  */
 
-#define NOTICE_UPDATE_CC(EXP, INSN) notice_update_cc(EXP, INSN)
+#define NOTICE_UPDATE_CC(EXP, INSN) avr_notice_update_cc (EXP, INSN)
 
 /* The add insns don't set overflow in a usable way.  */
 #define CC_OVERFLOW_UNUSABLE 01000
@@ -477,8 +483,8 @@ typedef struct avr_args {
 #define FUNCTION_PROFILER(FILE, LABELNO)  \
   fprintf (FILE, "/* profiler %d */", (LABELNO))
 
-#define ADJUST_INSN_LENGTH(INSN, LENGTH) (LENGTH =\
-                                         adjust_insn_length (INSN, LENGTH))
+#define ADJUST_INSN_LENGTH(INSN, LENGTH)                \
+    (LENGTH = avr_adjust_insn_length (INSN, LENGTH))
 
 extern const char *avr_device_to_arch (int argc, const char **argv);
 extern const char *avr_device_to_data_start (int argc, const char **argv);
index d82c5264f60cb0c3e766c44884ff408588378019..6432d638220d2ea31d8eb9071a3573349bcf6879 100644 (file)
@@ -82,7 +82,7 @@
    UNSPECV_WDR
    UNSPECV_DELAY_CYCLES
    ])
-    
+
 
 (include "predicates.md")
 (include "constraints.md")
 (define_attr "enabled" ""
   (cond [(eq_attr "isa" "standard")
          (const_int 1)
-         
+
          (and (eq_attr "isa" "mov")
               (match_test "!AVR_HAVE_MOVW"))
          (const_int 1)
          (and (eq_attr "isa" "movw")
               (match_test "AVR_HAVE_MOVW"))
          (const_int 1)
-         
+
          (and (eq_attr "isa" "rjmp")
               (match_test "!AVR_HAVE_JMP_CALL"))
          (const_int 1)
          (and (eq_attr "isa" "jmp")
               (match_test "AVR_HAVE_JMP_CALL"))
          (const_int 1)
-         
+
          (and (eq_attr "isa" "ijmp")
               (match_test "!AVR_HAVE_EIJMP_EICALL"))
          (const_int 1)
 ;; The code derived from builtins.c.
 
 (define_expand "nonlocal_goto_receiver"
-  [(set (reg:HI REG_Y) 
+  [(set (reg:HI REG_Y)
         (unspec_volatile:HI [(const_int 0)] UNSPECV_GOTO_RECEIVER))]
   ""
   {
-    emit_move_insn (virtual_stack_vars_rtx, 
-                    gen_rtx_PLUS (Pmode, hard_frame_pointer_rtx, 
+    emit_move_insn (virtual_stack_vars_rtx,
+                    gen_rtx_PLUS (Pmode, hard_frame_pointer_rtx,
                                   gen_int_mode (STARTING_FRAME_OFFSET,
                                                 Pmode)));
     /* ; This might change the hard frame pointer in ways that aren't
     emit_clobber (hard_frame_pointer_rtx);
     DONE;
   })
-  
+
 
 ;; Defining nonlocal_goto_receiver means we must also define this.
 ;; even though its function is identical to that in builtins.c
     emit_use (stack_pointer_rtx);
 
     emit_indirect_jump (r_label);
+
     DONE;
   })
 
 
 ;; "loadqi_libgcc"
 ;; "loadhi_libgcc"
-;; "loadpsi_libgcc"    
-;; "loadsi_libgcc"    
-;; "loadsf_libgcc"    
+;; "loadpsi_libgcc"
+;; "loadsi_libgcc"
+;; "loadsf_libgcc"
 (define_expand "load<mode>_libgcc"
   [(set (match_dup 3)
         (match_dup 2))
 
 ;; "load_qi_libgcc"
 ;; "load_hi_libgcc"
-;; "load_psi_libgcc"    
-;; "load_si_libgcc"    
-;; "load_sf_libgcc"    
+;; "load_psi_libgcc"
+;; "load_si_libgcc"
+;; "load_sf_libgcc"
 (define_insn "load_<mode>_libgcc"
   [(set (reg:MOVMODE 22)
         (match_operand:MOVMODE 0 "memory_operand" "m,m"))]
   ""
   {
     rtx dest = operands[0];
-    rtx src  = operands[1]; 
-    
+    rtx src  = operands[1];
+
     if (avr_mem_flash_p (dest))
       DONE;
-  
+
     /* One of the operands has to be in a register.  */
     if (!register_operand (dest, <MODE>mode)
         && !reg_or_0_operand (src, <MODE>mode))
     operands[5] = gen_rtx_REG (HImode, REGNO (operands[3]));
   })
 
-;; For LPM loads from AS1 we split 
+;; For LPM loads from AS1 we split
 ;;    R = *Z
 ;; to
 ;;    R = *Z++
 
 ;;==========================================================================
 ;; xpointer move (24 bit)
-  
+
 (define_peephole2 ; *reload_inpsi
   [(match_scratch:QI 2 "d")
    (set (match_operand:PSI 0 "l_register_operand" "")
   [(parallel [(set (match_dup 0)
                    (match_dup 1))
               (clobber (match_dup 2))])])
-  
+
 ;; '*' because it is not used in rtl generation.
 (define_insn "*reload_inpsi"
   [(set (match_operand:PSI 0 "register_operand" "=r")
   [(set_attr "length" "3,3,8,9,4,10")
    (set_attr "adjust_len" "mov24")
    (set_attr "cc" "none,none,clobber,clobber,none,clobber")])
-  
+
 ;;==========================================================================
 ;; move double word (32 bit)
 
         (match_operand:SF 1 "const_double_operand" ""))
    (match_dup 2)]
   "operands[1] != CONST0_RTX (SFmode)"
-  [(parallel [(set (match_dup 0) 
+  [(parallel [(set (match_dup 0)
                    (match_dup 1))
               (clobber (match_dup 2))])])
 
   {
     if (avr_emit_movmemhi (operands))
       DONE;
-    
+
     FAIL;
   })
 
     if (operands[2] != const0_rtx)
       FAIL;
     addr = copy_to_mode_reg (Pmode, XEXP (operands[1], 0));
-    operands[1] = gen_rtx_MEM (BLKmode, addr); 
+    operands[1] = gen_rtx_MEM (BLKmode, addr);
     operands[5] = addr;
     operands[4] = gen_reg_rtx (HImode);
   })
        clr __zero_reg__"
   [(set_attr "length" "3")
    (set_attr "cc" "clobber")])
-  
+
 
 ;; Used when expanding div or mod inline for some special values
 (define_insn "*subqi3.ashiftrt7"
   "%~call __umulqihi3"
   [(set_attr "type" "xcall")
    (set_attr "cc" "clobber")])
-  
+
 ;; "umulqihi3"
 ;; "mulqihi3"
 (define_insn "<extend_u>mulqihi3"
         (plus:QI (mult:QI (match_operand:QI 1 "register_operand" "r")
                           (match_operand:QI 2 "register_operand" "r"))
                  (match_operand:QI 3 "register_operand"          "0")))]
-  
+
   "AVR_HAVE_MUL"
   "mul %1,%2
        add %A0,r0
         (plus:HI (mult:HI (any_extend:HI (match_operand:QI 1 "register_operand" "<mul_r_d>"))
                           (any_extend:HI (match_operand:QI 2 "register_operand" "<mul_r_d>")))
                  (match_operand:HI 3 "register_operand"                         "0")))]
-  
+
   "AVR_HAVE_MUL"
   "mul<extend_s> %1,%2
        add %A0,r0
         if (u8_operand (operands[2], HImode))
           {
             emit_insn (gen_muluqihi3 (operands[0], reg, operands[1]));
-          } 
+          }
         else if (s8_operand (operands[2], HImode))
           {
             emit_insn (gen_mulsqihi3 (operands[0], reg, operands[1]));
   "&& 1"
   [(set (reg:SI 18)
         (match_dup 1))
-   (set (reg:SI 22) 
+   (set (reg:SI 22)
         (match_dup 2))
    (parallel [(set (reg:SI 22)
                    (mult:SI (reg:SI 22)
   {
     /* Do the QI -> HI extension explicitely before the multiplication.  */
     /* Do the HI -> SI extension implicitely and after the multiplication.  */
-       
+
     if (QImode == <MODE>mode)
       operands[1] = gen_rtx_ZERO_EXTEND (HImode, operands[1]);
 
   {
     /* Do the QI -> HI extension explicitely before the multiplication.  */
     /* Do the HI -> SI extension implicitely and after the multiplication.  */
-       
+
     if (QImode == <MODE>mode)
       operands[1] = gen_rtx_SIGN_EXTEND (HImode, operands[1]);
 
 
 (define_insn_and_split "mulohisi3"
   [(set (match_operand:SI 0 "pseudo_register_operand"                          "=r")
-        (mult:SI (not:SI (zero_extend:SI 
+        (mult:SI (not:SI (zero_extend:SI
                           (not:HI (match_operand:HI 1 "pseudo_register_operand" "r"))))
                  (match_operand:SI 2 "pseudo_register_or_const_int_operand"     "rn")))
    (clobber (reg:HI 26))
 
     /* Do the QI -> HI extension explicitely before the multiplication.  */
     /* Do the HI -> SI extension implicitely and after the multiplication.  */
-       
+
     if (QImode == <QIHI:MODE>mode)
       xop1 = gen_rtx_fmt_e (<any_extend:CODE>, HImode, xop1);
 
 ;;  - we get both the quotient and the remainder at no extra cost
 ;;  - we split the patterns only after the first CSE passes because
 ;;    CSE has problems to operate on hard regs.
-;; 
+;;
 (define_insn_and_split "divmodqi4"
-  [(parallel [(set (match_operand:QI 0 "pseudo_register_operand" "") 
-                   (div:QI (match_operand:QI 1 "pseudo_register_operand" "") 
+  [(parallel [(set (match_operand:QI 0 "pseudo_register_operand" "")
+                   (div:QI (match_operand:QI 1 "pseudo_register_operand" "")
                            (match_operand:QI 2 "pseudo_register_operand" "")))
-              (set (match_operand:QI 3 "pseudo_register_operand" "") 
+              (set (match_operand:QI 3 "pseudo_register_operand" "")
                    (mod:QI (match_dup 1) (match_dup 2)))
-              (clobber (reg:QI 22)) 
-              (clobber (reg:QI 23)) 
-              (clobber (reg:QI 24)) 
+              (clobber (reg:QI 22))
+              (clobber (reg:QI 23))
+              (clobber (reg:QI 24))
               (clobber (reg:QI 25))])]
   ""
   "this divmodqi4 pattern should have been splitted;"
    (set_attr "cc" "clobber")])
 
 (define_insn_and_split "udivmodqi4"
- [(parallel [(set (match_operand:QI 0 "pseudo_register_operand" "") 
-                  (udiv:QI (match_operand:QI 1 "pseudo_register_operand" "") 
+ [(parallel [(set (match_operand:QI 0 "pseudo_register_operand" "")
+                  (udiv:QI (match_operand:QI 1 "pseudo_register_operand" "")
                            (match_operand:QI 2 "pseudo_register_operand" "")))
-             (set (match_operand:QI 3 "pseudo_register_operand" "") 
+             (set (match_operand:QI 3 "pseudo_register_operand" "")
                   (umod:QI (match_dup 1) (match_dup 2)))
              (clobber (reg:QI 22))
              (clobber (reg:QI 23))
              (clobber (reg:QI 25))])]
   ""
   "this udivmodqi4 pattern should have been splitted;"
-  "" 
+  ""
   [(set (reg:QI 24) (match_dup 1))
    (set (reg:QI 22) (match_dup 2))
    (parallel [(set (reg:QI 24) (udiv:QI (reg:QI 24) (reg:QI 22)))
    (set_attr "cc" "clobber")])
 
 (define_insn_and_split "divmodhi4"
-  [(parallel [(set (match_operand:HI 0 "pseudo_register_operand" "") 
-                   (div:HI (match_operand:HI 1 "pseudo_register_operand" "") 
+  [(parallel [(set (match_operand:HI 0 "pseudo_register_operand" "")
+                   (div:HI (match_operand:HI 1 "pseudo_register_operand" "")
                            (match_operand:HI 2 "pseudo_register_operand" "")))
-              (set (match_operand:HI 3 "pseudo_register_operand" "") 
+              (set (match_operand:HI 3 "pseudo_register_operand" "")
                    (mod:HI (match_dup 1) (match_dup 2)))
               (clobber (reg:QI 21))
               (clobber (reg:HI 22))
    (set_attr "cc" "clobber")])
 
 (define_insn_and_split "udivmodhi4"
-  [(parallel [(set (match_operand:HI 0 "pseudo_register_operand" "") 
+  [(parallel [(set (match_operand:HI 0 "pseudo_register_operand" "")
                    (udiv:HI (match_operand:HI 1 "pseudo_register_operand" "")
                             (match_operand:HI 2 "pseudo_register_operand" "")))
-              (set (match_operand:HI 3 "pseudo_register_operand" "") 
+              (set (match_operand:HI 3 "pseudo_register_operand" "")
                    (umod:HI (match_dup 1) (match_dup 2)))
               (clobber (reg:QI 21))
               (clobber (reg:HI 22))
   "&& 1"
   [(set (reg:PSI 18)
         (match_dup 1))
-   (set (reg:PSI 22) 
+   (set (reg:PSI 22)
         (match_dup 2))
    (parallel [(set (reg:PSI 22)
                    (mult:PSI (reg:PSI 22)
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define_insn_and_split "divmodsi4"
-  [(parallel [(set (match_operand:SI 0 "pseudo_register_operand" "") 
-                   (div:SI (match_operand:SI 1 "pseudo_register_operand" "") 
+  [(parallel [(set (match_operand:SI 0 "pseudo_register_operand" "")
+                   (div:SI (match_operand:SI 1 "pseudo_register_operand" "")
                            (match_operand:SI 2 "pseudo_register_operand" "")))
-              (set (match_operand:SI 3 "pseudo_register_operand" "") 
+              (set (match_operand:SI 3 "pseudo_register_operand" "")
                    (mod:SI (match_dup 1) (match_dup 2)))
               (clobber (reg:SI 18))
               (clobber (reg:SI 22))
               (clobber (reg:HI 26))
               (clobber (reg:HI 30))])]
   ""
-  "this divmodsi4 pattern should have been splitted;" 
+  "this divmodsi4 pattern should have been splitted;"
   ""
   [(set (reg:SI 22) (match_dup 1))
    (set (reg:SI 18) (match_dup 2))
    (set_attr "cc" "clobber")])
 
 (define_insn_and_split "udivmodsi4"
-  [(parallel [(set (match_operand:SI 0 "pseudo_register_operand" "") 
-                   (udiv:SI (match_operand:SI 1 "pseudo_register_operand" "") 
+  [(parallel [(set (match_operand:SI 0 "pseudo_register_operand" "")
+                   (udiv:SI (match_operand:SI 1 "pseudo_register_operand" "")
                            (match_operand:SI 2 "pseudo_register_operand" "")))
-              (set (match_operand:SI 3 "pseudo_register_operand" "") 
+              (set (match_operand:SI 3 "pseudo_register_operand" "")
                    (umod:SI (match_dup 1) (match_dup 2)))
               (clobber (reg:SI 18))
               (clobber (reg:SI 22))
       FAIL;
 
     offset = INTVAL (operands[2]);
+
     if (0 == offset % 8)
       {
         if (AVR_HAVE_MOVW && 0 == offset % 16)
         if (IN_RANGE (INTVAL (operands[2]), 3, 6))
           {
             rtx xoffset = force_reg (QImode, gen_int_mode (1 << INTVAL (operands[2]), QImode));
-            emit_insn (gen_mulsqipsi3 (operands[0], xoffset, operands[1])); 
+            emit_insn (gen_mulsqipsi3 (operands[0], xoffset, operands[1]));
             DONE;
           }
         else if (optimize_insn_for_speed_p ()
                  && IN_RANGE (INTVAL (operands[2]), 9, 22))
           {
             rtx xoffset = force_reg (PSImode, gen_int_mode (1 << INTVAL (operands[2]), PSImode));
-            emit_insn (gen_mulpsi3 (operands[0], operands[1], xoffset)); 
+            emit_insn (gen_mulpsi3 (operands[0], operands[1], xoffset));
             DONE;
           }
       }
       case 0:
       case 1:
         return avr_out_tsthi (insn, operands, NULL);
-        
+
       case 2:
         return "cp %A0,%A1\;cpc %B0,%B1";
 
         return reg_unused_after (insn, operands[0])
                ? "subi %A0,lo8(%1)\;sbci %B0,hi8(%1)"
                : "ldi %2,hi8(%1)\;cpi %A0,lo8(%1)\;cpc %B0,%2";
-               
+
       case 4:
         if (<MODE>mode != HImode)
           break;
         return "ldi %2,lo8(%1)\;cp %A0,%2\;ldi %2,hi8(%1)\;cpc %B0,%2";
       }
-      
+
     return avr_out_compare (insn, operands, NULL);
-  } 
+  }
   [(set_attr "cc" "compare")
    (set_attr "length" "1,2,2,3,4,2,4")
    (set_attr "adjust_len" "tsthi,tsthi,*,*,*,compare,compare")])
         return reg_unused_after (insn, operands[0])
                ? "subi %A0,lo8(%1)\;sbci %B0,hi8(%1)\;sbci %C0,hh8(%1)"
                : "cpi %A0,lo8(%1)\;ldi %2,hi8(%1)\;cpc %B0,%2\;ldi %2,hh8(%1)\;cpc %C0,%2";
-               
+
       case 3:
         return "ldi %2,lo8(%1)\;cp %A0,%2\;ldi %2,hi8(%1)\;cpc %B0,%2\;ldi %2,hh8(%1)\;cpc %C0,%2";
       }
-    
+
     return avr_out_compare (insn, operands, NULL);
   }
   [(set_attr "cc" "compare")
       return avr_out_tstsi (insn, operands, NULL);
     else if (1 == which_alternative)
       return "cp %A0,%A1\;cpc %B0,%B1\;cpc %C0,%C1\;cpc %D0,%D1";
-      
+
     return avr_out_compare (insn, operands, NULL);
   }
   [(set_attr "cc" "compare")
 
 (define_insn "rvbranch"
   [(set (pc)
-        (if_then_else (match_operator 1 "simple_comparison_operator" 
+        (if_then_else (match_operator 1 "simple_comparison_operator"
                                       [(cc0)
                                        (const_int 0)])
                       (pc)
 
 (define_insn "difficult_rvbranch"
   [(set (pc)
-        (if_then_else (match_operator 1 "difficult_comparison_operator" 
+        (if_then_else (match_operator 1 "difficult_comparison_operator"
                                       [(cc0)
                                        (const_int 0)])
                       (pc)
                    (compare (match_dup 6)
                             (match_operand:HI 2 "register_operand" "")))
               (clobber (match_scratch:QI 9 ""))])
-   
+
    (set (pc)
         (if_then_else (gtu (cc0)
                            (const_int 0))
 ;;
 ;; Notice that the peephole is always shorter than cmpqi + branch.
 ;; The reason to write it as peephole is that sequences like
-;;     
+;;
 ;;     AND   Rm, Rn
 ;;     BRNE  .La
 ;;
 ;; shall not be superseeded.  With a respective combine pattern
-;; the latter sequence would be 
-;;     
+;; the latter sequence would be
+;;
 ;;     AND   Rm, Rn
 ;;     CPSE  Rm, __zero_reg__
 ;;     RJMP  .La
   [(set_attr "length" "5,6")
    (set_attr "cc" "clobber")
    (set_attr "isa" "rjmp,jmp")])
-  
+
 ;  epilogue  restores using library
 (define_insn "epilogue_restores"
   [(unspec_volatile:QI [(const_int 0)] UNSPECV_EPILOGUE_RESTORES)
   [(set_attr "length" "2,3")
    (set_attr "cc" "clobber")
    (set_attr "isa" "rjmp,jmp")])
-  
+
 ; return
 (define_insn "return"
   [(return)]
 
 (define_insn "return_from_epilogue"
   [(return)]
-  "reload_completed 
-   && cfun->machine 
+  "reload_completed
+   && cfun->machine
    && !(cfun->machine->is_interrupt || cfun->machine->is_signal)
    && !cfun->machine->is_naked"
   "ret"
 
 (define_insn "return_from_interrupt_epilogue"
   [(return)]
-  "reload_completed 
-   && cfun->machine 
+  "reload_completed
+   && cfun->machine
    && (cfun->machine->is_interrupt || cfun->machine->is_signal)
    && !cfun->machine->is_naked"
   "reti"
 
 (define_insn "return_from_naked_epilogue"
   [(return)]
-  "reload_completed 
-   && cfun->machine 
+  "reload_completed
+   && cfun->machine
    && cfun->machine->is_naked"
   ""
   [(set_attr "cc" "none")
   [(const_int 0)]
   ""
   {
-    expand_prologue (); 
+    avr_expand_prologue ();
     DONE;
   })
 
   [(const_int 0)]
   ""
   {
-    expand_epilogue (false /* sibcall_p */);
+    avr_expand_epilogue (false /* sibcall_p */);
     DONE;
   })
 
   [(const_int 0)]
   ""
   {
-    expand_epilogue (true /* sibcall_p */);
+    avr_expand_epilogue (true /* sibcall_p */);
     DONE;
   })
 
   "bst %D2,7\;bld %D0,7"
   [(set_attr "length" "2")
    (set_attr "cc" "none")])
-  
+
 ;; Swap Bytes (change byte-endianess)
 
 (define_expand "bswapsi2"
 
 ;; CPU instructions
 
-;; NOP taking 1 or 2 Ticks 
+;; NOP taking 1 or 2 Ticks
 (define_expand "nopv"
-  [(parallel [(unspec_volatile [(match_operand:SI 0 "const_int_operand" "")] 
+  [(parallel [(unspec_volatile [(match_operand:SI 0 "const_int_operand" "")]
                                UNSPECV_NOP)
               (set (match_dup 1)
                    (unspec_volatile:BLK [(match_dup 1)]
   })
 
 (define_insn "*nopv"
-  [(unspec_volatile [(match_operand:SI 0 "const_int_operand" "P,K")] 
+  [(unspec_volatile [(match_operand:SI 0 "const_int_operand" "P,K")]
                     UNSPECV_NOP)
    (set (match_operand:BLK 1 "" "")
        (unspec_volatile:BLK [(match_dup 1)] UNSPECV_MEMORY_BARRIER))]
   "sleep"
   [(set_attr "length" "1")
    (set_attr "cc" "none")])
+
 ;; WDR
 (define_expand "wdr"
   [(parallel [(unspec_volatile [(const_int 0)] UNSPECV_WDR)
   "wdr"
   [(set_attr "length" "1")
    (set_attr "cc" "none")])
-  
+
 ;; FMUL
 (define_expand "fmul"
   [(set (reg:QI 24)
 
 (define_insn_and_split "*extzv.qihi2"
   [(set (match_operand:HI 0 "register_operand"                      "=r")
-        (zero_extend:HI 
+        (zero_extend:HI
          (zero_extract:QI (match_operand:QI 1 "register_operand"     "r")
                           (const_int 1)
                           (match_operand:QI 2 "const_0_to_7_operand" "n"))))]
index fda533d919439959a73ada39556bdba974b24d77..4983c963b474a94a39b67e6dbb5dd78b4c410f3a 100644 (file)
 ;; True for EQ & NE
 (define_predicate "eqne_operator"
   (match_code "eq,ne"))
-       
+
 ;; True for GE & LT
 (define_predicate "gelt_operator"
   (match_code "ge,lt"))
-       
+
 ;; True for GT, GTU, LE & LEU
 (define_predicate "difficult_comparison_operator"
   (match_code "gt,gtu,le,leu"))
index 0d38ee32d6bab90781aca986aff8edb6f7e0d30c..8629b85e8ad0c15301d5d3615e8bec7668495292 100644 (file)
@@ -1,3 +1,8 @@
+2013-01-14  Georg-Johann Lay  <avr@gjlay.de>
+
+       * config/avr/lib1funcs.S: Remove trailing blanks.
+       * config/avr/lib1funcs-fixed.S: Ditto.
+
 2013-01-14  Georg-Johann Lay  <avr@gjlay.de>
 
        * config/avr/avr-lib.h: Add GPL copyright notice.
index a9fd7d91f2046b2974ae95196e5172ce42a251cf..0863c6299f4c71dc702854f06f47bd5fb9ed341c 100644 (file)
@@ -1,5 +1,5 @@
 /*  -*- Mode: Asm -*-  */
-;;    Copyright (C) 2012
+;;    Copyright (C) 2012-2013
 ;;    Free Software Foundation, Inc.
 ;;    Contributed by Sean D'Epagnier  (sean@depagnier.com)
 ;;                   Georg-Johann Lay (avr@gjlay.de)
@@ -163,7 +163,7 @@ ENDF __fractusasf
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Conversions from float
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-       
+
 #if defined (L_fractsfqq)
 DEFUN __fractsfqq
     ;; Multiply with 2^{24+7} to get a QQ result in r25
@@ -408,14 +408,14 @@ DEFUN __mulusa3_round
 
     mul A1, B0  $  add  C3, r0  $  adc C0, r1
     mul A0, B1  $  add  C3, r0  $  adc C0, r1  $  rol C1
-    
+
     ;; Round if T = 1.  Store guarding bits outside the result for rounding
     ;; and left-shift by the signed version (function below).
     brtc 0f
     sbrc C3, 7
     adiw C0, 1
 0:  push C3
-    
+
     ;; The following MULs don't have LSBs outside the result.
     ;; C2/C3 is the high part.
 
@@ -429,11 +429,11 @@ DEFUN __mulusa3_round
     mul  A2, B1  $  add C1, r0  $  adc C2, r1  $  sbci C3, 0
     mul  A3, B0  $  add C1, r0  $  adc C2, r1  $  sbci C3, 0
     neg  C3
-    
+
     mul  A1, B3  $  add C2, r0  $  adc C3, r1
     mul  A2, B2  $  add C2, r0  $  adc C3, r1
     mul  A3, B1  $  add C2, r0  $  adc C3, r1
-    
+
     mul  A2, B3  $  add C3, r0
     mul  A3, B2  $  add C3, r0
 
@@ -636,7 +636,7 @@ DEFUN __mulusa3_round
     adc     C1, __zero_reg__
     adc     C2, __zero_reg__
     adc     C3, __zero_reg__
-6:  
+6:
     pop     GUARD
     ;; Epilogue
     pop     CC3
index ad9791893066d2609f157810818bcbe4b2513f05..436c511bcdad244e6b17abd2dd185f90daef7050 100644 (file)
@@ -1,5 +1,5 @@
 /*  -*- Mode: Asm -*-  */
-/* Copyright (C) 1998, 1999, 2000, 2007, 2008, 2009
+/* Copyright (C) 1998-2013
    Free Software Foundation, Inc.
    Contributed by Denis Chertykov <chertykov@gmail.com>
 
@@ -151,16 +151,16 @@ __mulqi3_loop:
        add     r_res,r_arg2
        add     r_arg2,r_arg2   ; shift multiplicand
        breq    __mulqi3_exit   ; while multiplicand != 0
-       lsr     r_arg1          ; 
+       lsr     r_arg1          ;
        brne    __mulqi3_loop   ; exit if multiplier = 0
 __mulqi3_exit: 
        mov     r_arg1,r_res    ; result to return register
        ret
 ENDF __mulqi3
 
-#undef r_arg2  
-#undef r_arg1  
-#undef r_res   
+#undef r_arg2
+#undef r_arg1
+#undef r_res
        
 #endif         /* defined (L_mulqi3) */
 
@@ -370,7 +370,7 @@ DEFUN __mulsi3_helper
 
 2:  ;; B <<= 1
     lsl  B0      $  rol  B1      $  rol  B2      $  rol  B3
-    
+
 3:  ;; A >>= 1:  Carry = n-th bit of A
     lsr  A3      $  ror  A2      $  ror  A1      $  ror  A0
 
@@ -409,7 +409,7 @@ ENDF __mulsi3_helper
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 \f
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-#if defined (__AVR_HAVE_MUL__)    
+#if defined (__AVR_HAVE_MUL__)
 #define A0 26
 #define B0 18
 #define C0 22
@@ -427,7 +427,7 @@ ENDF __mulsi3_helper
 /*******************************************************
     Widening Multiplication  32 = 16 x 16  with MUL
 *******************************************************/
-                              
+
 #if defined (L_mulhisi3)
 ;;; R25:R22 = (signed long) R27:R26 * (signed long) R19:R18
 ;;; C3:C0   = (signed long) A1:A0   * (signed long) B1:B0
@@ -512,7 +512,7 @@ DEFUN __mulshisi3
     XJMP    __muluhisi3
     ;; FALLTHRU
 ENDF __mulshisi3
-    
+
 ;;; R25:R22 = (one-extended long) R27:R26 * R21:R18
 ;;; (C3:C0) = (one-extended long) A1:A0   * B3:B0
 ;;; Clobbers: __tmp_reg__
@@ -647,23 +647,23 @@ DEFUN __mulpsi3
     ;; C[] = 0
     clr     __tmp_reg__
     clr     C2
-    
+
 0:  ;; Shift N-th Bit of B[] into Carry.  N = 24 - Loop
     LSR  B2     $  ror  B1     $  ror  B0
-    
+
     ;; If the N-th Bit of B[] was set...
     brcc    1f
-    
+
     ;; ...then add A[] * 2^N to the Result C[]
     ADD  C0,A0  $  adc  C1,A1  $  adc  C2,A2
-    
+
 1:  ;; Multiply A[] by 2
     LSL  A0     $  rol  A1     $  rol  A2
-    
+
     ;; Loop until B[] is 0
     subi B0,0   $  sbci B1,0   $  sbci B2,0
     brne    0b
-    
+
     ;; Copy C[] to the return Register A[]
     wmov    A0, C0
     mov     A2, C2
@@ -1002,7 +1002,7 @@ __udivmodqi4_ep:
        rol     r_arg1          ; shift dividend (with CARRY)
        dec     r_cnt           ; decrement loop counter
        brne    __udivmodqi4_loop
-       com     r_arg1          ; complement result 
+       com     r_arg1          ; complement result
                                ; because C flag was complemented in loop
        ret
 ENDF __udivmodqi4
@@ -1112,14 +1112,14 @@ __divmodhi4_exit:
 ENDF __divmodhi4
 #endif /* defined (L_divmodhi4) */
 
-#undef r_remH  
-#undef r_remL  
-             
-#undef r_arg1H 
-#undef r_arg1L 
-             
-#undef r_arg2H 
-#undef r_arg2L 
+#undef r_remH
+#undef r_remL
+
+#undef r_arg1H
+#undef r_arg1L
+
+#undef r_arg2H
+#undef r_arg2L
                
 #undef r_cnt           
 
@@ -1501,8 +1501,8 @@ DEFUN __udivmod64
 
 1:  ;; Compare shifted Devidend against Divisor
     ;; If -- even after Shifting -- it is smaller...
-    CP  A7,B0  $  cpc C0,B1  $  cpc C1,B2  $  cpc C2,B3  
-    cpc C3,B4  $  cpc C4,B5  $  cpc C5,B6  $  cpc C6,B7  
+    CP  A7,B0  $  cpc C0,B1  $  cpc C1,B2  $  cpc C2,B3
+    cpc C3,B4  $  cpc C4,B5  $  cpc C5,B6  $  cpc C6,B7
     brcc    2f
 
     ;; ...then we can subtract it.  Thus, it is legal to shift left
@@ -1596,7 +1596,7 @@ DEFUN __udivmod64
 
 ENDF __udivmod64
 #endif /* L_udivmod64 */
-    
+
 
 #if defined (L_divdi3)
 
@@ -1622,7 +1622,7 @@ DEFUN  __divdi3_moddi3
     brmi    0f
     ;; Both Signs are 0:  the following Complexitiy is not needed
     XJMP    __udivdi3_umoddi3
-#endif /* SPEED_DIV */    
+#endif /* SPEED_DIV */
 
 0:  ;; The Prologue
     ;; Save 12 Registers:  Y, 17...8
@@ -1645,7 +1645,7 @@ DEFUN  __divdi3_moddi3
 #else
     brpl    21f
 #endif /* SPEED_DIV */
-   
+
     XCALL   __negdi2
 
     ;; Adjust Divisor's Sign and SS.7 as needed
@@ -1809,7 +1809,7 @@ ENDF __negdi2
 
 \f
 .section .text.libgcc.prologue, "ax", @progbits
-    
+
 /**********************************
  * This is a prologue subroutine
  **********************************/
@@ -1944,7 +1944,7 @@ _cleanup:
 
 \f
 .section .text.libgcc, "ax", @progbits
-    
+
 #ifdef L_tablejump
 DEFUN __tablejump2__
        lsl     r30
@@ -2146,7 +2146,7 @@ ENDF __do_global_dtors
 #endif /* L_dtors */
 
 .section .text.libgcc, "ax", @progbits
-    
+
 #ifdef L_tablejump_elpm
 DEFUN __tablejump_elpm__
 #if defined (__AVR_HAVE_ELPMX__)
@@ -2484,7 +2484,7 @@ DEFUN __loop_ffsqi2
     brcc __loop_ffsqi2
     mov  r24, r26
     clr  r25
-    ret    
+    ret
 ENDF __loop_ffsqi2
 #endif /* defined (L_loop_ffsqi2) */
 
@@ -2586,7 +2586,7 @@ ENDF __clzhi2
 
 \f
 /**********************************
- * Parity 
+ * Parity
  **********************************/
 
 #if defined (L_paritydi2)
@@ -2702,20 +2702,20 @@ ENDF __popcountdi2
 DEFUN __popcountqi2
     mov  __tmp_reg__, r24
     andi r24, 1
-    lsr  __tmp_reg__    
-    lsr  __tmp_reg__    
+    lsr  __tmp_reg__
+    lsr  __tmp_reg__
     adc  r24, __zero_reg__
-    lsr  __tmp_reg__    
+    lsr  __tmp_reg__
     adc  r24, __zero_reg__
-    lsr  __tmp_reg__    
+    lsr  __tmp_reg__
     adc  r24, __zero_reg__
-    lsr  __tmp_reg__    
+    lsr  __tmp_reg__
     adc  r24, __zero_reg__
-    lsr  __tmp_reg__    
+    lsr  __tmp_reg__
     adc  r24, __zero_reg__
-    lsr  __tmp_reg__    
-    adc  r24, __tmp_reg__    
-    ret    
+    lsr  __tmp_reg__
+    adc  r24, __tmp_reg__
+    ret
 ENDF __popcountqi2
 #endif /* defined (L_popcountqi2) */
 
@@ -2850,10 +2850,10 @@ ENDF __rotldi3
 \f
 .section .text.libgcc.fmul, "ax", @progbits
 
-/***********************************************************/    
+/***********************************************************/
 ;;; Softmul versions of FMUL, FMULS and FMULSU to implement
 ;;; __builtin_avr_fmul* if !AVR_HAVE_MUL
-/***********************************************************/    
+/***********************************************************/
 
 #define A1 24
 #define B1 25