Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(611)

Side by Side Diff: include/opcode/avr.h

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/opcode/ChangeLog ('k') | include/opcode/crx.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Opcode table for the Atmel AVR micro controllers. 1 /* Opcode table for the Atmel AVR micro controllers.
2 2
3 Copyright 2000, 2001, 2004, 2006, 2008, 2010 Free Software Foundation, Inc. 3 Copyright 2000, 2001, 2004, 2006, 2008, 2010, 2012 Free Software Foundation, Inc.
4 Contributed by Denis Chertykov <denisc@overta.ru> 4 Contributed by Denis Chertykov <denisc@overta.ru>
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option) 8 the Free Software Foundation; either version 3, or (at your option)
9 any later version. 9 any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
(...skipping 12 matching lines...) Expand all
26 supported, no 8K wrap on RJMP and RCALL) */ 26 supported, no 8K wrap on RJMP and RCALL) */
27 #define AVR_ISA_MUL 0x0040 /* device has new core (MUL, FMUL, ...) */ 27 #define AVR_ISA_MUL 0x0040 /* device has new core (MUL, FMUL, ...) */
28 #define AVR_ISA_ELPM 0x0080 /* device has >64K program memory (ELPM) */ 28 #define AVR_ISA_ELPM 0x0080 /* device has >64K program memory (ELPM) */
29 #define AVR_ISA_ELPMX 0x0100 /* device has ELPM Rd,Z[+] */ 29 #define AVR_ISA_ELPMX 0x0100 /* device has ELPM Rd,Z[+] */
30 #define AVR_ISA_SPM 0x0200 /* device can program itself */ 30 #define AVR_ISA_SPM 0x0200 /* device can program itself */
31 #define AVR_ISA_BRK 0x0400 /* device has BREAK (on-chip debug) */ 31 #define AVR_ISA_BRK 0x0400 /* device has BREAK (on-chip debug) */
32 #define AVR_ISA_EIND 0x0800 /* device has >128K program memory (none yet) */ 32 #define AVR_ISA_EIND 0x0800 /* device has >128K program memory (none yet) */
33 #define AVR_ISA_MOVW 0x1000 /* device has MOVW */ 33 #define AVR_ISA_MOVW 0x1000 /* device has MOVW */
34 #define AVR_ISA_SPMX 0x2000 /* device has SPM Z[+] */ 34 #define AVR_ISA_SPMX 0x2000 /* device has SPM Z[+] */
35 #define AVR_ISA_DES 0x4000 /* device has DES */ 35 #define AVR_ISA_DES 0x4000 /* device has DES */
36 #define AVR_ISA_XCH 0x8000 /* device has XCH, LAC, LAS, LAT */
36 37
37 #define AVR_ISA_TINY1 (AVR_ISA_1200 | AVR_ISA_LPM) 38 #define AVR_ISA_TINY1 (AVR_ISA_1200 | AVR_ISA_LPM)
38 #define AVR_ISA_2xxx (AVR_ISA_TINY1 | AVR_ISA_SRAM) 39 #define AVR_ISA_2xxx (AVR_ISA_TINY1 | AVR_ISA_SRAM)
39 /* For the attiny26 which is missing LPM Rd,Z+. */ 40 /* For the attiny26 which is missing LPM Rd,Z+. */
40 #define AVR_ISA_2xxe (AVR_ISA_2xxx | AVR_ISA_LPMX) 41 #define AVR_ISA_2xxe (AVR_ISA_2xxx | AVR_ISA_LPMX)
41 #define AVR_ISA_RF401 (AVR_ISA_2xxx | AVR_ISA_MOVW | AVR_ISA_LPMX) 42 #define AVR_ISA_RF401 (AVR_ISA_2xxx | AVR_ISA_MOVW | AVR_ISA_LPMX)
42 #define AVR_ISA_TINY2 (AVR_ISA_2xxx | AVR_ISA_MOVW | AVR_ISA_LPMX | \ 43 #define AVR_ISA_TINY2 (AVR_ISA_2xxx | AVR_ISA_MOVW | AVR_ISA_LPMX | \
43 AVR_ISA_SPM | AVR_ISA_BRK) 44 AVR_ISA_SPM | AVR_ISA_BRK)
44 #define AVR_ISA_M603 (AVR_ISA_2xxx | AVR_ISA_MEGA) 45 #define AVR_ISA_M603 (AVR_ISA_2xxx | AVR_ISA_MEGA)
45 #define AVR_ISA_M103 (AVR_ISA_M603 | AVR_ISA_ELPM) 46 #define AVR_ISA_M103 (AVR_ISA_M603 | AVR_ISA_ELPM)
46 #define AVR_ISA_M8 (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_MOVW | \ 47 #define AVR_ISA_M8 (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_MOVW | \
47 AVR_ISA_LPMX | AVR_ISA_SPM) 48 AVR_ISA_LPMX | AVR_ISA_SPM)
48 #define AVR_ISA_PWMx (AVR_ISA_M8 | AVR_ISA_BRK) 49 #define AVR_ISA_PWMx (AVR_ISA_M8 | AVR_ISA_BRK)
49 #define AVR_ISA_M161 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_MOVW | \ 50 #define AVR_ISA_M161 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_MOVW | \
50 AVR_ISA_LPMX | AVR_ISA_SPM) 51 AVR_ISA_LPMX | AVR_ISA_SPM)
51 #define AVR_ISA_94K (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_MOVW | AVR_ISA_LPMX) 52 #define AVR_ISA_94K (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_MOVW | AVR_ISA_LPMX)
52 #define AVR_ISA_M323 (AVR_ISA_M161 | AVR_ISA_BRK) 53 #define AVR_ISA_M323 (AVR_ISA_M161 | AVR_ISA_BRK)
53 #define AVR_ISA_M128 (AVR_ISA_M323 | AVR_ISA_ELPM | AVR_ISA_ELPMX) 54 #define AVR_ISA_M128 (AVR_ISA_M323 | AVR_ISA_ELPM | AVR_ISA_ELPMX)
54 #define AVR_ISA_M256 (AVR_ISA_M128 | AVR_ISA_EIND) 55 #define AVR_ISA_M256 (AVR_ISA_M128 | AVR_ISA_EIND)
55 #define AVR_ISA_XMEGA (AVR_ISA_M256 | AVR_ISA_SPMX | AVR_ISA_DES) 56 #define AVR_ISA_XMEGA (AVR_ISA_M256 | AVR_ISA_SPMX | AVR_ISA_DES | AVR_ISA_XCH)
56 57
57 #define AVR_ISA_AVR1 AVR_ISA_TINY1 58 #define AVR_ISA_AVR1 AVR_ISA_TINY1
58 #define AVR_ISA_AVR2 AVR_ISA_2xxx 59 #define AVR_ISA_AVR2 AVR_ISA_2xxx
59 #define AVR_ISA_AVR25 AVR_ISA_TINY2 60 #define AVR_ISA_AVR25 AVR_ISA_TINY2
60 #define AVR_ISA_AVR3 AVR_ISA_M603 61 #define AVR_ISA_AVR3 AVR_ISA_M603
61 #define AVR_ISA_AVR31 AVR_ISA_M103 62 #define AVR_ISA_AVR31 AVR_ISA_M103
62 #define AVR_ISA_AVR35 (AVR_ISA_AVR3 | AVR_ISA_MOVW | \ 63 #define AVR_ISA_AVR35 (AVR_ISA_AVR3 | AVR_ISA_MOVW | \
63 AVR_ISA_LPMX | AVR_ISA_SPM | AVR_ISA_BRK) 64 AVR_ISA_LPMX | AVR_ISA_SPM | AVR_ISA_BRK)
64 #define AVR_ISA_AVR3_ALL (AVR_ISA_AVR3 | AVR_ISA_AVR31 | AVR_ISA_AVR35) 65 #define AVR_ISA_AVR3_ALL (AVR_ISA_AVR3 | AVR_ISA_AVR31 | AVR_ISA_AVR35)
65 #define AVR_ISA_AVR4 AVR_ISA_PWMx 66 #define AVR_ISA_AVR4 AVR_ISA_PWMx
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 118
118 Order is important - some binary opcodes have more than one name, 119 Order is important - some binary opcodes have more than one name,
119 the disassembler will only see the first match. 120 the disassembler will only see the first match.
120 121
121 Remaining undefined opcodes (1699 total - some of them might work 122 Remaining undefined opcodes (1699 total - some of them might work
122 as normal instructions if not all of the bits are decoded): 123 as normal instructions if not all of the bits are decoded):
123 124
124 0x0001...0x00ff (255) (known to be decoded as `nop' by the old core) 125 0x0001...0x00ff (255) (known to be decoded as `nop' by the old core)
125 "100100xxxxxxx011" (128) 0x9[0-3][0-9a-f][3b] 126 "100100xxxxxxx011" (128) 0x9[0-3][0-9a-f][3b]
126 "100100xxxxxx1000" (64) 0x9[0-3][0-9a-f]8 127 "100100xxxxxx1000" (64) 0x9[0-3][0-9a-f]8
127 "1001001xxxxx01xx" (128) 0x9[23][0-9a-f][4-7]
128 "1001010xxxxx0100" (32) 0x9[45][0-9a-f]4 128 "1001010xxxxx0100" (32) 0x9[45][0-9a-f]4
129 "1001010x001x1001" (4) 0x9[45][23]9 129 "1001010x001x1001" (4) 0x9[45][23]9
130 "1001010x01xx1001" (8) 0x9[45][4-7]9 130 "1001010x01xx1001" (8) 0x9[45][4-7]9
131 "1001010x1xxx1001" (16) 0x9[45][8-9a-f]9 131 "1001010x1xxx1001" (16) 0x9[45][8-9a-f]9
132 "1001010xxxxx1011" (32) 0x9[45][0-9a-f]b 132 "1001010xxxxx1011" (32) 0x9[45][0-9a-f]b
133 "10010101001x1000" (2) 0x95[23]8 133 "10010101001x1000" (2) 0x95[23]8
134 "1001010101xx1000" (4) 0x95[4-7]8 134 "1001010101xx1000" (4) 0x95[4-7]8
135 "1001010110111000" (1) 0x95b8 135 "1001010110111000" (1) 0x95b8
136 "1001010111111000" (1) 0x95f8 (`espm' removed in databook update) 136 "1001010111111000" (1) 0x95f8 (`espm' removed in databook update)
137 "11111xxxxxxx1xxx" (1024) 0xf[8-9a-f][0-9a-f][8-9a-f] 137 "11111xxxxxxx1xxx" (1024) 0xf[8-9a-f][0-9a-f][8-9a-f]
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 AVR_INSN (com, "r", "1001010rrrrr0000", 1, AVR_ISA_1200, 0x9400) 258 AVR_INSN (com, "r", "1001010rrrrr0000", 1, AVR_ISA_1200, 0x9400)
259 AVR_INSN (dec, "r", "1001010rrrrr1010", 1, AVR_ISA_1200, 0x940a) 259 AVR_INSN (dec, "r", "1001010rrrrr1010", 1, AVR_ISA_1200, 0x940a)
260 AVR_INSN (inc, "r", "1001010rrrrr0011", 1, AVR_ISA_1200, 0x9403) 260 AVR_INSN (inc, "r", "1001010rrrrr0011", 1, AVR_ISA_1200, 0x9403)
261 AVR_INSN (lsr, "r", "1001010rrrrr0110", 1, AVR_ISA_1200, 0x9406) 261 AVR_INSN (lsr, "r", "1001010rrrrr0110", 1, AVR_ISA_1200, 0x9406)
262 AVR_INSN (neg, "r", "1001010rrrrr0001", 1, AVR_ISA_1200, 0x9401) 262 AVR_INSN (neg, "r", "1001010rrrrr0001", 1, AVR_ISA_1200, 0x9401)
263 AVR_INSN (pop, "r", "1001000rrrrr1111", 1, AVR_ISA_2xxx, 0x900f) 263 AVR_INSN (pop, "r", "1001000rrrrr1111", 1, AVR_ISA_2xxx, 0x900f)
264 AVR_INSN (push, "r", "1001001rrrrr1111", 1, AVR_ISA_2xxx, 0x920f) 264 AVR_INSN (push, "r", "1001001rrrrr1111", 1, AVR_ISA_2xxx, 0x920f)
265 AVR_INSN (ror, "r", "1001010rrrrr0111", 1, AVR_ISA_1200, 0x9407) 265 AVR_INSN (ror, "r", "1001010rrrrr0111", 1, AVR_ISA_1200, 0x9407)
266 AVR_INSN (swap, "r", "1001010rrrrr0010", 1, AVR_ISA_1200, 0x9402) 266 AVR_INSN (swap, "r", "1001010rrrrr0010", 1, AVR_ISA_1200, 0x9402)
267 267
268 /* Atomic memory operations for XMEGA. List before `sts'. */
269 AVR_INSN (xch, "z,r", "1001001rrrrr0100", 1, AVR_ISA_XCH, 0x9204)
270 AVR_INSN (las, "z,r", "1001001rrrrr0101", 1, AVR_ISA_XCH, 0x9205)
271 AVR_INSN (lac, "z,r", "1001001rrrrr0110", 1, AVR_ISA_XCH, 0x9206)
272 AVR_INSN (lat, "z,r", "1001001rrrrr0111", 1, AVR_ISA_XCH, 0x9207)
273
268 /* Known to be decoded as `nop' by the old core. */ 274 /* Known to be decoded as `nop' by the old core. */
269 AVR_INSN (movw, "v,v", "00000001ddddrrrr", 1, AVR_ISA_MOVW, 0x0100) 275 AVR_INSN (movw, "v,v", "00000001ddddrrrr", 1, AVR_ISA_MOVW, 0x0100)
270 AVR_INSN (muls, "d,d", "00000010ddddrrrr", 1, AVR_ISA_MUL, 0x0200) 276 AVR_INSN (muls, "d,d", "00000010ddddrrrr", 1, AVR_ISA_MUL, 0x0200)
271 AVR_INSN (mulsu,"a,a", "000000110ddd0rrr", 1, AVR_ISA_MUL, 0x0300) 277 AVR_INSN (mulsu,"a,a", "000000110ddd0rrr", 1, AVR_ISA_MUL, 0x0300)
272 AVR_INSN (fmul, "a,a", "000000110ddd1rrr", 1, AVR_ISA_MUL, 0x0308) 278 AVR_INSN (fmul, "a,a", "000000110ddd1rrr", 1, AVR_ISA_MUL, 0x0308)
273 AVR_INSN (fmuls,"a,a", "000000111ddd0rrr", 1, AVR_ISA_MUL, 0x0380) 279 AVR_INSN (fmuls,"a,a", "000000111ddd0rrr", 1, AVR_ISA_MUL, 0x0380)
274 AVR_INSN (fmulsu,"a,a","000000111ddd1rrr", 1, AVR_ISA_MUL, 0x0388) 280 AVR_INSN (fmulsu,"a,a","000000111ddd1rrr", 1, AVR_ISA_MUL, 0x0388)
275 281
276 AVR_INSN (sts, "i,r", "1001001ddddd0000", 2, AVR_ISA_2xxx, 0x9200) 282 AVR_INSN (sts, "i,r", "1001001ddddd0000", 2, AVR_ISA_2xxx, 0x9200)
277 AVR_INSN (lds, "r,i", "1001000ddddd0000", 2, AVR_ISA_2xxx, 0x9000) 283 AVR_INSN (lds, "r,i", "1001000ddddd0000", 2, AVR_ISA_2xxx, 0x9000)
278 284
279 /* Special case for b+0, `e' must be next entry after `b', 285 /* Special case for b+0, `e' must be next entry after `b',
280 b={Y=1,Z=0}, ee={X=11,Y=10,Z=00}, !=1 if -e or e+ or X. */ 286 b={Y=1,Z=0}, ee={X=11,Y=10,Z=00}, !=1 if -e or e+ or X. */
281 AVR_INSN (ldd, "r,b", "10o0oo0dddddbooo", 1, AVR_ISA_2xxx, 0x8000) 287 AVR_INSN (ldd, "r,b", "10o0oo0dddddbooo", 1, AVR_ISA_2xxx, 0x8000)
282 AVR_INSN (ld, "r,e", "100!000dddddee-+", 1, AVR_ISA_1200, 0x8000) 288 AVR_INSN (ld, "r,e", "100!000dddddee-+", 1, AVR_ISA_1200, 0x8000)
283 AVR_INSN (std, "b,r", "10o0oo1rrrrrbooo", 1, AVR_ISA_2xxx, 0x8200) 289 AVR_INSN (std, "b,r", "10o0oo1rrrrrbooo", 1, AVR_ISA_2xxx, 0x8200)
284 AVR_INSN (st, "e,r", "100!001rrrrree-+", 1, AVR_ISA_1200, 0x8200) 290 AVR_INSN (st, "e,r", "100!001rrrrree-+", 1, AVR_ISA_1200, 0x8200)
285 291
286 /* These are for devices that don't exist yet 292 /* These are for devices that don't exist yet
287 (>128K program memory, PC = EIND:Z). */ 293 (>128K program memory, PC = EIND:Z). */
288 AVR_INSN (eicall, "", "1001010100011001", 1, AVR_ISA_EIND, 0x9519) 294 AVR_INSN (eicall, "", "1001010100011001", 1, AVR_ISA_EIND, 0x9519)
289 AVR_INSN (eijmp, "", "1001010000011001", 1, AVR_ISA_EIND, 0x9419) 295 AVR_INSN (eijmp, "", "1001010000011001", 1, AVR_ISA_EIND, 0x9419)
290 296
291 /* DES instruction for encryption and decryption */ 297 /* DES instruction for encryption and decryption */
292 AVR_INSN (des, "E", "10010100EEEE1011", 1, AVR_ISA_DES, 0x940B) 298 AVR_INSN (des, "E", "10010100EEEE1011", 1, AVR_ISA_DES, 0x940B)
293 299
OLDNEW
« no previous file with comments | « include/opcode/ChangeLog ('k') | include/opcode/crx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698