]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
avr.c (out_set_stack_ptr): Update comment.
authorMarek Michalkiewicz <marekm@linux.org.pl>
Sun, 17 Dec 2000 10:38:37 +0000 (11:38 +0100)
committerDenis Chertykov <denisc@gcc.gnu.org>
Sun, 17 Dec 2000 10:38:37 +0000 (13:38 +0300)
* config/avr/avr.c (out_set_stack_ptr): Update comment.
(print_operand): Add support for %~ and %o.

From-SVN: r38326

gcc/ChangeLog
gcc/config/avr/avr.c

index 3fa0386c243a65c677409710213a231b069bf2cb..f29af44a9704c5723482aed4e59fdc247ff0c1c0 100644 (file)
@@ -1,3 +1,8 @@
+2000-12-12  Marek Michalkiewicz  <marekm@linux.org.pl>
+
+       * config/avr/avr.c (out_set_stack_ptr): Update comment.
+       (print_operand): Add support for %~ and %o.
+
 2000-12-17 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
 
        * c4x.h: Add ASM_OUTPUT_DEF definition for bounded pointer code.
index 3de044030f13f323b54341fde827ab266de00102..2903509f9046bab20a8458ac2a8043be60167de6 100644 (file)
@@ -505,8 +505,8 @@ out_set_stack_ptr (file, before, after)
     }
 
   /* Set/restore the I flag now - interrupts will be really enabled only
-     after the next instruction starts.  This was not clearly documented.
-     XXX - verify this on the new devices with enhanced AVR core.  */
+     after the next instruction.  This is not clearly documented, but
+     believed to be true for all AVR devices.  */
   if (do_save)
     {
       fprintf (file, AS2 (out, __SREG__, __tmp_reg__) CR_TAB);
@@ -1003,10 +1003,15 @@ print_operand (file, x, code)
   if (code >= 'A' && code <= 'D')
     abcd = code - 'A';
 
-  if (REG_P (x))
+  if (code == '~')
+    {
+      if (!AVR_MEGA)
+       fputc ('r', file);
+    }
+  else if (REG_P (x))
     {
       if (x == zero_reg_rtx)
-       fprintf (file,"__zero_reg__");
+       fprintf (file, "__zero_reg__");
       else
        fprintf (file, reg_names[true_regnum (x) + abcd]);
     }
@@ -1022,6 +1027,13 @@ print_operand (file, x, code)
          output_address (addr);
          fprintf (file, ")+%d", abcd);
        }
+      else if (code == 'o')
+       {
+         if (GET_CODE (addr) != PLUS)
+           fatal_insn ("Bad address, not (reg+disp):", addr);
+
+         print_operand (file, XEXP (addr, 1), 0);
+       }
       else if (GET_CODE (addr) == PLUS)
        {
          print_operand_address (file, XEXP (addr,0));