~ubuntu-branches/ubuntu/edgy/binutils-avr/edgy

« back to all changes in this revision

Viewing changes to debian/patches/newdevices.patch

  • Committer: Bazaar Package Importer
  • Author(s): Hakan Ardo
  • Date: 2005-02-27 11:43:00 UTC
  • mfrom: (0.1.1 upstream) (1.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050227114300-qpt7vi51314mrcmt
Tags: 2.15-3
* Added patch from Theodore A. Roth that adds support for atmega48,
  atmega88, atmega168, attiny13, attiny2313 and at90can128.
* Added patch from Tom Parker <palfrey@tevp.net> that adds --allow-
  dollars switch to as which allows dollars in function names
  (closes: #247346).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -ruN binutils-2.15-old/gas/config/tc-avr.c binutils-2.15/gas/config/tc-avr.c
 
2
--- binutils-2.15/gas/config/tc-avr.c   30 Nov 2002 08:39:43 -0000      1.20
 
3
+++ binutils-2.15/gas/config/tc-avr.c   3 Apr 2004 00:03:09 -0000
 
4
@@ -90,20 +90,26 @@ static struct mcu_type_s mcu_types[] =
 
5
   {"at43usb320",AVR_ISA_M103,     bfd_mach_avr3},
 
6
   {"at43usb355",AVR_ISA_M603,     bfd_mach_avr3},
 
7
   {"at76c711",  AVR_ISA_M603,     bfd_mach_avr3},
 
8
+  {"atmega48",  AVR_ISA_M8,       bfd_mach_avr4},
 
9
   {"atmega8",   AVR_ISA_M8,       bfd_mach_avr4},
 
10
   {"atmega83",  AVR_ISA_M8,       bfd_mach_avr4}, /* XXX -> m8535 */
 
11
   {"atmega85",  AVR_ISA_M8,       bfd_mach_avr4}, /* XXX -> m8 */
 
12
+  {"atmega88",  AVR_ISA_M8,       bfd_mach_avr4},
 
13
   {"atmega8515",AVR_ISA_M8,       bfd_mach_avr4},
 
14
   {"atmega8535",AVR_ISA_M8,       bfd_mach_avr4},
 
15
+  {"attiny13",  AVR_ISA_TINY2,    bfd_mach_avr4},
 
16
+  {"attiny2313",AVR_ISA_TINY2,    bfd_mach_avr4},
 
17
   {"atmega16",  AVR_ISA_M323,     bfd_mach_avr5},
 
18
   {"atmega161", AVR_ISA_M161,     bfd_mach_avr5},
 
19
   {"atmega162", AVR_ISA_M323,     bfd_mach_avr5},
 
20
   {"atmega163", AVR_ISA_M161,     bfd_mach_avr5},
 
21
+  {"atmega168", AVR_ISA_M323,     bfd_mach_avr5},
 
22
   {"atmega169", AVR_ISA_M323,     bfd_mach_avr5},
 
23
   {"atmega32",  AVR_ISA_M323,     bfd_mach_avr5},
 
24
   {"atmega323", AVR_ISA_M323,     bfd_mach_avr5},
 
25
   {"atmega64",  AVR_ISA_M323,     bfd_mach_avr5},
 
26
   {"atmega128", AVR_ISA_M128,     bfd_mach_avr5},
 
27
+  {"at90can128",AVR_ISA_M128,     bfd_mach_avr5},
 
28
   {"at94k",     AVR_ISA_94K,      bfd_mach_avr5},
 
29
   {NULL, 0, 0}
 
30
 };
 
31
@@ -531,7 +537,8 @@ avr_operands (opcode, line)
 
32
       /* Warn if the previous opcode was cpse/sbic/sbis/sbrc/sbrs
 
33
          (AVR core bug, fixed in the newer devices).  */
 
34
 
 
35
-      if (!(avr_opt.no_skip_bug || (avr_mcu->isa & AVR_ISA_MUL))
 
36
+      if (!(avr_opt.no_skip_bug ||
 
37
+            (avr_mcu->isa & (AVR_ISA_MUL | AVR_ISA_MOVW)))
 
38
          && AVR_SKIP_P (prev))
 
39
        as_warn (_("skipping two-word instruction"));
 
40
 
 
41
diff -ruN binutils-2.15-old/include/opcode/avr.h binutils-2.15/include/opcode/avr.h
 
42
--- binutils-2.15-old/include/opcode/avr.h      10 Nov 2001 09:40:53 -0000      1.5
 
43
+++ binutils-2.15/include/opcode/avr.h  3 Apr 2004 00:03:14 -0000
 
44
@@ -23,20 +23,25 @@
 
45
 #define AVR_ISA_SRAM  0x0008 /* device has SRAM (LD, ST, PUSH, POP, ...) */
 
46
 #define AVR_ISA_MEGA  0x0020 /* device has >8K program memory (JMP and CALL
 
47
                                supported, no 8K wrap on RJMP and RCALL) */
 
48
-#define AVR_ISA_MUL   0x0040 /* device has new core (MUL, MOVW, ...) */
 
49
+#define AVR_ISA_MUL   0x0040 /* device has new core (MUL, FMUL, ...) */
 
50
 #define AVR_ISA_ELPM  0x0080 /* device has >64K program memory (ELPM) */
 
51
 #define AVR_ISA_ELPMX 0x0100 /* device has ELPM Rd,Z[+] */
 
52
 #define AVR_ISA_SPM   0x0200 /* device can program itself */
 
53
 #define AVR_ISA_BRK   0x0400 /* device has BREAK (on-chip debug) */
 
54
 #define AVR_ISA_EIND  0x0800 /* device has >128K program memory (none yet) */
 
55
+#define AVR_ISA_MOVW  0x1000 /* device has MOVW */
 
56
 
 
57
 #define AVR_ISA_TINY1 (AVR_ISA_1200 | AVR_ISA_LPM)
 
58
 #define AVR_ISA_2xxx (AVR_ISA_TINY1 | AVR_ISA_SRAM)
 
59
-#define AVR_ISA_M8   (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_SPM)
 
60
+#define AVR_ISA_TINY2 (AVR_ISA_2xxx | AVR_ISA_MOVW | AVR_ISA_LPMX | \
 
61
+                       AVR_ISA_SPM | AVR_ISA_BRK)
 
62
+#define AVR_ISA_M8   (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_MOVW | \
 
63
+                      AVR_ISA_LPMX | AVR_ISA_SPM)
 
64
 #define AVR_ISA_M603 (AVR_ISA_2xxx | AVR_ISA_MEGA)
 
65
 #define AVR_ISA_M103 (AVR_ISA_M603 | AVR_ISA_ELPM)
 
66
-#define AVR_ISA_M161 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX | AVR_ISA_SPM)
 
67
-#define AVR_ISA_94K  (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_LPMX)
 
68
+#define AVR_ISA_M161 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_MOVW | \
 
69
+                      AVR_ISA_LPMX | AVR_ISA_SPM)
 
70
+#define AVR_ISA_94K  (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_MOVW | AVR_ISA_LPMX)
 
71
 #define AVR_ISA_M323 (AVR_ISA_M161 | AVR_ISA_BRK)
 
72
 #define AVR_ISA_M128 (AVR_ISA_M323 | AVR_ISA_ELPM | AVR_ISA_ELPMX)
 
73
 
 
74
@@ -236,7 +241,7 @@ AVR_INSN (ror,  "r",   "1001010rrrrr0111
 
75
 AVR_INSN (swap, "r",   "1001010rrrrr0010", 1, AVR_ISA_1200, 0x9402)
 
76
 
 
77
    /* Known to be decoded as `nop' by the old core.  */
 
78
-AVR_INSN (movw, "v,v", "00000001ddddrrrr", 1, AVR_ISA_MUL,  0x0100)
 
79
+AVR_INSN (movw, "v,v", "00000001ddddrrrr", 1, AVR_ISA_MOVW, 0x0100)
 
80
 AVR_INSN (muls, "d,d", "00000010ddddrrrr", 1, AVR_ISA_MUL,  0x0200)
 
81
 AVR_INSN (mulsu,"a,a", "000000110ddd0rrr", 1, AVR_ISA_MUL,  0x0300)
 
82
 AVR_INSN (fmul, "a,a", "000000110ddd1rrr", 1, AVR_ISA_MUL,  0x0308)