]>
Commit | Line | Data |
---|---|---|
31ce1ede JR |
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' | |
6 | enum options | |
7 | { | |
8 | - OPTION_ALL_OPCODES = OPTION_MD_BASE + 1, | |
9 | + OPTION_MLIST_DEVICES = OPTION_MD_BASE + 1, | |
10 | + OPTION_ALL_OPCODES, | |
11 | OPTION_NO_SKIP_BUG, | |
12 | OPTION_NO_WRAP, | |
13 | OPTION_LINK_RELAX | |
14 | @@ -413,6 +414,7 @@ enum options | |
15 | struct option md_longopts[] = | |
16 | { | |
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")); | |
25 | fprintf (stream, | |
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" | |
34 | )); | |
35 | - show_mcu_list (stream); | |
36 | } | |
37 | ||
38 | static void | |
39 | @@ -577,6 +579,9 @@ md_parse_option (int c, char *arg) | |
40 | avr_mcu->name, mcu_types[i].name); | |
41 | return 1; | |
42 | } | |
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; | |
48 | return 1; |