1 diff -Naurp gas/config/tc-avr.c gas/config/tc-avr.c
2 --- gas/config/tc-avr.c 2013-01-02 16:33:12.000000000 +0530
3 +++ gas/config/tc-avr.c 2013-01-02 16:44:28.000000000 +0530
4 @@ -404,7 +404,8 @@ static struct hash_control *avr_mod_hash
5 #define OPTION_MMCU 'm'
8 - OPTION_ALL_OPCODES = OPTION_MD_BASE + 1,
9 + OPTION_MLIST_DEVICES = OPTION_MD_BASE + 1,
14 @@ -413,6 +414,7 @@ enum options
15 struct option md_longopts[] =
17 { "mmcu", required_argument, NULL, OPTION_MMCU },
18 + { "mlist-devices", no_argument, NULL, OPTION_MLIST_DEVICES },
19 { "mall-opcodes", no_argument, NULL, OPTION_ALL_OPCODES },
20 { "mno-skip-bug", no_argument, NULL, OPTION_NO_SKIP_BUG },
21 { "mno-wrap", no_argument, NULL, OPTION_NO_WRAP },
22 @@ -518,14 +520,14 @@ md_show_usage (FILE *stream)
23 " avrtiny - AVR Tiny core\n"
24 " or immediate microcontroller name.\n"));
26 - _(" -mall-opcodes accept all AVR opcodes, even if not supported by MCU\n"
27 + _(" -mlist-devices list all supported devices\n"
28 + " -mall-opcodes accept all AVR opcodes, even if not supported by MCU\n"
29 " -mno-skip-bug disable warnings for skipping two-word instructions\n"
30 " (default for avr4, avr5)\n"
31 " -mno-wrap reject rjmp/rcall instructions with 8K wrap-around\n"
32 " (default for avr3, avr5)\n"
33 " -mlink-relax generate relocations for linker relaxation\n"
35 - show_mcu_list (stream);
39 @@ -577,6 +579,9 @@ md_parse_option (int c, char *arg)
40 avr_mcu->name, mcu_types[i].name);
43 + case OPTION_MLIST_DEVICES:
44 + show_mcu_list(stdout);
45 + exit (EXIT_SUCCESS);
46 case OPTION_ALL_OPCODES:
47 avr_opt.all_opcodes = 1;