]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/avr/avr.h
avr.opt (mmcu=): Change to have a string value.
[thirdparty/gcc.git] / gcc / config / avr / avr.h
index 921502e3d0bfc1abe87eccbc0c615b84cace13e8..de2bcd171c89899e0cb5b687905f4be870b0655f 100644 (file)
@@ -75,6 +75,7 @@ enum
 
 /* Handling of 8-bit SP versus 16-bit SP is as follows:
 
+FIXME: DRIVER_SELF_SPECS has changed.
    -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
@@ -403,7 +404,8 @@ typedef struct avr_args
   avr_asm_output_aligned_decl_common (STREAM, DECL, NAME, SIZE, ALIGN, false)
 
 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
-  asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
+  avr_asm_asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN, \
+                                 asm_output_aligned_bss)
 
 #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGN)  \
   avr_asm_output_aligned_decl_common (STREAM, DECL, NAME, SIZE, ALIGN, true)
@@ -488,24 +490,7 @@ typedef struct avr_args
 #define ADJUST_INSN_LENGTH(INSN, LENGTH)                \
     (LENGTH = avr_adjust_insn_length (INSN, LENGTH))
 
-extern const char *avr_device_to_as (int argc, const char **argv);
-extern const char *avr_device_to_ld (int argc, const char **argv);
-extern const char *avr_device_to_data_start (int argc, const char **argv);
-extern const char *avr_device_to_text_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_as", avr_device_to_as },                 \
-  { "device_to_ld", avr_device_to_ld },                 \
-  { "device_to_data_start", avr_device_to_data_start }, \
-  { "device_to_text_start", avr_device_to_text_start }, \
-  { "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 DRIVER_SELF_SPECS " %{mmcu=*:-specs=device-specs/specs-%*%s %<mmcu=*} "
 #define CPP_SPEC ""
 
 #define CC1_SPEC ""
@@ -514,7 +499,7 @@ extern const char *avr_device_to_sp8 (int argc, const char **argv);
     %{!fenforce-eh-specs:-fno-enforce-eh-specs} \
     %{!fexceptions:-fno-exceptions}"
 
-#define ASM_SPEC "%:device_to_as(%{mmcu=*:%*}) "
+#define ASM_SPEC "%{march=*:-mmcu=%*}%{mrelax: --mlink-relax}"
   
 #define LINK_SPEC "\
 %{mrelax:--relax\
@@ -525,9 +510,7 @@ extern const char *avr_device_to_sp8 (int argc, const char **argv);
                              %{mmcu=atmega64*|\
                                mmcu=at90can64*|\
                                mmcu=at90usb64*:--pmem-wrap-around=64k}}}\
-%:device_to_ld(%{mmcu=*:%*})\
-%:device_to_data_start(%{mmcu=*:%*})\
-%:device_to_text_start(%{mmcu=*:%*}) \
+%{march=*:-m%*}\
 %{shared:%eshared is not supported}"
 
 #define LIB_SPEC \
@@ -539,7 +522,8 @@ extern const char *avr_device_to_sp8 (int argc, const char **argv);
 #define LIBGCC_SPEC \
   "%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lgcc }}}}}"
 
-#define STARTFILE_SPEC "%:device_to_startfile(%{mmcu=*:%*})"
+/* The actual definition will come from the device-specific spec file.  */
+#define STARTFILE_SPEC ""
 
 #define ENDFILE_SPEC ""
 
@@ -608,3 +592,8 @@ extern int avr_accumulate_outgoing_args (void);
 #define ACCUMULATE_OUTGOING_ARGS avr_accumulate_outgoing_args()
 
 #define INIT_EXPANDERS avr_init_expanders()
+
+/* Flags used for io and address attributes.  */
+#define SYMBOL_FLAG_IO_LOW     (SYMBOL_FLAG_MACH_DEP << 4)
+#define SYMBOL_FLAG_IO         (SYMBOL_FLAG_MACH_DEP << 5)
+#define SYMBOL_FLAG_ADDRESS    (SYMBOL_FLAG_MACH_DEP << 6)