/* 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
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)
#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 ""
%{!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\
%{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 \
#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 ""
#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)