diff options
Diffstat (limited to 'gcc/config/avr')
-rw-r--r-- | gcc/config/avr/avr-c.c | 6 | ||||
-rw-r--r-- | gcc/config/avr/avr.c | 111 | ||||
-rw-r--r-- | gcc/config/avr/avr.h | 32 | ||||
-rw-r--r-- | gcc/config/avr/avr.opt | 4 | ||||
-rw-r--r-- | gcc/config/avr/driver-avr.c | 21 | ||||
-rw-r--r-- | gcc/config/avr/genmultilib.awk | 119 | ||||
-rw-r--r-- | gcc/config/avr/multilib.h | 70 | ||||
-rw-r--r-- | gcc/config/avr/t-avr | 6 | ||||
-rw-r--r-- | gcc/config/avr/t-multilib | 54 |
9 files changed, 157 insertions, 266 deletions
diff --git a/gcc/config/avr/avr-c.c b/gcc/config/avr/avr-c.c index 1babb5372c2..d689fa02380 100644 --- a/gcc/config/avr/avr-c.c +++ b/gcc/config/avr/avr-c.c @@ -128,6 +128,12 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile) else cpp_define (pfile, "__AVR_HAVE_16BIT_SP__"); + if (avr_sp8) + cpp_define (pfile, "__AVR_SP8__"); + + if (AVR_HAVE_SPH) + cpp_define (pfile, "__AVR_HAVE_SPH__"); + if (TARGET_NO_INTERRUPTS) cpp_define (pfile, "__NO_INTERRUPTS__"); diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 341fe9b2f85..c25f8983a79 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -963,7 +963,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT size, HARD_REG_SET set) { /* Don't error so that insane code from newlib still compiles and does not break building newlib. As PR51345 is implemented - now, there are multilib variants with -mtiny-stack. + now, there are multilib variants with -msp8. If user wants sanity checks he can use -Wstack-usage= or similar options. @@ -2774,7 +2774,7 @@ output_movhi (rtx insn, rtx xop[], int *plen) } else if (test_hard_reg_class (STACK_REG, src)) { - return AVR_HAVE_8BIT_SP + return !AVR_HAVE_SPH ? avr_asm_len ("in %A0,__SP_L__" CR_TAB "clr %B0", xop, plen, -2) @@ -7341,7 +7341,7 @@ avr_file_start (void) /* Print I/O addresses of some SFRs used with IN and OUT. */ - if (!AVR_HAVE_8BIT_SP) + if (AVR_HAVE_SPH) fprintf (asm_out_file, "__SP_H__ = 0x%02x\n", avr_addr.sp_h - sfr_offset); fprintf (asm_out_file, "__SP_L__ = 0x%02x\n", avr_addr.sp_l - sfr_offset); @@ -10285,6 +10285,42 @@ enum avr_builtin_id AVR_BUILTIN_COUNT }; +struct GTY(()) avr_builtin_description +{ + enum insn_code icode; + const char *name; + int n_args; + tree fndecl; +}; + + +/* Notice that avr_bdesc[] and avr_builtin_id are initialized in such a way + that a built-in's ID can be used to access the built-in by means of + avr_bdesc[ID] */ + +static GTY(()) struct avr_builtin_description +avr_bdesc[AVR_BUILTIN_COUNT] = + { + +#define DEF_BUILTIN(NAME, N_ARGS, ID, TYPE, ICODE) \ + { ICODE, NAME, N_ARGS, NULL_TREE }, +#include "builtins.def" +#undef DEF_BUILTIN + }; + + +/* Implement `TARGET_BUILTIN_DECL'. */ + +static tree +avr_builtin_decl (unsigned id, bool initialize_p ATTRIBUTE_UNUSED) +{ + if (id < AVR_BUILTIN_COUNT) + return avr_bdesc[id].fndecl; + + return error_mark_node; +} + + static void avr_init_builtin_int24 (void) { @@ -10295,6 +10331,7 @@ avr_init_builtin_int24 (void) (*lang_hooks.types.register_builtin_type) (uint24_type, "__uint24"); } + /* Implement `TARGET_INIT_BUILTINS' */ /* Set up all builtin functions for this target. */ @@ -10348,7 +10385,9 @@ avr_init_builtins (void) NULL); #define DEF_BUILTIN(NAME, N_ARGS, ID, TYPE, CODE) \ - add_builtin_function (NAME, TYPE, ID, BUILT_IN_MD, NULL, NULL_TREE); + gcc_assert (ID < AVR_BUILTIN_COUNT); \ + avr_bdesc[ID].fndecl \ + = add_builtin_function (NAME, TYPE, ID, BUILT_IN_MD, NULL, NULL_TREE); #include "builtins.def" #undef DEF_BUILTIN @@ -10356,27 +10395,6 @@ avr_init_builtins (void) } -struct avr_builtin_description -{ - enum insn_code icode; - const char *name; - enum avr_builtin_id id; - int n_args; -}; - -static const struct avr_builtin_description -avr_bdesc[] = - { - -#define DEF_BUILTIN(NAME, N_ARGS, ID, TYPE, ICODE) \ - { ICODE, NAME, ID, N_ARGS }, -#include "builtins.def" -#undef DEF_BUILTIN - - { CODE_FOR_nothing, NULL, 0, -1 } - }; - - /* Subroutine of avr_expand_builtin to take care of unop insns. */ static rtx @@ -10545,6 +10563,7 @@ avr_expand_triop_builtin (enum insn_code icode, tree exp, rtx target) } +/* Implement `TARGET_EXPAND_BUILTIN'. */ /* Expand an expression EXP that calls a built-in function, with result going to TARGET if that's convenient (and in mode MODE if that's convenient). @@ -10557,13 +10576,15 @@ avr_expand_builtin (tree exp, rtx target, enum machine_mode mode ATTRIBUTE_UNUSED, int ignore ATTRIBUTE_UNUSED) { - size_t i; tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0); const char* bname = IDENTIFIER_POINTER (DECL_NAME (fndecl)); unsigned int id = DECL_FUNCTION_CODE (fndecl); + const struct avr_builtin_description *d = &avr_bdesc[id]; tree arg0; rtx op0; + gcc_assert (id < AVR_BUILTIN_COUNT); + switch (id) { case AVR_BUILTIN_NOP: @@ -10597,29 +10618,22 @@ avr_expand_builtin (tree exp, rtx target, } } - for (i = 0; avr_bdesc[i].name; i++) + /* No special treatment needed: vanilla expand. */ + + switch (d->n_args) { - const struct avr_builtin_description *d = &avr_bdesc[i]; + case 0: + emit_insn ((GEN_FCN (d->icode)) (target)); + return 0; - if (d->id == id) - switch (d->n_args) - { - case 0: - emit_insn ((GEN_FCN (d->icode)) (target)); - return 0; - - case 1: - return avr_expand_unop_builtin (d->icode, exp, target); - - case 2: - return avr_expand_binop_builtin (d->icode, exp, target); - - case 3: - return avr_expand_triop_builtin (d->icode, exp, target); - - default: - gcc_unreachable(); - } + case 1: + return avr_expand_unop_builtin (d->icode, exp, target); + + case 2: + return avr_expand_binop_builtin (d->icode, exp, target); + + case 3: + return avr_expand_triop_builtin (d->icode, exp, target); } gcc_unreachable (); @@ -10878,6 +10892,9 @@ avr_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED, tree *arg, #undef TARGET_INIT_BUILTINS #define TARGET_INIT_BUILTINS avr_init_builtins +#undef TARGET_BUILTIN_DECL +#define TARGET_BUILTIN_DECL avr_builtin_decl + #undef TARGET_EXPAND_BUILTIN #define TARGET_EXPAND_BUILTIN avr_expand_builtin diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index 8488e15dcad..bd5241c9fad 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -188,7 +188,26 @@ enum #define AVR_HAVE_RAMPZ (avr_current_arch->have_elpm \ || avr_current_arch->have_rampd) #define AVR_HAVE_EIJMP_EICALL (avr_current_arch->have_eijmp_eicall) -#define AVR_HAVE_8BIT_SP (avr_current_device->short_sp || TARGET_TINY_STACK) + +/* Handling of 8-bit SP versus 16-bit SP is as follows: + + -msp8 is used internally to select the right multilib for targets with + 8-bit SP. -msp8 is set automatically by DRIVER_SELF_SPECS for devices + with 8-bit SP or by multilib generation machinery. If a frame pointer is + needed and SP is only 8 bits wide, SP is zero-extended to get FP. + + TARGET_TINY_STACK is triggered by -mtiny-stack which is a user option. + This option has no effect on multilib selection. It serves to save some + bytes on 16-bit SP devices by only changing SP_L and leaving SP_H alone. + + These two properties are reflected by built-in macros __AVR_SP8__ resp. + __AVR_HAVE_8BIT_SP__ and __AVR_HAVE_16BIT_SP__. During multilib generation + there is always __AVR_SP8__ == __AVR_HAVE_8BIT_SP__. */ + +#define AVR_HAVE_8BIT_SP \ + (avr_current_device->short_sp || TARGET_TINY_STACK || avr_sp8) + +#define AVR_HAVE_SPH (!avr_sp8) #define AVR_2_BYTE_PC (!AVR_HAVE_EIJMP_EICALL) #define AVR_3_BYTE_PC (AVR_HAVE_EIJMP_EICALL) @@ -577,13 +596,16 @@ extern const char *avr_device_to_arch (int argc, const char **argv); extern const char *avr_device_to_data_start (int argc, const char **argv); extern const char *avr_device_to_startfiles (int argc, const char **argv); extern const char *avr_device_to_devicelib (int argc, const char **argv); +extern const char *avr_device_to_sp8 (int argc, const char **argv); -#define EXTRA_SPEC_FUNCTIONS \ - { "device_to_arch", avr_device_to_arch }, \ +#define EXTRA_SPEC_FUNCTIONS \ + { "device_to_arch", avr_device_to_arch }, \ { "device_to_data_start", avr_device_to_data_start }, \ - { "device_to_startfile", avr_device_to_startfiles }, \ - { "device_to_devicelib", avr_device_to_devicelib }, + { "device_to_startfile", avr_device_to_startfiles }, \ + { "device_to_devicelib", avr_device_to_devicelib }, \ + { "device_to_sp8", avr_device_to_sp8 }, +#define DRIVER_SELF_SPECS " %:device_to_sp8(%{mmcu=*:%*}) " #define CPP_SPEC "" #define CC1_SPEC "" diff --git a/gcc/config/avr/avr.opt b/gcc/config/avr/avr.opt index d6e73ee0914..d4d6b7826d8 100644 --- a/gcc/config/avr/avr.opt +++ b/gcc/config/avr/avr.opt @@ -73,3 +73,7 @@ Accumulate outgoing function arguments and acquire/release the needed stack spac mstrict-X Target Report Var(avr_strict_X) Init(0) When accessing RAM, use X as imposed by the hardware, i.e. just use pre-decrement, post-increment and indirect addressing with the X register. Without this option, the compiler may assume that there is an addressing mode X+const similar to Y+const and Z+const and emit instructions to emulate such an addressing mode for X. + +;; For rationale behind -msp8 see explanation in avr.h. +msp8 +Target Report RejectNegative Undocumented Var(avr_sp8) Init(0) diff --git a/gcc/config/avr/driver-avr.c b/gcc/config/avr/driver-avr.c index 6ab0bb822ef..26c21412c3f 100644 --- a/gcc/config/avr/driver-avr.c +++ b/gcc/config/avr/driver-avr.c @@ -112,3 +112,24 @@ avr_device_to_devicelib (int argc, const char **argv) return concat ("-l", avr_current_device->library_name, NULL); } +const char* +avr_device_to_sp8 (int argc, const char **argv) +{ + if (0 == argc) + return NULL; + + avr_set_current_device (argv[0]); + + /* Leave "avr2" and "avr25" alone. These two architectures are + the only ones that mix devices with 8-bit SP and 16-bit SP. + -msp8 is set by mmultilib machinery. */ + + if (avr_current_device->macro == NULL + && (avr_current_device->arch == ARCH_AVR2 + || avr_current_device->arch == ARCH_AVR25)) + return ""; + + return avr_current_device->short_sp + ? "-msp8" + : "%<msp8"; +} diff --git a/gcc/config/avr/genmultilib.awk b/gcc/config/avr/genmultilib.awk index 7bc3b4af225..0aab49a407f 100644 --- a/gcc/config/avr/genmultilib.awk +++ b/gcc/config/avr/genmultilib.awk @@ -26,9 +26,6 @@ # FORMAT = "Makefile": Generate Makefile Snipet that sets some # MULTILIB_* Variables as needed. # -# FORMAT = "multilib.h": Generate C Header intended to override -# (parts of) multilib.h used in gcc.c. -# ################################################################## BEGIN { @@ -41,7 +38,7 @@ BEGIN { mtiny[0] = "" mtiny[1] = "tiny-stack" - option["tiny-stack"] = "mtiny-stack" + option["tiny-stack"] = "msp8" } ################################################################## @@ -54,18 +51,6 @@ BEGIN { next else if (comment == 1) { - if (FORMAT == "multilib.h") - { - print "/*" - print " Auto-generated C header" - print " Generated by : ./gcc/config/avr/genmultilib.awk" - print " Generated from : ./gcc/config/avr/avr-mcus.def" - print " Used by : ./gcc/gcc.c via tm.h" - print " Purpose : Override multilib_raw[] from multilib.h" - print "*/" - print "/*" - } - if (FORMAT == "Makefile") { print "# Auto-generated Makefile Snip" @@ -78,15 +63,12 @@ BEGIN { comment = 2; - if (FORMAT == "multilib.h") - gsub ("#", " ") - print } /^$/ { - if (comment && FORMAT == "multilib.h") - print "*/" + # The first empty line stops copy-pasting the GPL comments + # from this file to the generated file. comment = 0 } @@ -144,7 +126,6 @@ BEGIN { # m_dirnames <-> MULTILIB_DIRNAMES " # m_exceptions <-> MULTILIB_EXCEPTIONS " # m_matches <-> MULTILIB_MATCHES " -# m_raw <-> avr_multilib_raw multilib.h # ################################################################## @@ -154,11 +135,9 @@ END { m_exceptions = "\nMULTILIB_EXCEPTIONS =" m_matches = "\nMULTILIB_MATCHES =" - m_raw = "" - ############################################################## # Compose MULTILIB_OPTIONS. This represents the Cross-Product - # (avr2, avr25, ...) x mtiny-stack + # (avr2, avr25, ...) x msp8 sep = "" for (c = 0; c < n_cores; c++) @@ -167,54 +146,25 @@ END { sep = "/" } - # The ... x mtiny-stack + # The ... x msp8 m_options = m_options " " option[mtiny[1]] ############################################################## # Map Device to its multilib - # All Mappings that cannot be represented by GCC's genmultilib - # Machinery must be handcrafted. - - dot_excludes = "" - m_raw_sp8 = "" - for (t = 0; t < n_mcu; t++) { core = toCore[mcu[t]] - if (tiny_stack[mcu[t]] == 1) - { - if (core == "avr2") - dir = mtiny[1] - else - dir = core "/" mtiny[1] - - m_raw_sp8 = m_raw_sp8 " \"" dir " " option[mcu[t]] ";\",\n" - dot_excludes = dot_excludes " !" option[mcu[t]] - - line = option[mcu[t]] ":" option[mcu[t]] - gsub ("=", "?", line) - gsub (":", "=", line) - - m_matches = m_matches " \\\n\t" line - } + line = option[core] ":" option[mcu[t]] + gsub ("=", "?", line) + gsub (":", "=", line) - # The SP = 16 Devices are vanilla: Do the same as - # MULTILIB_MATCHES would yield. Don't list avr2 (default) - - if (core != "avr2") - { - line = option[core] ":" option[mcu[t]] - gsub ("=", "?", line) - gsub (":", "=", line) - - m_matches = m_matches " \\\n\t" line - } + m_matches = m_matches " \\\n\t" line } #################################################################### - # Compose MULTILIB_DIRNAMES, MULTILIB_EXEPTIONS and avr_multilib_raw + # Compose MULTILIB_DIRNAMES and MULTILIB_EXEPTIONS n_mtiny = 2 for (t = 0; t < n_mtiny; t++) @@ -248,38 +198,6 @@ END { if (core != "avr2" || mtiny[t] == "") m_dirnames = m_dirnames " " mdir - - # Remainder deals with avr_multilib_raw Entries. - # Each Entry looks like - # "multilib-dir option-to-match !option-to-avoid-match;" - # for Example: - # "avr25/tiny-stack !mmcu=avr2 mmcu=avr25 !mmcu=avr3 ... mtiny-stack;" - - if (mdir == "") - mdir = "." - - line = mdir - - for (s = 0; s < n_cores; s++) - { - if (cores[s] == core) - line = line " " option[cores[s]] - else - line = line " !" option[cores[s]] - } - - if (tiny_stack[core] != 0) - { - if (mtiny[t] == "") - line = line " !" option[mtiny[1]] - else - line = line " " option[mtiny[1]] - } - - if (mdir == ".") - line = line dot_excludes - - m_raw = m_raw " \"" line ";\",\n" } ############################################################ @@ -295,21 +213,4 @@ END { print m_exceptions print m_matches } - - if (FORMAT == "multilib.h") - { - # Intended Target: ./gcc/config/avr/multilib.h - - print "#if defined NULL && !defined AVR_MULTILIB_H" - print "#define AVR_MULTILIB_H" - - print "static const char* const avr_multilib_raw[] = {" - print m_raw_sp8 - print m_raw - print " NULL\n};" - - print "#undef multilib_raw" - print "#define multilib_raw avr_multilib_raw" - print "#endif /* AVR_MULTILIB_H */" - } } diff --git a/gcc/config/avr/multilib.h b/gcc/config/avr/multilib.h deleted file mode 100644 index 582c6dae6f7..00000000000 --- a/gcc/config/avr/multilib.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - Auto-generated C header - Generated by : ./gcc/config/avr/genmultilib.awk - Generated from : ./gcc/config/avr/avr-mcus.def - Used by : ./gcc/gcc.c via tm.h - Purpose : Override multilib_raw[] from multilib.h -*/ -/* - Copyright (C) 2011 Free Software Foundation, Inc. - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License as published by the Free - Software Foundation; either version 3, or (at your option) any later - version. - - GCC is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - <http://www.gnu.org/licenses/>. -*/ -#if defined NULL && !defined AVR_MULTILIB_H -#define AVR_MULTILIB_H -static const char* const avr_multilib_raw[] = { - "tiny-stack mmcu=at90s2313;", - "tiny-stack mmcu=at90s2323;", - "tiny-stack mmcu=at90s2333;", - "tiny-stack mmcu=at90s2343;", - "tiny-stack mmcu=attiny22;", - "tiny-stack mmcu=attiny26;", - "tiny-stack mmcu=at90s4433;", - "avr25/tiny-stack mmcu=attiny13;", - "avr25/tiny-stack mmcu=attiny13a;", - "avr25/tiny-stack mmcu=attiny2313;", - "avr25/tiny-stack mmcu=attiny2313a;", - "avr25/tiny-stack mmcu=attiny24;", - "avr25/tiny-stack mmcu=attiny24a;", - "avr25/tiny-stack mmcu=attiny25;", - "avr25/tiny-stack mmcu=attiny261;", - "avr25/tiny-stack mmcu=attiny261a;", - - ". !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7 !mtiny-stack !mmcu=at90s2313 !mmcu=at90s2323 !mmcu=at90s2333 !mmcu=at90s2343 !mmcu=attiny22 !mmcu=attiny26 !mmcu=at90s4433 !mmcu=attiny13 !mmcu=attiny13a !mmcu=attiny2313 !mmcu=attiny2313a !mmcu=attiny24 !mmcu=attiny24a !mmcu=attiny25 !mmcu=attiny261 !mmcu=attiny261a;", - "avr2 mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7 !mtiny-stack;", - "avr25 !mmcu=avr2 mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7 !mtiny-stack;", - "avr3 !mmcu=avr2 !mmcu=avr25 mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7;", - "avr31 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7;", - "avr35 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7;", - "avr4 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7;", - "avr5 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7;", - "avr51 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7;", - "avr6 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7;", - "avrxmega2 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7;", - "avrxmega4 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7;", - "avrxmega5 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7;", - "avrxmega6 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 mmcu=avrxmega6 !mmcu=avrxmega7;", - "avrxmega7 !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 mmcu=avrxmega7;", - "tiny-stack !mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7 mtiny-stack;", - "avr2/tiny-stack mmcu=avr2 !mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7 mtiny-stack;", - "avr25/tiny-stack !mmcu=avr2 mmcu=avr25 !mmcu=avr3 !mmcu=avr31 !mmcu=avr35 !mmcu=avr4 !mmcu=avr5 !mmcu=avr51 !mmcu=avr6 !mmcu=avrxmega2 !mmcu=avrxmega4 !mmcu=avrxmega5 !mmcu=avrxmega6 !mmcu=avrxmega7 mtiny-stack;", - - NULL -}; -#undef multilib_raw -#define multilib_raw avr_multilib_raw -#endif /* AVR_MULTILIB_H */ diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr index e6b4adee182..99638333204 100644 --- a/gcc/config/avr/t-avr +++ b/gcc/config/avr/t-avr @@ -49,16 +49,10 @@ $(srcdir)/config/avr/avr-tables.opt: $(srcdir)/config/avr/genopt.sh $(AVR_MCUS) # MULTILIB_MATCHES $(srcdir)/config/avr/t-multilib: s-avr-mlib; @true -# Override multilib_raw[] from multilib.h -$(srcdir)/config/avr/multilib.h: s-avr-mlib; @true - s-mlib: $(srcdir)/config/avr/t-multilib s-avr-mlib: $(srcdir)/config/avr/genmultilib.awk $(AVR_MCUS) $(AWK) -f $< -v FORMAT=Makefile $< $(AVR_MCUS) > tmp-avr-mlib - $(AWK) -f $< -v FORMAT=multilib.h $< $(AVR_MCUS) > tmp-avr-mlib.h - $(SHELL) $(srcdir)/../move-if-change \ - tmp-avr-mlib.h $(srcdir)/config/avr/multilib.h $(SHELL) $(srcdir)/../move-if-change \ tmp-avr-mlib $(srcdir)/config/avr/t-multilib $(STAMP) $@ diff --git a/gcc/config/avr/t-multilib b/gcc/config/avr/t-multilib index 886d5507c5c..497f63b4ea8 100644 --- a/gcc/config/avr/t-multilib +++ b/gcc/config/avr/t-multilib @@ -21,57 +21,53 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr31/mmcu=avr35/mmcu=avr4/mmcu=avr5/mmcu=avr51/mmcu=avr6/mmcu=avrxmega2/mmcu=avrxmega4/mmcu=avrxmega5/mmcu=avrxmega6/mmcu=avrxmega7 mtiny-stack +MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr31/mmcu=avr35/mmcu=avr4/mmcu=avr5/mmcu=avr51/mmcu=avr6/mmcu=avrxmega2/mmcu=avrxmega4/mmcu=avrxmega5/mmcu=avrxmega6/mmcu=avrxmega7 msp8 MULTILIB_DIRNAMES = avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega2 avrxmega4 avrxmega5 avrxmega6 avrxmega7 tiny-stack avr25/tiny-stack MULTILIB_EXCEPTIONS = \ - mmcu=avr3/mtiny-stack \ - mmcu=avr31/mtiny-stack \ - mmcu=avr35/mtiny-stack \ - mmcu=avr4/mtiny-stack \ - mmcu=avr5/mtiny-stack \ - mmcu=avr51/mtiny-stack \ - mmcu=avr6/mtiny-stack \ - mmcu=avrxmega2/mtiny-stack \ - mmcu=avrxmega4/mtiny-stack \ - mmcu=avrxmega5/mtiny-stack \ - mmcu=avrxmega6/mtiny-stack \ - mmcu=avrxmega7/mtiny-stack + mmcu=avr3/msp8 \ + mmcu=avr31/msp8 \ + mmcu=avr35/msp8 \ + mmcu=avr4/msp8 \ + mmcu=avr5/msp8 \ + mmcu=avr51/msp8 \ + mmcu=avr6/msp8 \ + mmcu=avrxmega2/msp8 \ + mmcu=avrxmega4/msp8 \ + mmcu=avrxmega5/msp8 \ + mmcu=avrxmega6/msp8 \ + mmcu=avrxmega7/msp8 MULTILIB_MATCHES = \ - mmcu?at90s2313=mmcu?at90s2313 \ - mmcu?at90s2323=mmcu?at90s2323 \ - mmcu?at90s2333=mmcu?at90s2333 \ - mmcu?at90s2343=mmcu?at90s2343 \ - mmcu?attiny22=mmcu?attiny22 \ - mmcu?attiny26=mmcu?attiny26 \ - mmcu?at90s4433=mmcu?at90s4433 \ + mmcu?avr2=mmcu?at90s2313 \ + mmcu?avr2=mmcu?at90s2323 \ + mmcu?avr2=mmcu?at90s2333 \ + mmcu?avr2=mmcu?at90s2343 \ + mmcu?avr2=mmcu?attiny22 \ + mmcu?avr2=mmcu?attiny26 \ + mmcu?avr2=mmcu?at90s4414 \ + mmcu?avr2=mmcu?at90s4433 \ + mmcu?avr2=mmcu?at90s4434 \ + mmcu?avr2=mmcu?at90s8515 \ + mmcu?avr2=mmcu?at90c8534 \ + mmcu?avr2=mmcu?at90s8535 \ mmcu?avr25=mmcu?ata6289 \ - mmcu?attiny13=mmcu?attiny13 \ mmcu?avr25=mmcu?attiny13 \ - mmcu?attiny13a=mmcu?attiny13a \ mmcu?avr25=mmcu?attiny13a \ - mmcu?attiny2313=mmcu?attiny2313 \ mmcu?avr25=mmcu?attiny2313 \ - mmcu?attiny2313a=mmcu?attiny2313a \ mmcu?avr25=mmcu?attiny2313a \ - mmcu?attiny24=mmcu?attiny24 \ mmcu?avr25=mmcu?attiny24 \ - mmcu?attiny24a=mmcu?attiny24a \ mmcu?avr25=mmcu?attiny24a \ mmcu?avr25=mmcu?attiny4313 \ mmcu?avr25=mmcu?attiny44 \ mmcu?avr25=mmcu?attiny44a \ mmcu?avr25=mmcu?attiny84 \ mmcu?avr25=mmcu?attiny84a \ - mmcu?attiny25=mmcu?attiny25 \ mmcu?avr25=mmcu?attiny25 \ mmcu?avr25=mmcu?attiny45 \ mmcu?avr25=mmcu?attiny85 \ - mmcu?attiny261=mmcu?attiny261 \ mmcu?avr25=mmcu?attiny261 \ - mmcu?attiny261a=mmcu?attiny261a \ mmcu?avr25=mmcu?attiny261a \ mmcu?avr25=mmcu?attiny461 \ mmcu?avr25=mmcu?attiny461a \ |