PR gas/2626
authorNick Clifton <nickc@redhat.com>
Thu, 14 Feb 2008 13:04:29 +0000 (13:04 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 14 Feb 2008 13:04:29 +0000 (13:04 +0000)
        * avr.h (AVR_ISA_2xxe): Define.

        * config/tc-avr.c (mcu_types): Change the ISA tyoe of the attiny26
        to AVR_ISA_2xxe.
        (avr_operand): Disallow post-increment addressing in the lpm
        instruction for the attiny26.

gas/ChangeLog
gas/config/tc-avr.c
include/opcode/ChangeLog
include/opcode/avr.h

index cd82737ca0ef54b88f23b4ecf449deed489c3ef6..38ae551a6650937b3a4abebfc1656513ae42beee 100644 (file)
@@ -1,3 +1,11 @@
+2008-02-14  Hakan Ardo  <hakan@debian.org>
+
+       PR gas/2626
+       * config/tc-avr.c (mcu_types): Change the ISA tyoe of the attiny26
+       to AVR_ISA_2xxe.
+       (avr_operand): Disallow post-increment addressing in the lpm
+       instruction for the attiny26.
+
 2008-02-13  Jan Beulich  <jbeulich@novell.com>
 
        * config/tc-i386.c (parse_real_register): Don't return 'FLAT'
index 1e6f7e693de53711ff84c4988ce1e4b430332c59..678160dbd378b8b76d9e199d59089cf2db60f7bb 100644 (file)
@@ -1,6 +1,6 @@
 /* tc-avr.c -- Assembler code for the ATMEL AVR
 
-   Copyright 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007
+   Copyright 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008
    Free Software Foundation, Inc.
    Contributed by Denis Chertykov <denisc@overta.ru>
 
@@ -77,7 +77,7 @@ static struct mcu_type_s mcu_types[] =
   {"at90s2333",  AVR_ISA_2xxx,    bfd_mach_avr2}, /* XXX -> 4433 */
   {"at90s2343",  AVR_ISA_2xxx,    bfd_mach_avr2},
   {"attiny22",   AVR_ISA_2xxx,    bfd_mach_avr2}, /* XXX -> 2343 */
-  {"attiny26",   AVR_ISA_2xxx,    bfd_mach_avr2},
+  {"attiny26",   AVR_ISA_2xxe,    bfd_mach_avr2},
   {"at90s4433",  AVR_ISA_2xxx,    bfd_mach_avr2},
   {"at90s4414",  AVR_ISA_2xxx,    bfd_mach_avr2}, /* XXX -> 8515 */
   {"at90s4434",  AVR_ISA_2xxx,    bfd_mach_avr2}, /* XXX -> 8535 */
@@ -765,6 +765,12 @@ avr_operand (struct avr_opcodes_s *opcode,
          ++str;
          op_mask |= 1;
        }
+
+      /* attiny26 can do "lpm" and "lpm r,Z" but not "lpm r,Z+".  */
+      if (!avr_opt.all_opcodes
+         && (op_mask & 0x0001)
+         && !(avr_mcu->isa & AVR_ISA_MOVW))
+       as_bad (_("postincrement not supported"));
       break;
 
     case 'b':
index 9edf24ce84df62eebca5c278b59d6f509b414058..b5e77b852ada0b57d1c52f392caf56a6f63e18e1 100644 (file)
@@ -1,3 +1,8 @@
+2008-02-14  Hakan Ardo  <hakan@debian.org>
+
+       PR gas/2626
+       * avr.h (AVR_ISA_2xxe): Define.
+
 2008-02-04  Adam Nemet  <anemet@caviumnetworks.com>
 
        * mips.h: Update copyright.
index 7f7ee0c35ab258b94ad27eddd6eaf8d9a7e94c55..8038b4f7f89b3359b9f0a33c15cb28198625dca7 100644 (file)
@@ -1,6 +1,6 @@
 /* Opcode table for the Atmel AVR micro controllers.
 
-   Copyright 2000, 2001, 2004, 2006 Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2004, 2006, 2008 Free Software Foundation, Inc.
    Contributed by Denis Chertykov <denisc@overta.ru>
    
    This program is free software; you can redistribute it and/or modify
@@ -34,6 +34,8 @@
 #define AVR_ISA_TINY1 (AVR_ISA_1200 | AVR_ISA_LPM)
 #define AVR_ISA_PWMx  (AVR_ISA_M8   | AVR_ISA_BRK)
 #define AVR_ISA_2xxx  (AVR_ISA_TINY1 | AVR_ISA_SRAM)
+/* For the attiny26 which is missing LPM Rd,Z+.  */
+#define AVR_ISA_2xxe  (AVR_ISA_2xxx | AVR_ISA_LPMX)
 #define AVR_ISA_RF401 (AVR_ISA_2xxx | AVR_ISA_MOVW | AVR_ISA_LPMX)
 #define AVR_ISA_TINY2 (AVR_ISA_2xxx | AVR_ISA_MOVW | AVR_ISA_LPMX | \
                        AVR_ISA_SPM  | AVR_ISA_BRK)
This page took 0.028119 seconds and 4 git commands to generate.