2000-02-11 23:31:46 +01:00
|
|
|
/* Definitions of target machine for GNU compiler,
|
|
|
|
for ATMEL AVR at90s8515, ATmega103/103L, ATmega603/603L microcontrollers.
|
2004-01-20 18:38:44 +01:00
|
|
|
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
|
|
|
Free Software Foundation, Inc.
|
2000-02-11 23:31:46 +01:00
|
|
|
Contributed by Denis Chertykov (denisc@overta.ru)
|
|
|
|
|
2003-09-27 06:48:30 +02:00
|
|
|
This file is part of GCC.
|
2000-02-11 23:31:46 +01:00
|
|
|
|
2003-09-27 06:48:30 +02:00
|
|
|
GCC is free software; you can redistribute it and/or modify
|
2000-02-11 23:31:46 +01:00
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
any later version.
|
|
|
|
|
2003-09-27 06:48:30 +02:00
|
|
|
GCC is distributed in the hope that it will be useful,
|
2000-02-11 23:31:46 +01:00
|
|
|
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
|
2003-09-27 06:48:30 +02:00
|
|
|
along with GCC; see the file COPYING. If not, write to
|
2000-02-11 23:31:46 +01:00
|
|
|
the Free Software Foundation, 59 Temple Place - Suite 330,
|
|
|
|
Boston, MA 02111-1307, USA. */
|
|
|
|
|
2003-12-25 16:17:37 +01:00
|
|
|
/* Names to predefine in the preprocessor for this target machine. */
|
2000-02-11 23:31:46 +01:00
|
|
|
|
2003-01-26 15:40:22 +01:00
|
|
|
#define TARGET_CPU_CPP_BUILTINS() \
|
2002-05-29 23:59:08 +02:00
|
|
|
do \
|
|
|
|
{ \
|
|
|
|
builtin_define_std ("AVR"); \
|
|
|
|
if (avr_base_arch_macro) \
|
|
|
|
builtin_define (avr_base_arch_macro); \
|
|
|
|
if (avr_extra_arch_macro) \
|
|
|
|
builtin_define (avr_extra_arch_macro); \
|
|
|
|
if (avr_asm_only_p) \
|
|
|
|
builtin_define ("__AVR_ASM_ONLY__"); \
|
|
|
|
if (avr_enhanced_p) \
|
|
|
|
builtin_define ("__AVR_ENHANCED__"); \
|
|
|
|
if (avr_mega_p) \
|
|
|
|
builtin_define ("__AVR_MEGA__"); \
|
|
|
|
if (TARGET_NO_INTERRUPTS) \
|
|
|
|
builtin_define ("__NO_INTERRUPTS__"); \
|
|
|
|
} \
|
|
|
|
while (0)
|
2000-02-11 23:31:46 +01:00
|
|
|
|
2003-12-25 16:17:37 +01:00
|
|
|
/* This declaration should be present. */
|
2000-02-11 23:31:46 +01:00
|
|
|
extern int target_flags;
|
|
|
|
|
2000-07-04 13:01:50 +02:00
|
|
|
#define MASK_ALL_DEBUG 0x00000FE0
|
|
|
|
#define MASK_ORDER_1 0x00001000
|
|
|
|
#define MASK_INSN_SIZE_DUMP 0x00002000
|
|
|
|
#define MASK_ORDER_2 0x00004000
|
2000-11-14 20:05:41 +01:00
|
|
|
#define MASK_NO_TABLEJUMP 0x00008000
|
2000-07-04 13:01:50 +02:00
|
|
|
#define MASK_INT8 0x00010000
|
|
|
|
#define MASK_NO_INTERRUPTS 0x00020000
|
|
|
|
#define MASK_CALL_PROLOGUES 0x00040000
|
|
|
|
#define MASK_TINY_STACK 0x00080000
|
2002-06-09 20:06:10 +02:00
|
|
|
#define MASK_SHORT_CALLS 0x00100000
|
2000-07-04 13:01:50 +02:00
|
|
|
|
|
|
|
#define TARGET_ORDER_1 (target_flags & MASK_ORDER_1)
|
|
|
|
#define TARGET_ORDER_2 (target_flags & MASK_ORDER_2)
|
2003-01-26 15:40:22 +01:00
|
|
|
#define TARGET_INT8 (target_flags & MASK_INT8)
|
2000-07-04 13:01:50 +02:00
|
|
|
#define TARGET_NO_INTERRUPTS (target_flags & MASK_NO_INTERRUPTS)
|
|
|
|
#define TARGET_INSN_SIZE_DUMP (target_flags & MASK_INSN_SIZE_DUMP)
|
|
|
|
#define TARGET_CALL_PROLOGUES (target_flags & MASK_CALL_PROLOGUES)
|
|
|
|
#define TARGET_TINY_STACK (target_flags & MASK_TINY_STACK)
|
2000-11-14 20:05:41 +01:00
|
|
|
#define TARGET_NO_TABLEJUMP (target_flags & MASK_NO_TABLEJUMP)
|
2002-06-09 20:06:10 +02:00
|
|
|
#define TARGET_SHORT_CALLS (target_flags & MASK_SHORT_CALLS)
|
2003-01-26 15:40:22 +01:00
|
|
|
#define TARGET_ALL_DEBUG (target_flags & MASK_ALL_DEBUG)
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define TARGET_SWITCHES { \
|
2000-07-04 13:01:50 +02:00
|
|
|
{ "order1", MASK_ORDER_1, NULL }, \
|
|
|
|
{ "order2", MASK_ORDER_2, NULL }, \
|
|
|
|
{ "int8", MASK_INT8, N_("Assume int to be 8 bit integer") }, \
|
|
|
|
{ "no-interrupts", MASK_NO_INTERRUPTS, \
|
|
|
|
N_("Change the stack pointer without disabling interrupts") }, \
|
|
|
|
{ "call-prologues", MASK_CALL_PROLOGUES, \
|
|
|
|
N_("Use subroutines for function prologue/epilogue") }, \
|
|
|
|
{ "tiny-stack", MASK_TINY_STACK, \
|
|
|
|
N_("Change only the low 8 bits of the stack pointer") }, \
|
2000-11-14 20:05:41 +01:00
|
|
|
{ "no-tablejump", MASK_NO_TABLEJUMP, \
|
|
|
|
N_("Do not generate tablejump insns") }, \
|
2002-06-09 20:06:10 +02:00
|
|
|
{ "short-calls", MASK_SHORT_CALLS, \
|
|
|
|
N_("Use rjmp/rcall (limited range) on >8K devices") }, \
|
2000-07-04 13:01:50 +02:00
|
|
|
{ "size", MASK_INSN_SIZE_DUMP, \
|
|
|
|
N_("Output instruction sizes to the asm file") }, \
|
|
|
|
{ "deb", MASK_ALL_DEBUG, NULL }, \
|
|
|
|
{ "", 0, NULL } }
|
2000-02-11 23:31:46 +01:00
|
|
|
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
extern const char *avr_init_stack;
|
2000-02-11 23:31:46 +01:00
|
|
|
extern const char *avr_mcu_name;
|
2002-05-29 23:59:08 +02:00
|
|
|
|
|
|
|
extern const char *avr_base_arch_macro;
|
|
|
|
extern const char *avr_extra_arch_macro;
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
extern int avr_mega_p;
|
|
|
|
extern int avr_enhanced_p;
|
2002-05-29 23:59:08 +02:00
|
|
|
extern int avr_asm_only_p;
|
2000-02-11 23:31:46 +01:00
|
|
|
|
2002-06-09 20:06:10 +02:00
|
|
|
#define AVR_MEGA (avr_mega_p && !TARGET_SHORT_CALLS)
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
#define AVR_ENHANCED (avr_enhanced_p)
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define TARGET_OPTIONS { \
|
toplev.c (target_options): Add value field.
* toplev.c (target_options): Add value field.
(set_target_switch): Handle target options with values.
* doc/tm.texi: Document how fixed vs variable target
options work.
* config/alpha/alpha.h, config/arc/arc.h, config/avr/avr.h,
config/c4x/c4x.h, config/cris/aout.h, config/cris/cris.h,
config/d30v/d30v.h, config/dsp16xx/dsp16xx.h,
config/frv/frv.h, config/i386/i386.h, config/ia64/ia64.h,
config/m32r/m32r.h, config/m68hc11/m68hc11.h,
config/m68k/m68k.h, config/m88k/m88k.h, config/mcore/mcore.h,
config/mips/mips.h, config/mmix/mmix.h, config/pa/pa.h,
config/rs6000/rs6000.h, config/rs6000/sysv4.h,
config/s390/s390.h, config/sparc/sparc.h, config/v850/v850.h:
Add value initializer to target options.
From-SVN: r65756
2003-04-18 01:18:58 +02:00
|
|
|
{ "init-stack=", &avr_init_stack, N_("Specify the initial stack address"), 0}, \
|
|
|
|
{ "mcu=", &avr_mcu_name, N_("Specify the MCU name"), 0} }
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define TARGET_VERSION fprintf (stderr, " (GNU assembler syntax)");
|
|
|
|
|
2002-07-10 23:08:41 +02:00
|
|
|
#define OVERRIDE_OPTIONS avr_override_options ()
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define CAN_DEBUG_WITHOUT_FP
|
|
|
|
|
|
|
|
#define BITS_BIG_ENDIAN 0
|
|
|
|
#define BYTES_BIG_ENDIAN 0
|
|
|
|
#define WORDS_BIG_ENDIAN 0
|
|
|
|
|
2000-06-24 20:01:26 +02:00
|
|
|
#ifdef IN_LIBGCC2
|
|
|
|
/* This is to get correct SI and DI modes in libgcc2.c (32 and 64 bits). */
|
|
|
|
#define UNITS_PER_WORD 4
|
|
|
|
#else
|
2003-12-25 16:17:37 +01:00
|
|
|
/* Width of a word, in units (bytes). */
|
2000-02-11 23:31:46 +01:00
|
|
|
#define UNITS_PER_WORD 1
|
2000-06-24 20:01:26 +02:00
|
|
|
#endif
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define POINTER_SIZE 16
|
|
|
|
|
|
|
|
|
|
|
|
/* Maximum sized of reasonable data type
|
|
|
|
DImode or Dfmode ... */
|
|
|
|
#define MAX_FIXED_MODE_SIZE 32
|
|
|
|
|
|
|
|
#define PARM_BOUNDARY 8
|
|
|
|
|
|
|
|
#define FUNCTION_BOUNDARY 8
|
|
|
|
|
|
|
|
#define EMPTY_FIELD_BOUNDARY 8
|
|
|
|
|
2003-12-25 16:17:37 +01:00
|
|
|
/* No data type wants to be aligned rounder than this. */
|
2000-02-11 23:31:46 +01:00
|
|
|
#define BIGGEST_ALIGNMENT 8
|
|
|
|
|
|
|
|
|
|
|
|
#define STRICT_ALIGNMENT 0
|
|
|
|
|
|
|
|
#define INT_TYPE_SIZE (TARGET_INT8 ? 8 : 16)
|
|
|
|
#define SHORT_TYPE_SIZE (INT_TYPE_SIZE == 8 ? INT_TYPE_SIZE : 16)
|
|
|
|
#define LONG_TYPE_SIZE (INT_TYPE_SIZE == 8 ? 16 : 32)
|
|
|
|
#define LONG_LONG_TYPE_SIZE 64
|
|
|
|
#define FLOAT_TYPE_SIZE 32
|
|
|
|
#define DOUBLE_TYPE_SIZE 32
|
|
|
|
#define LONG_DOUBLE_TYPE_SIZE 32
|
|
|
|
|
|
|
|
#define DEFAULT_SIGNED_CHAR 1
|
|
|
|
|
|
|
|
#define SIZE_TYPE (INT_TYPE_SIZE == 8 ? "long unsigned int" : "unsigned int")
|
avr-protos.h, avr.c (unique_section, [...]): Add "const" as needed to remove warnings.
* config/avr/avr-protos.h, config/avr/avr.c (unique_section,
gas_output_limited_string, gas_output_ascii, output_movqi,
output_movhi, out_movqi_r_mr, out_movqi_mr_r, out_movhi_r_mr,
out_movhi_mr_r, out_movsi_r_mr, out_movsi_mr_r, output_movsisf,
out_tstsi, out_tsthi, ret_cond_branch, ashlqi3_out, ashlhi3_out,
ashlsi3_out, ashrqi3_out, ashrhi3_out, ashrsi3_out, lshrqi3_out,
lshrhi3_out, lshrsi3_out, output_reload_inhi, output_reload_insisf,
out_shift_with_cnt, ptrreg_to_str, cond_string, encode_section_info):
Add "const" as needed to remove warnings.
* config/avr/avr.c (avr_override_options, avr_init_once,
function_prologue, function_epilogue, frame_pointer_required_p,
class_likely_spilled_p, order_regs_for_local_alloc,
avr_address_cost, avr_ret_register): Use K&R style arguments.
(initial_elimination_offset, gas_output_limited_string):
Remove ATTRIBUTE_UNUSED from the used arguments.
(output_mov*, out_mov*_r_mr, out_mov*_mr_r, output_reload_insisf):
Use local variables src, dest, base to access operands[].
Rename reg_dest to reg_src if that's what it is.
(output_movhi, output_movsisf): Optimize loading 8-bit immediate
constants to LD_REGS if reg_was_0.
(output_reload_insisf): Change arg 3 to insn length and set it.
(out_movhi_r_mr, out_movhi_mr_r): Use in/out for more efficient
access to 16-bit I/O register pairs.
(avr_address_cost): Lower cost for the above case.
(out_tsthi): Use "or" (faster) instead of "sbiw" if the operand
may be clobbered, also for LD_REGS.
(adjust_insn_length): Correct insn length for iorhi3 and iorsi3
with a CONST_INT.
* config/avr/avr.h (PTRDIFF_TYPE): Make signed.
* config/avr/avr.md: Change all uses of the TEST_HARD_REG_CLASS
macro to test_hard_reg_class function.
(*movsi, *movsf): Change "cc" attribute from "clobber" to "none"
for loading immediate constants to LD_REGS.
(andsi3, cmphi, cmpsi): Add return statements to avoid warnings.
From-SVN: r36117
2000-09-03 09:37:48 +02:00
|
|
|
#define PTRDIFF_TYPE (INT_TYPE_SIZE == 8 ? "long int" :"int")
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define WCHAR_TYPE_SIZE 16
|
|
|
|
|
|
|
|
#define FIRST_PSEUDO_REGISTER 36
|
|
|
|
|
|
|
|
#define FIXED_REGISTERS {\
|
|
|
|
1,1,/* r0 r1 */\
|
|
|
|
0,0,/* r2 r3 */\
|
|
|
|
0,0,/* r4 r5 */\
|
|
|
|
0,0,/* r6 r7 */\
|
|
|
|
0,0,/* r8 r9 */\
|
|
|
|
0,0,/* r10 r11 */\
|
|
|
|
0,0,/* r12 r13 */\
|
|
|
|
0,0,/* r14 r15 */\
|
|
|
|
0,0,/* r16 r17 */\
|
|
|
|
0,0,/* r18 r19 */\
|
|
|
|
0,0,/* r20 r21 */\
|
|
|
|
0,0,/* r22 r23 */\
|
|
|
|
0,0,/* r24 r25 */\
|
|
|
|
0,0,/* r26 r27 */\
|
|
|
|
0,0,/* r28 r29 */\
|
|
|
|
0,0,/* r30 r31 */\
|
|
|
|
1,1,/* STACK */\
|
|
|
|
1,1 /* arg pointer */ }
|
|
|
|
|
|
|
|
#define CALL_USED_REGISTERS { \
|
|
|
|
1,1,/* r0 r1 */ \
|
|
|
|
0,0,/* r2 r3 */ \
|
|
|
|
0,0,/* r4 r5 */ \
|
|
|
|
0,0,/* r6 r7 */ \
|
|
|
|
0,0,/* r8 r9 */ \
|
|
|
|
0,0,/* r10 r11 */ \
|
|
|
|
0,0,/* r12 r13 */ \
|
|
|
|
0,0,/* r14 r15 */ \
|
|
|
|
0,0,/* r16 r17 */ \
|
|
|
|
1,1,/* r18 r19 */ \
|
|
|
|
1,1,/* r20 r21 */ \
|
|
|
|
1,1,/* r22 r23 */ \
|
|
|
|
1,1,/* r24 r25 */ \
|
|
|
|
1,1,/* r26 r27 */ \
|
|
|
|
0,0,/* r28 r29 */ \
|
|
|
|
1,1,/* r30 r31 */ \
|
|
|
|
1,1,/* STACK */ \
|
|
|
|
1,1 /* arg pointer */ }
|
|
|
|
|
|
|
|
#define NON_SAVING_SETJMP 0
|
|
|
|
|
|
|
|
#define REG_ALLOC_ORDER { \
|
|
|
|
24,25, \
|
|
|
|
18,19, \
|
|
|
|
20,21, \
|
|
|
|
22,23, \
|
|
|
|
30,31, \
|
|
|
|
26,27, \
|
|
|
|
28,29, \
|
|
|
|
17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2, \
|
|
|
|
0,1, \
|
|
|
|
32,33,34,35 \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define ORDER_REGS_FOR_LOCAL_ALLOC order_regs_for_local_alloc ()
|
|
|
|
|
|
|
|
|
|
|
|
#define HARD_REGNO_NREGS(REGNO, MODE) ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
|
|
|
|
|
2000-06-24 20:01:26 +02:00
|
|
|
#define HARD_REGNO_MODE_OK(REGNO, MODE) avr_hard_regno_mode_ok(REGNO, MODE)
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define MODES_TIEABLE_P(MODE1, MODE2) 0
|
|
|
|
|
|
|
|
enum reg_class {
|
|
|
|
NO_REGS,
|
|
|
|
R0_REG, /* r0 */
|
|
|
|
POINTER_X_REGS, /* r26 - r27 */
|
|
|
|
POINTER_Y_REGS, /* r28 - r29 */
|
|
|
|
POINTER_Z_REGS, /* r30 - r31 */
|
|
|
|
STACK_REG, /* STACK */
|
|
|
|
BASE_POINTER_REGS, /* r28 - r31 */
|
|
|
|
POINTER_REGS, /* r26 - r31 */
|
|
|
|
ADDW_REGS, /* r24 - r31 */
|
|
|
|
SIMPLE_LD_REGS, /* r16 - r23 */
|
|
|
|
LD_REGS, /* r16 - r31 */
|
|
|
|
NO_LD_REGS, /* r0 - r15 */
|
|
|
|
GENERAL_REGS, /* r0 - r31 */
|
|
|
|
ALL_REGS, LIM_REG_CLASSES
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#define N_REG_CLASSES (int)LIM_REG_CLASSES
|
|
|
|
|
|
|
|
#define REG_CLASS_NAMES { \
|
|
|
|
"NO_REGS", \
|
|
|
|
"R0_REG", /* r0 */ \
|
|
|
|
"POINTER_X_REGS", /* r26 - r27 */ \
|
|
|
|
"POINTER_Y_REGS", /* r28 - r29 */ \
|
|
|
|
"POINTER_Z_REGS", /* r30 - r31 */ \
|
|
|
|
"STACK_REG", /* STACK */ \
|
|
|
|
"BASE_POINTER_REGS", /* r28 - r31 */ \
|
|
|
|
"POINTER_REGS", /* r26 - r31 */ \
|
|
|
|
"ADDW_REGS", /* r24 - r31 */ \
|
|
|
|
"SIMPLE_LD_REGS", /* r16 - r23 */ \
|
|
|
|
"LD_REGS", /* r16 - r31 */ \
|
|
|
|
"NO_LD_REGS", /* r0 - r15 */ \
|
|
|
|
"GENERAL_REGS", /* r0 - r31 */ \
|
|
|
|
"ALL_REGS" }
|
|
|
|
|
|
|
|
#define REG_X 26
|
|
|
|
#define REG_Y 28
|
|
|
|
#define REG_Z 30
|
|
|
|
#define REG_W 24
|
|
|
|
|
|
|
|
#define REG_CLASS_CONTENTS { \
|
|
|
|
{0x00000000,0x00000000}, /* NO_REGS */ \
|
|
|
|
{0x00000001,0x00000000}, /* R0_REG */ \
|
|
|
|
{3 << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
|
|
|
|
{3 << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
|
|
|
|
{3 << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
|
|
|
|
{0x00000000,0x00000003}, /* STACK_REG, STACK */ \
|
|
|
|
{(3 << REG_Y) | (3 << REG_Z), \
|
|
|
|
0x00000000}, /* BASE_POINTER_REGS, r28 - r31 */ \
|
|
|
|
{(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z), \
|
|
|
|
0x00000000}, /* POINTER_REGS, r26 - r31 */ \
|
|
|
|
{(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W), \
|
|
|
|
0x00000000}, /* ADDW_REGS, r24 - r31 */ \
|
2003-01-26 15:40:22 +01:00
|
|
|
{0x00ff0000,0x00000000}, /* SIMPLE_LD_REGS r16 - r23 */ \
|
2000-02-11 23:31:46 +01:00
|
|
|
{(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16), \
|
|
|
|
0x00000000}, /* LD_REGS, r16 - r31 */ \
|
2003-01-26 15:40:22 +01:00
|
|
|
{0x0000ffff,0x00000000}, /* NO_LD_REGS r0 - r15 */ \
|
2001-12-16 17:09:06 +01:00
|
|
|
{0xffffffff,0x00000000}, /* GENERAL_REGS, r0 - r31 */ \
|
|
|
|
{0xffffffff,0x00000003} /* ALL_REGS */ \
|
2000-02-11 23:31:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#define REGNO_REG_CLASS(R) avr_regno_reg_class(R)
|
|
|
|
|
2004-01-20 18:38:44 +01:00
|
|
|
#define BASE_REG_CLASS (reload_completed ? BASE_POINTER_REGS : POINTER_REGS)
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define INDEX_REG_CLASS NO_REGS
|
|
|
|
|
|
|
|
#define REG_CLASS_FROM_LETTER(C) avr_reg_class_from_letter(C)
|
|
|
|
|
|
|
|
#define REGNO_OK_FOR_BASE_P(r) (((r) < FIRST_PSEUDO_REGISTER \
|
|
|
|
&& ((r) == REG_X \
|
|
|
|
|| (r) == REG_Y \
|
|
|
|
|| (r) == REG_Z \
|
|
|
|
|| (r) == ARG_POINTER_REGNUM)) \
|
|
|
|
|| (reg_renumber \
|
|
|
|
&& (reg_renumber[r] == REG_X \
|
|
|
|
|| reg_renumber[r] == REG_Y \
|
|
|
|
|| reg_renumber[r] == REG_Z \
|
|
|
|
|| (reg_renumber[r] \
|
|
|
|
== ARG_POINTER_REGNUM))))
|
|
|
|
|
|
|
|
#define REGNO_OK_FOR_INDEX_P(NUM) 0
|
|
|
|
|
|
|
|
#define PREFERRED_RELOAD_CLASS(X, CLASS) preferred_reload_class(X,CLASS)
|
|
|
|
|
|
|
|
#define SMALL_REGISTER_CLASSES 1
|
|
|
|
|
|
|
|
#define CLASS_LIKELY_SPILLED_P(c) class_likely_spilled_p(c)
|
|
|
|
|
|
|
|
#define CLASS_MAX_NREGS(CLASS, MODE) class_max_nregs (CLASS, MODE)
|
|
|
|
|
|
|
|
#define CONST_OK_FOR_LETTER_P(VALUE, C) \
|
|
|
|
((C) == 'I' ? (VALUE) >= 0 && (VALUE) <= 63 : \
|
|
|
|
(C) == 'J' ? (VALUE) <= 0 && (VALUE) >= -63: \
|
|
|
|
(C) == 'K' ? (VALUE) == 2 : \
|
|
|
|
(C) == 'L' ? (VALUE) == 0 : \
|
|
|
|
(C) == 'M' ? (VALUE) >= 0 && (VALUE) <= 0xff : \
|
|
|
|
(C) == 'N' ? (VALUE) == -1: \
|
|
|
|
(C) == 'O' ? (VALUE) == 8 || (VALUE) == 16 || (VALUE) == 24: \
|
|
|
|
(C) == 'P' ? (VALUE) == 1 : \
|
|
|
|
0)
|
|
|
|
|
|
|
|
#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \
|
|
|
|
((C) == 'G' ? (VALUE) == CONST0_RTX (SFmode) \
|
|
|
|
: 0)
|
|
|
|
|
|
|
|
#define EXTRA_CONSTRAINT(x, c) extra_constraint(x, c)
|
2004-01-29 08:35:40 +01:00
|
|
|
|
2000-02-11 23:31:46 +01:00
|
|
|
#define STACK_PUSH_CODE POST_DEC
|
|
|
|
|
|
|
|
#define STACK_GROWS_DOWNWARD
|
|
|
|
|
|
|
|
#define STARTING_FRAME_OFFSET 1
|
|
|
|
|
|
|
|
#define STACK_POINTER_OFFSET 1
|
|
|
|
|
|
|
|
#define FIRST_PARM_OFFSET(FUNDECL) 0
|
|
|
|
|
|
|
|
#define STACK_BOUNDARY 8
|
|
|
|
|
|
|
|
#define STACK_POINTER_REGNUM 32
|
|
|
|
|
|
|
|
#define FRAME_POINTER_REGNUM REG_Y
|
|
|
|
|
|
|
|
#define ARG_POINTER_REGNUM 34
|
|
|
|
|
|
|
|
#define STATIC_CHAIN_REGNUM 2
|
|
|
|
|
|
|
|
#define FRAME_POINTER_REQUIRED frame_pointer_required_p()
|
|
|
|
|
|
|
|
#define ELIMINABLE_REGS { \
|
|
|
|
{ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
|
|
|
|
{FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \
|
|
|
|
,{FRAME_POINTER_REGNUM+1,STACK_POINTER_REGNUM+1}}
|
|
|
|
|
|
|
|
#define CAN_ELIMINATE(FROM, TO) (((FROM) == ARG_POINTER_REGNUM \
|
|
|
|
&& (TO) == FRAME_POINTER_REGNUM) \
|
|
|
|
|| (((FROM) == FRAME_POINTER_REGNUM \
|
|
|
|
|| (FROM) == FRAME_POINTER_REGNUM+1) \
|
|
|
|
&& ! FRAME_POINTER_REQUIRED \
|
|
|
|
))
|
|
|
|
|
|
|
|
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
|
|
|
|
OFFSET = initial_elimination_offset (FROM, TO)
|
|
|
|
|
2000-05-09 19:53:54 +02:00
|
|
|
#define RETURN_ADDR_RTX(count, x) \
|
|
|
|
gen_rtx_MEM (Pmode, memory_address (Pmode, plus_constant (tem, 1)))
|
|
|
|
|
2000-02-11 23:31:46 +01:00
|
|
|
#define PUSH_ROUNDING(NPUSHED) (NPUSHED)
|
|
|
|
|
|
|
|
#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0
|
|
|
|
|
|
|
|
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) (function_arg (&(CUM), MODE, TYPE, NAMED))
|
|
|
|
|
|
|
|
typedef struct avr_args {
|
|
|
|
int nregs; /* # registers available for passing */
|
|
|
|
int regno; /* next available register number */
|
|
|
|
} CUMULATIVE_ARGS;
|
|
|
|
|
tm.texi (INIT_CUMULATIVE_ARGS): Update doco.
* doc/tm.texi (INIT_CUMULATIVE_ARGS): Update doco.
* calls.c (expand_call): Pass n_named_args to INIT_CUMULATIVE_ARGS.
(emit_library_call_value_1): Likewise pass nargs.
* expr.c (block_move_libcall_safe_for_call_parm): Pass 3 here.
* function.c (assign_parms): Pass -1 to INIT_CUMULATIVE_ARGS.
* config/rs6000/rs6000.c (init_cumulative_args): Use n_named_args
parameter instead of scanning TYPE_ARGS_TYPES to count args.
* config/rs6000/rs6000-protos.h (init_cumulative_args): Update
prototype.
* config/rs6000/rs6000.h (INIT_CUMULATIVE_ARGS): Pass extra arg.
(INIT_CUMULATIVE_INCOMING_ARGS): Set extra arg to 1000.
(INIT_CUMULATIVE_LIBCALL_ARGS): Set extra arg to 0.
* config/sh/sh.c (sh_output_mi_thunk): Pass 1 as n_named_args to
INIT_CUMULATIVE_ARGS.
* config/alpha/alpha.h (INIT_CUMULATIVE_ARGS): Update.
* config/alpha/unicosmk.h, config/alpha/vms.h, config/arc/arc.h,
config/arm/arm.h, config/avr/avr.h, config/c4x/c4x.h,
config/cris/cris.h, config/fr30/fr30.h, config/frv/frv.h,
config/h8300/h8300.h, config/i386/i386.h, config/i860/i860.h,
config/ia64/ia64.h, config/ip2k/ip2k.h, config/iq2000/iq2000.h,
config/iq2000/iq2000.c, config/m32r/m32r.h, config/m68hc11/m68hc11.h,
config/m68k/m68k.h, config/mcore/mcore.h, config/mips/mips.h,
config/mmix/mmix.h, config/mn10300/mn10300.h, config/ns32k/ns32k.h,
config/pa/pa.h, config/pdp11/pdp11.h config/s390/s390.h,
config/sh/sh.h, config/sparc/sparc.h, config/stormy16/stormy16.h,
config/v850/v850.h, config/vax/vax.h, config/xtensa/xtensa.h: Likewise.
From-SVN: r77380
2004-02-06 07:18:36 +01:00
|
|
|
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
|
|
|
|
init_cumulative_args (&(CUM), FNTYPE, LIBNAME, FNDECL)
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
|
|
|
|
(function_arg_advance (&CUM, MODE, TYPE, NAMED))
|
|
|
|
|
|
|
|
#define FUNCTION_ARG_REGNO_P(r) function_arg_regno_p(r)
|
|
|
|
|
|
|
|
extern int avr_reg_order[];
|
|
|
|
|
|
|
|
#define RET_REGISTER avr_ret_register ()
|
|
|
|
|
|
|
|
#define FUNCTION_VALUE(VALTYPE, FUNC) avr_function_value (VALTYPE, FUNC)
|
|
|
|
|
|
|
|
#define LIBCALL_VALUE(MODE) avr_libcall_value (MODE)
|
|
|
|
|
2003-05-17 01:41:12 +02:00
|
|
|
#define FUNCTION_VALUE_REGNO_P(N) ((int) (N) == RET_REGISTER)
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define DEFAULT_PCC_STRUCT_RETURN 0
|
|
|
|
|
|
|
|
#define EPILOGUE_USES(REGNO) 0
|
|
|
|
|
|
|
|
#define HAVE_POST_INCREMENT 1
|
|
|
|
#define HAVE_PRE_DECREMENT 1
|
|
|
|
|
|
|
|
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
|
|
|
|
|
|
|
|
#define MAX_REGS_PER_ADDRESS 1
|
|
|
|
|
|
|
|
#ifdef REG_OK_STRICT
|
|
|
|
# define GO_IF_LEGITIMATE_ADDRESS(mode, operand, ADDR) \
|
|
|
|
{ \
|
|
|
|
if (legitimate_address_p (mode, operand, 1)) \
|
|
|
|
goto ADDR; \
|
|
|
|
}
|
|
|
|
# else
|
|
|
|
# define GO_IF_LEGITIMATE_ADDRESS(mode, operand, ADDR) \
|
|
|
|
{ \
|
|
|
|
if (legitimate_address_p (mode, operand, 0)) \
|
|
|
|
goto ADDR; \
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define REG_OK_FOR_BASE_NOSTRICT_P(X) \
|
|
|
|
(REGNO (X) >= FIRST_PSEUDO_REGISTER || REG_OK_FOR_BASE_STRICT_P(X))
|
|
|
|
|
|
|
|
#define REG_OK_FOR_BASE_STRICT_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
|
|
|
|
|
|
|
|
#ifdef REG_OK_STRICT
|
|
|
|
# define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_STRICT_P (X)
|
|
|
|
#else
|
|
|
|
# define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_NOSTRICT_P (X)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define REG_OK_FOR_INDEX_P(X) 0
|
|
|
|
|
|
|
|
#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \
|
|
|
|
{ \
|
|
|
|
(X) = legitimize_address (X, OLDX, MODE); \
|
|
|
|
if (memory_address_p (MODE, X)) \
|
|
|
|
goto WIN; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define XEXP_(X,Y) (X)
|
|
|
|
#define LEGITIMIZE_RELOAD_ADDRESS(X, MODE, OPNUM, TYPE, IND_LEVELS, WIN) \
|
|
|
|
do { \
|
|
|
|
if (1&&(GET_CODE (X) == POST_INC || GET_CODE (X) == PRE_DEC)) \
|
|
|
|
{ \
|
|
|
|
push_reload (XEXP (X,0), XEXP (X,0), &XEXP (X,0), &XEXP (X,0), \
|
|
|
|
POINTER_REGS, GET_MODE (X),GET_MODE (X) , 0, 0, \
|
|
|
|
OPNUM, RELOAD_OTHER); \
|
|
|
|
goto WIN; \
|
|
|
|
} \
|
|
|
|
if (GET_CODE (X) == PLUS \
|
|
|
|
&& REG_P (XEXP (X, 0)) \
|
|
|
|
&& GET_CODE (XEXP (X, 1)) == CONST_INT \
|
|
|
|
&& INTVAL (XEXP (X, 1)) >= 1) \
|
|
|
|
{ \
|
|
|
|
int fit = INTVAL (XEXP (X, 1)) <= (64 - GET_MODE_SIZE (MODE)); \
|
|
|
|
if (fit) \
|
|
|
|
{ \
|
|
|
|
if (reg_equiv_address[REGNO (XEXP (X, 0))] != 0) \
|
|
|
|
{ \
|
|
|
|
int regno = REGNO (XEXP (X, 0)); \
|
|
|
|
rtx mem = make_memloc (X, regno); \
|
2001-05-04 17:06:41 +02:00
|
|
|
push_reload (XEXP (mem,0), NULL, &XEXP (mem,0), NULL, \
|
2000-02-11 23:31:46 +01:00
|
|
|
POINTER_REGS, Pmode, VOIDmode, 0, 0, \
|
|
|
|
1, ADDR_TYPE (TYPE)); \
|
2001-05-04 17:06:41 +02:00
|
|
|
push_reload (mem, NULL_RTX, &XEXP (X, 0), NULL, \
|
2000-02-11 23:31:46 +01:00
|
|
|
BASE_POINTER_REGS, GET_MODE (X), VOIDmode, 0, 0, \
|
|
|
|
OPNUM, TYPE); \
|
|
|
|
goto WIN; \
|
|
|
|
} \
|
2001-05-04 17:06:41 +02:00
|
|
|
push_reload (XEXP (X, 0), NULL_RTX, &XEXP (X, 0), NULL, \
|
2000-02-11 23:31:46 +01:00
|
|
|
BASE_POINTER_REGS, GET_MODE (X), VOIDmode, 0, 0, \
|
|
|
|
OPNUM, TYPE); \
|
|
|
|
goto WIN; \
|
|
|
|
} \
|
|
|
|
else if (! (frame_pointer_needed && XEXP (X,0) == frame_pointer_rtx)) \
|
|
|
|
{ \
|
2001-05-04 17:06:41 +02:00
|
|
|
push_reload (X, NULL_RTX, &X, NULL, \
|
2000-02-11 23:31:46 +01:00
|
|
|
POINTER_REGS, GET_MODE (X), VOIDmode, 0, 0, \
|
|
|
|
OPNUM, TYPE); \
|
|
|
|
goto WIN; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
} while(0)
|
2003-01-26 15:40:22 +01:00
|
|
|
|
2000-02-11 23:31:46 +01:00
|
|
|
#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
|
|
|
|
if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == PRE_DEC) \
|
|
|
|
goto LABEL
|
|
|
|
|
|
|
|
#define LEGITIMATE_CONSTANT_P(X) 1
|
|
|
|
|
2001-01-01 21:35:36 +01:00
|
|
|
#define REGISTER_MOVE_COST(MODE, FROM, TO) ((FROM) == STACK_REG ? 6 \
|
|
|
|
: (TO) == STACK_REG ? 12 \
|
|
|
|
: 2)
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define MEMORY_MOVE_COST(MODE,CLASS,IN) ((MODE)==QImode ? 2 : \
|
|
|
|
(MODE)==HImode ? 4 : \
|
|
|
|
(MODE)==SImode ? 8 : \
|
|
|
|
(MODE)==SFmode ? 8 : 16)
|
|
|
|
|
2000-10-01 17:29:06 +02:00
|
|
|
#define BRANCH_COST 0
|
|
|
|
|
2000-02-11 23:31:46 +01:00
|
|
|
#define SLOW_BYTE_ACCESS 0
|
|
|
|
|
|
|
|
#define NO_FUNCTION_CSE
|
|
|
|
|
|
|
|
#define NO_RECURSIVE_FUNCTION_CSE
|
|
|
|
|
2000-09-25 10:42:10 +02:00
|
|
|
#define TEXT_SECTION_ASM_OP "\t.text"
|
2000-02-11 23:31:46 +01:00
|
|
|
|
2000-09-25 10:42:10 +02:00
|
|
|
#define DATA_SECTION_ASM_OP "\t.data"
|
2000-02-11 23:31:46 +01:00
|
|
|
|
2002-05-25 20:18:53 +02:00
|
|
|
#define BSS_SECTION_ASM_OP "\t.section .bss"
|
|
|
|
|
2002-06-02 01:33:47 +02:00
|
|
|
/* Define the pseudo-ops used to switch to the .ctors and .dtors sections.
|
|
|
|
There are no shared libraries on this target, and these sections are
|
|
|
|
placed in the read-only program memory, so they are not writable. */
|
|
|
|
|
|
|
|
#undef CTORS_SECTION_ASM_OP
|
|
|
|
#define CTORS_SECTION_ASM_OP "\t.section .ctors,\"a\",@progbits"
|
|
|
|
|
|
|
|
#undef DTORS_SECTION_ASM_OP
|
|
|
|
#define DTORS_SECTION_ASM_OP "\t.section .dtors,\"a\",@progbits"
|
|
|
|
|
|
|
|
#define TARGET_ASM_CONSTRUCTOR avr_asm_out_ctor
|
|
|
|
|
|
|
|
#define TARGET_ASM_DESTRUCTOR avr_asm_out_dtor
|
|
|
|
|
2000-02-11 23:31:46 +01:00
|
|
|
#define EXTRA_SECTIONS in_progmem
|
|
|
|
|
|
|
|
#define EXTRA_SECTION_FUNCTIONS \
|
|
|
|
\
|
|
|
|
void \
|
2003-12-21 08:29:36 +01:00
|
|
|
progmem_section (void) \
|
2000-02-11 23:31:46 +01:00
|
|
|
{ \
|
|
|
|
if (in_section != in_progmem) \
|
|
|
|
{ \
|
2000-07-04 13:01:50 +02:00
|
|
|
fprintf (asm_out_file, \
|
2000-11-14 20:05:41 +01:00
|
|
|
"\t.section .progmem.gcc_sw_table, \"%s\", @progbits\n", \
|
2003-01-26 15:40:22 +01:00
|
|
|
AVR_MEGA ? "a" : "ax"); \
|
2000-11-14 20:05:41 +01:00
|
|
|
/* Should already be aligned, this is just to be safe if it isn't. */ \
|
|
|
|
fprintf (asm_out_file, "\t.p2align 1\n"); \
|
2000-02-11 23:31:46 +01:00
|
|
|
in_section = in_progmem; \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define READONLY_DATA_SECTION data_section
|
|
|
|
|
2000-11-14 20:05:41 +01:00
|
|
|
#define JUMP_TABLES_IN_TEXT_SECTION 0
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define ASM_COMMENT_START " ; "
|
|
|
|
|
|
|
|
#define ASM_APP_ON "/* #APP */\n"
|
|
|
|
|
|
|
|
#define ASM_APP_OFF "/* #NOAPP */\n"
|
|
|
|
|
2003-06-17 10:06:58 +02:00
|
|
|
#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE, COUNTER) \
|
|
|
|
fprintf (STREAM,"/* line: %d */\n",LINE)
|
2000-02-11 23:31:46 +01:00
|
|
|
|
target.h (gcc_target): Add asm_out.named_section, section_type_flags, have_named_sections.
* target.h (gcc_target): Add asm_out.named_section,
section_type_flags, have_named_sections.
* target-def.h (TARGET_ASM_NAMED_SECTION): New.
(TARGET_HAVE_NAMED_SECTIONS): New.
(TARGET_SECTION_TYPE_FLAGS): New.
* Makefile.in (toplev.o): Depend on TARGET_H.
(varasm.o, dbxout.o): Likewise.
* c-common.c (decl_attributes): Check targetm.have_named_sections
instead of ifdef ASM_OUTPUT_SECTION_NAME.
* dbxout.c (dbxout_function_decl): Likewise.
(dbxout_function_end): Likewise.
* toplev.c (compile_file): Likewise.
* varasm.c (exception_section): Likewise.
* cp/decl2.c (finish_objects): Likewise.
* defaults.h (EH_FRAME_SECTION): Remove.
(EH_FRAME_SECTION_ASM_OP): Remove.
(EH_FRAME_SECTION_NAME): New.
(UNIQUE_SECTION): Don't depend on ASM_OUTPUT_SECTION_NAME.
(UNIQUE_SECTION_P): Remove.
* dwarf2out.c (SECTION_FORMAT): Remove.
(ASM_OUTPUT_SECTION): Remove.
(output_call_frame_info): Use named_section_flags.
(output_comp_unit, dwarf2out_start_source_file): Likewise.
(dwarf2out_end_source_file, dwarf2out_define): Likewise.
(dwarf2out_undef, dwarf2out_init, dwarf2out_finish): Likewise.
* varasm.c (in_eh_frame, eh_frame_section): Remove.
(named_section_flags): New.
(named_section): Use it and targetm.section_type_flags.
(resolve_unique_section): New.
(assemble_start_function): Use it.
(asm_emit_uninitialised, assemble_variable): Likewise.
(default_section_type_flags): New.
(default_no_named_section, default_elf_asm_named_section): New.
(default_coff_asm_named_section, default_pe_asm_named_section): New.
* output.h: Update varasm.c decls.
(SECTION_*): New flags.
* crtstuff.c: Check EH_FRAME_SECTION_NAME not EH_FRAME_SECTION_ASM_OP.
(__EH_FRAME_BEGIN__, __FRAME_END__): Use attribute section.
* config/elfos.h (UNIQUE_SECTION_P): Remove.
* config/alpha/elf.h, config/arm/linux-elf.h: Likewise.
* config/arm/pe.h, config/arm/unknown-elf.h: Likewise.
* config/i386/cygwin.h, config/i386/djgpp.h: Likewise.
* config/i386/i386-interix.h, config/i386/win32.h: Likewise.
* config/ia64/sysv4.h, config/mcore/mcore-pe.h: Likewise.
* config/mips/elf.h, config/mips/elf64.h: Likewise.
* config/mips/iris6gld.h, config/mips/mips.h: Likewise.
* config/pa/pa64-hpux.h,
* config/elfos.h (ASM_OUTPUT_SECTION_NAME): Remove.
(TARGET_ASM_NAMED_SECTION): New.
* config/psos.h, config/a29k/a29k.h, config/alpha/elf.h: Likewise.
* config/alpha/vms.h, config/arm/coff.h: Likewise.
* config/arm/conix-elf.h, config/arm/elf.h: Likewise.
* config/arm/linux-elf.h, config/arm/pe.h: Likewise.
* config/arm/unknown-elf.h, config/avr/avr.h: Likewise.
* config/c4x/c4x.h, config/h8300/h8300.h: Likewise.
* config/i386/cygwin.h, config/i386/djgpp.h: Likewise.
* config/i386/i386-interix.h, config/i386/i386elf.h : Likewise.
* config/i386/sco5.h, config/i386/win32.h: Likewise.
* config/m68k/coff.h, config/mcore/mcore-pe.h: Likewise.
* config/mcore/mcore.h, config/mips/elf.h: Likewise.
* config/mips/elf64.h, config/mips/iris6.h: Likewise.
* config/mips/netbsd.h, config/mips/openbsd.h: Likewise.
* config/pa/pa64-hpux.h, config/rs6000/sysv4.h: Likewise.
* config/rs6000/xcoff.h, config/sh/sh.h: Likewise.
* config/sparc/sysv4.h: Likewise.
* config/nextstep.h: Error until named sections implemented.
* config/a29k/a29k.c (a29k_asm_named_section): New.
* config/alpha/alpha.c (SECTION_VMS_OVERLAY): New.
(vms_section_type_flags, vms_asm_named_section): New.
* config/arm/arm.c (arm_elf_asm_named_section): New.
* config/avr/avr.c (asm_output_section_name): Remove.
* config/avr/avr-protos.h: Update.
* config/c4x/c4x.c (c4x_asm_named_section): New.
* config/h8300/h8300.c (h8300_asm_named_section): New.
* config/i386/i386.c (sco_asm_named_section): New.
* config/i386/winnt.c (SECTION_PE_SHARED): New.
(i386_pe_section_type_flags): New.
(i386_pe_asm_named_section): New.
* config/i386/i386-protos.h: Update.
* config/m68k/m68k.c (m68k_coff_asm_named_section): New.
* config/mcore/mcore.c (mcore_asm_named_section): New.
* config/mips/mips.c (iris6_asm_named_section): New.
* config/mips/mips.h (ENCODE_SECTION_INFO): Use DECL_ONE_ONLY
instead of UNIQUE_SECTION_P.
* config/rs6000/rs6000.c (rs6000_elf_section_type_flags): New.
(xcoff_asm_named_section): New.
* config/sh/sh.c (sh_asm_named_section): New.
* config/sparc/sparc.c (sparc_elf_asm_named_section): New.
* config/i386/djgpp.h (EH_FRAME_SECTION_ASM_OP): Remove.
* config/i386/sco5.h (EH_FRAME_SECTION_ASM_OP*): Remove.
(EH_FRAME_SECTION_NAME): New.
(EXCEPTION_SECTION): New.
* config/ia64/ia64.h (EH_FRAME_SECTION_ASM_OP): Remove.
(DEBUG_*_SECTION): Remove.
* config/m68k/rtemself.h (EH_FRAME_SECTION_ASM_OP): Remove.
* config/mips/iris6.h (DEBUG_*_SECTION): Remove.
(EH_FRAME_SECTION_ASM_OP): Remove.
* doc/tm.texi (UNIQUE_SECTION_P): Remove.
(ASM_OUTPUT_SECTION_NAME): Remove.
(TARGET_ASM_NAMED_SECTION): New.
(TARGET_HAVE_NAMED_SECTIONS): New.
(TARGET_SECTION_TYPE_FLAGS): New.
(EH_FRAME_SECTION_ASM_OP): Remove.
(EH_FRAME_SECTION_NAME): New.
From-SVN: r44623
2001-08-04 03:31:41 +02:00
|
|
|
/* Switch into a generic section. */
|
|
|
|
#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define ASM_OUTPUT_ASCII(FILE, P, SIZE) gas_output_ascii (FILE,P,SIZE)
|
|
|
|
|
|
|
|
#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == '\n' \
|
|
|
|
|| ((C) == '$'))
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
|
|
|
|
do { \
|
|
|
|
fputs ("\t.comm ", (STREAM)); \
|
|
|
|
assemble_name ((STREAM), (NAME)); \
|
2003-06-04 19:33:51 +02:00
|
|
|
fprintf ((STREAM), ",%lu,1\n", (unsigned long)(SIZE)); \
|
2000-02-11 23:31:46 +01:00
|
|
|
} while (0)
|
|
|
|
|
2002-05-25 20:18:53 +02:00
|
|
|
#define ASM_OUTPUT_BSS(FILE, DECL, NAME, SIZE, ROUNDED) \
|
|
|
|
asm_output_bss ((FILE), (DECL), (NAME), (SIZE), (ROUNDED))
|
|
|
|
|
2000-02-11 23:31:46 +01:00
|
|
|
#define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) \
|
|
|
|
do { \
|
|
|
|
fputs ("\t.lcomm ", (STREAM)); \
|
|
|
|
assemble_name ((STREAM), (NAME)); \
|
Mon May 12 11:32:53 CEST 2003 Jan Hubicka <jh@suse.cz>
* expr.h (assemble_static_space): Update prototype.
* output.h (assemble_zeros, output_constant): Likewise.
* elfos.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): Make it 64bit clean
* alpha.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASK_OUTPUT_LOCAL): Make
it 64bit clean.
* elf.h (ASM_OTUPUT_SKIP): Likewise.
* unicosmk.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMM): Likewise.
* arm.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* aout.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* unknown-elf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* avr.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP): Expect
HOST_WIDE_INT operand.
* c4x.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP,
ASM_OUTPUT_BSS): Expect HOST_WIDE_INT operand.
* aout.h (ASM_OTUPUT_SKIP): Likewise.
* cris.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise.
* darwin.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON): Likewise.
* dsp16xx.h (ASM_OTUPUT_SKIP): Likewise.
* frv.h (ASM_OTUPUT_SKIP): Likewise.
* h8300.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_LOCAL): Likewise.
* 370.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Make it 64bit
clean.
* att.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand.
* bsd.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Make it 64bit clean.
* darwin.h (ASM_OUTPUT_SKIP): Make it 64bit clean..
* sco5.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Expect
HOST_WIDE_INT operand
* svr3gas.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Expect HOST_WIDE_INT operand
* sysv3.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand
* i960.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON,
ASM_OUTPUT_ALIGNED_LOCAL): Expect HOST_WIDE_INT operand
* ip2k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* m32r.h (ASM_OUTPUT_COMMON): Likewise.
* 3b1.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* amix.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
* crds.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
* hp320.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* m68k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* m68kelf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* m68kv4.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* mot3300.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise.
* netbsd-elf.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON,
ASM_OUTPUT_SKIP): Likewise.
* sgs.h (ASM_OUTPUT_SKIP): Likewise.
* tower-as.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON,
ASM_OUTPUT_SKIP): Likewise.
* m88k.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP):
Likewise.
* mcore.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_BSS, ASM_OUTPUT_SKIP): Likewise.
* iris.h (ASM_OUTPUT_LOCAL): Likewise.
* mips.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise.
* ns32k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Make it 64bit clean.
* pa-pro-end.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL):
Make it 64bit clean.
* pa.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL,
ASM_OUTPUT_SKIP): Make it 64bit clean.
* hpux.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL): Make it
64bit clean.
* romp.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect
HOST_WIDE_INT argument
* s390.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT argument.
* sh.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect
HOST_WIDE_INT argument
* sol2.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument
* sparc.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): HOST_WIDE_INT argument
* svr3.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument
* vax.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
HOST_WIDE_INT argument
* vaxv.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument
* xtensa.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument
* varasm.c (asm_output_bss, asm_output_aligned_bss,
asm_emit_uninitialized, assemble_zeros, assemble_static_space):
HOST_WIDE_INT argument
From-SVN: r66713
2003-05-12 11:51:36 +02:00
|
|
|
fprintf ((STREAM), ",%d\n", (int)(SIZE)); \
|
2000-02-11 23:31:46 +01:00
|
|
|
} while (0)
|
|
|
|
|
|
|
|
#undef TYPE_ASM_OP
|
|
|
|
#undef SIZE_ASM_OP
|
|
|
|
#undef WEAK_ASM_OP
|
2000-09-25 10:42:10 +02:00
|
|
|
#define TYPE_ASM_OP "\t.type\t"
|
|
|
|
#define SIZE_ASM_OP "\t.size\t"
|
|
|
|
#define WEAK_ASM_OP "\t.weak\t"
|
2000-02-11 23:31:46 +01:00
|
|
|
/* Define the strings used for the special svr4 .type and .size directives.
|
|
|
|
These strings generally do not vary from one system running svr4 to
|
|
|
|
another, but if a given system (e.g. m88k running svr) needs to use
|
|
|
|
different pseudo-op names for these, they may be overridden in the
|
|
|
|
file which includes this one. */
|
|
|
|
|
|
|
|
|
|
|
|
#undef TYPE_OPERAND_FMT
|
|
|
|
#define TYPE_OPERAND_FMT "@%s"
|
|
|
|
/* The following macro defines the format used to output the second
|
|
|
|
operand of the .type assembler directive. Different svr4 assemblers
|
|
|
|
expect various different forms for this operand. The one given here
|
|
|
|
is just a default. You may need to override it in your machine-
|
|
|
|
specific tm.h file (depending upon the particulars of your assembler). */
|
|
|
|
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
|
|
|
|
do { \
|
|
|
|
ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \
|
|
|
|
ASM_OUTPUT_LABEL (FILE, NAME); \
|
2000-02-11 23:31:46 +01:00
|
|
|
} while (0)
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
|
2000-02-11 23:31:46 +01:00
|
|
|
#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
|
|
|
|
do { \
|
|
|
|
if (!flag_inhibit_size_directive) \
|
defaults.h (ASM_OUTPUT_MEASURED_SIZE): Take only two arguments.
* defaults.h (ASM_OUTPUT_MEASURED_SIZE): Take only two
arguments. Always use ".-symbol" as expression argument.
* doc/tm.texi: Update to match. Document requirement for
".size symbol, .-symbol" to be acceptable to assembler.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/arm/elf.h, config/avr/avr.h, config/cris/aout.h,
config/i386/freebsd-aout.h, config/i386/sco5.h,
config/ip2k/ip2k.h, config/m88k/m88k.h, config/xtensa/elf.h,
config/xtensa/linux.h: Update uses of ASM_OUTPUT_MEASURED_SIZE.
From-SVN: r55820
2002-07-28 20:44:34 +02:00
|
|
|
ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \
|
2000-02-11 23:31:46 +01:00
|
|
|
} while (0)
|
|
|
|
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
|
|
|
|
do { \
|
|
|
|
ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
|
|
|
|
size_directive_output = 0; \
|
|
|
|
if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
|
|
|
|
{ \
|
|
|
|
size_directive_output = 1; \
|
|
|
|
ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, \
|
|
|
|
int_size_in_bytes (TREE_TYPE (DECL))); \
|
|
|
|
} \
|
|
|
|
ASM_OUTPUT_LABEL(FILE, NAME); \
|
2000-02-11 23:31:46 +01:00
|
|
|
} while (0)
|
|
|
|
|
2003-01-26 15:40:22 +01:00
|
|
|
#undef ASM_FINISH_DECLARE_OBJECT
|
2000-02-11 23:31:46 +01:00
|
|
|
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
|
|
|
|
do { \
|
rtl.h (rtunion_def): Constify member `rtstr'.
* rtl.h (rtunion_def): Constify member `rtstr'.
(emit_line_note_after, emit_line_note, emit_line_note_force,
emit_note, decode_asm_operands): Constify.
* cse.c (canon_hash): Likewise.
* dbxout.c (dbxout_block): Likewise.
* diagnostic.c (file_and_line_for_asm, v_error_for_asm,
v_warning_for_asm): Likewise.
* dwarfout.c (function_start_label): Likewise.
* emit-rtl.c (emit_line_note_after, emit_line_note, emit_note,
emit_line_note_force): Likewise.
* final.c (last_filename, asm_insn_count, final_scan_insn,
output_source_line): Likewise.
* function.h (struct emit_status): Likewise.
* gcse.c (hash_expr_1): Likewise.
* genattr.c (gen_attr, main): Likewise.
* genattrtab.c (struct function_unit, current_alternative_string,
write_attr_valueq, n_comma_elts, next_comma_elt, attr_eq,
attr_numeral, check_attr_test, check_attr_value,
convert_set_attr_alternative, convert_set_attr,
compute_alternative_mask, simplify_by_exploding, gen_attr,
gen_unit): Likewise.
* genflags.c (gen_insn): Likewise.
* gengenrtl.c (type_from_format): Likewise.
* genopinit.c (gen_insn): Likewise.
* genoutput.c (n_occurrences, process_template, process_template):
Likewise.
* ggc-page.c (ggc_set_mark, ggc_mark_if_gcable, ggc_get_size):
Likewise.
* ggc-simple.c (ggc_set_mark, ggc_mark_if_gcable, ggc_get_size):
Likewise.
* ggc.h (ggc_mark_string, ggc_mark, ggc_mark_if_gcable,
ggc_set_mark, ggc_get_size): Likewise.
* objc/objc-act.c (build_module_descriptor, finish_objc): Likewise.
* optabs.c (init_one_libfunc): Likewise.
* output.h (assemble_start_function): Likewise.
* recog.c (decode_asm_operands): Likewise.
* toplev.c (rest_of_compilation): Likewise.
* tree.h (emit_line_note_after, emit_line_note,
emit_line_note_force): Likewise.
* varasm.c (asm_output_bss, asm_output_aligned_bss,
asm_emit_uninitialised, assemble_start_function,
assemble_variable, const_hash, compare_constant_1,
find_pool_constant, mark_constant_pool, assemble_alias): Likewise.
* xcoffout.h (DBX_FINISH_SYMBOL): Likewise.
* alpha/alpha.md (call_vms, call_value_vms): Likewise.
* arm/aof.h (ASM_OUTPUT_ASCII): Likewise.
* arm/aout.h (ASM_OUTPUT_ASCII): Likewise.
* arm/arm-protos.h (output_ascii_pseudo_op, arm_dllexport_name_p,
arm_dllimport_name_p): Likewise.
* arm/arm.c (arm_encode_call_attribute, output_ascii_pseudo_op):
Likewise.
* arm/arm.h (ASM_OUTPUT_MI_THUNK): Likewise.
* arm/elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* arm/pe.c (arm_dllexport_name_p, arm_dllimport_name_p,
arm_mark_dllexport, arm_mark_dllimport,
arm_pe_encode_section_info): Likewise.
* arm/telf.h (ASM_OUTPUT_DEF_FROM_DECLS,
ASM_FINISH_DECLARE_OBJECT): Likewise.
* arm/thumb.c (thumb_function_prologue): Likewise.
* arm/thumb.h (ASM_OUTPUT_ASCII): Likewise.
* avr/avr.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* clipper/clix.h (ASM_OUTPUT_ASCII): Likewise.
* fx80/fx80.h (ASM_OUTPUT_ASCII): Likewise.
* i386/cygwin.h (ASM_OUTPUT_SECTION_NAME): Likewise.
* i386/freebsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* i386/i386-interix.h (ASM_OUTPUT_LIMITED_STRING,
ASM_OUTPUT_ASCII, ASM_OUTPUT_SECTION_NAME): Likewise.
* i386/i386-protos.h (asm_output_function_prefix): Likewise.
* i386/i386.c (asm_output_function_prefix): Likewise.
* i386/i386elf.h (ASM_OUTPUT_ASCII): Likewise.
* i386/osfrose.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* i386/ptx4-i.h (ASM_OUTPUT_ASCII): Likewise.
* i386/sco5.h (ASM_FINISH_DECLARE_OBJECT,
ASM_OUTPUT_LIMITED_STRING, ASM_OUTPUT_ASCII,
ASM_OUTPUT_SECTION_NAME): Likewise.
* i386/sysv4.h (ASM_OUTPUT_ASCII): Likewise.
* i860/paragon.h (ASM_OUTPUT_ASCII): Likewise.
* i860/sysv3.h (ASM_OUTPUT_ASCII): Likewise.
* m32r/m32r.c (m32r_encode_section_info): Likewise.
* mcore-elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* mcore/mcore.c (mcore_encode_section_info): Likewise.
* mips/elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* mips/elf64.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* mips/iris6.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* mips/mips.h (ASM_OUTPUT_IDENT): Likewise.
* mips/mips.md (movdi, movsi): Likewise.
* mips/netbsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* netbsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* openbsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise.
* ptx4.h (ASM_FINISH_DECLARE_OBJECT, ASM_OUTPUT_LIMITED_STRING,
ASM_OUTPUT_ASCII): Likewise.
* rs6000/rs6000.c (rs6000_allocate_stack_space, output_epilog,
output_mi_thunk, output_toc): Likewise.
* rs6000/rs6000.md (movsi): Likewise.
* rs6000/sysv4.h (ASM_OUTPUT_INT, ASM_OUTPUT_SECTION_NAME): Likewise.
* tahoe/harris.h (ASM_OUTPUT_ASCII): Likewise.
* v850/v850.c (print_operand, print_operand_address,
v850_encode_data_area): Likewise.
ch:
* grant.c (globalize_decl): Constify a char*.
cp:
* decl2.c (finish_objects): Constify a char*.
* method.c (emit_thunk): Likewise.
From-SVN: r32388
2000-03-07 21:39:10 +01:00
|
|
|
const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
HOST_WIDE_INT size; \
|
2000-02-11 23:31:46 +01:00
|
|
|
if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
|
|
|
|
&& ! AT_END && TOP_LEVEL \
|
|
|
|
&& DECL_INITIAL (DECL) == error_mark_node \
|
|
|
|
&& !size_directive_output) \
|
|
|
|
{ \
|
|
|
|
size_directive_output = 1; \
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
size = int_size_in_bytes (TREE_TYPE (DECL)); \
|
|
|
|
ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \
|
2000-02-11 23:31:46 +01:00
|
|
|
} \
|
|
|
|
} while (0)
|
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
From-SVN: r55735
2002-07-25 07:14:23 +02:00
|
|
|
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define ESCAPES \
|
|
|
|
"\1\1\1\1\1\1\1\1btn\1fr\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
|
|
|
|
\0\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
|
|
|
|
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\\0\0\0\
|
|
|
|
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\
|
|
|
|
\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
|
|
|
|
\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
|
|
|
|
\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
|
|
|
|
\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"
|
|
|
|
/* A table of bytes codes used by the ASM_OUTPUT_ASCII and
|
|
|
|
ASM_OUTPUT_LIMITED_STRING macros. Each byte in the table
|
|
|
|
corresponds to a particular byte value [0..255]. For any
|
|
|
|
given byte value, if the value in the corresponding table
|
|
|
|
position is zero, the given character can be output directly.
|
|
|
|
If the table value is 1, the byte must be output as a \ooo
|
|
|
|
octal escape. If the tables value is anything else, then the
|
|
|
|
byte value should be output as a \ followed by the value
|
|
|
|
in the table. Note that we can use standard UN*X escape
|
|
|
|
sequences for many control characters, but we don't use
|
|
|
|
\a to represent BEL because some svr4 assemblers (e.g. on
|
|
|
|
the i386) don't know about that. Also, we don't use \v
|
|
|
|
since some versions of gas, such as 2.2 did not accept it. */
|
|
|
|
|
|
|
|
#define STRING_LIMIT ((unsigned) 64)
|
2000-09-25 10:42:10 +02:00
|
|
|
#define STRING_ASM_OP "\t.string\t"
|
2000-02-11 23:31:46 +01:00
|
|
|
/* Some svr4 assemblers have a limit on the number of characters which
|
|
|
|
can appear in the operand of a .string directive. If your assembler
|
|
|
|
has such a limitation, you should define STRING_LIMIT to reflect that
|
|
|
|
limit. Note that at least some svr4 assemblers have a limit on the
|
|
|
|
actual number of bytes in the double-quoted string, and that they
|
|
|
|
count each character in an escape sequence as one byte. Thus, an
|
|
|
|
escape sequence like \377 would count as four bytes.
|
|
|
|
|
|
|
|
If your target assembler doesn't support the .string directive, you
|
|
|
|
should define this to zero. */
|
|
|
|
|
* alpha.h, arc.h, arm/aout.h, avr.h, cris.h, d30v.h, dsp16xx.h,
fr30.h, h8300.h, i370.h, i386/sco5.h, i386/unix.h, i960.h, ia64.h,
ip2k.h, m32r.h, mcore.h, mips.h, mn10200.h, mn10300.h, ns32k.h,
openbsd.h, pa/pa-linux.h, pdp11.h, romp.h, rs6000/sysv4.h,
s390/linux.h, sh.h, sparc.h, stormy16.h, v850.h, vax.h, xtensa.h:
(ASM_GLOBALIZE_LABEL): Delete.
(GLOBAL_ASM_OP): Define.
From-SVN: r55892
2002-07-31 04:13:35 +02:00
|
|
|
/* Globalizing directive for a label. */
|
|
|
|
#define GLOBAL_ASM_OP ".global\t"
|
2000-02-11 23:31:46 +01:00
|
|
|
|
2003-01-26 15:40:22 +01:00
|
|
|
#define ASM_WEAKEN_LABEL(FILE, NAME) \
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
do \
|
|
|
|
{ \
|
|
|
|
fputs ("\t.weak\t", (FILE)); \
|
2003-01-26 15:40:22 +01:00
|
|
|
assemble_name ((FILE), (NAME)); \
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
fputc ('\n', (FILE)); \
|
|
|
|
} \
|
|
|
|
while (0)
|
|
|
|
|
|
|
|
#define SUPPORTS_WEAK 1
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
|
2003-06-04 19:33:51 +02:00
|
|
|
sprintf (STRING, "*.%s%lu", PREFIX, (unsigned long)(NUM))
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define HAS_INIT_SECTION 1
|
|
|
|
|
|
|
|
#define REGISTER_NAMES { \
|
|
|
|
"r0","r1","r2","r3","r4","r5","r6","r7", \
|
|
|
|
"r8","r9","r10","r11","r12","r13","r14","r15", \
|
|
|
|
"r16","r17","r18","r19","r20","r21","r22","r23", \
|
|
|
|
"r24","r25","r26","r27","r28","r29","r30","r31", \
|
|
|
|
"__SPL__","__SPH__","argL","argH"}
|
|
|
|
|
|
|
|
#define FINAL_PRESCAN_INSN(insn, operand, nop) final_prescan_insn (insn, operand,nop)
|
|
|
|
|
|
|
|
#define PRINT_OPERAND(STREAM, X, CODE) print_operand (STREAM, X, CODE)
|
|
|
|
|
|
|
|
#define PRINT_OPERAND_PUNCT_VALID_P(CODE) ((CODE) == '~')
|
|
|
|
|
|
|
|
#define PRINT_OPERAND_ADDRESS(STREAM, X) print_operand_address(STREAM, X)
|
|
|
|
|
|
|
|
#define USER_LABEL_PREFIX ""
|
|
|
|
|
2000-09-13 20:13:49 +02:00
|
|
|
#define ASSEMBLER_DIALECT AVR_ENHANCED
|
|
|
|
|
2000-02-11 23:31:46 +01:00
|
|
|
#define ASM_OUTPUT_REG_PUSH(STREAM, REGNO) \
|
|
|
|
{ \
|
|
|
|
if (REGNO > 31) \
|
2001-02-05 05:11:54 +01:00
|
|
|
abort (); \
|
2000-02-11 23:31:46 +01:00
|
|
|
fprintf (STREAM, "\tpush\tr%d", REGNO); \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_REG_POP(STREAM, REGNO) \
|
|
|
|
{ \
|
|
|
|
if (REGNO > 31) \
|
2001-02-05 05:11:54 +01:00
|
|
|
abort (); \
|
2000-02-11 23:31:46 +01:00
|
|
|
fprintf (STREAM, "\tpop\tr%d", REGNO); \
|
|
|
|
}
|
|
|
|
|
2000-11-14 20:05:41 +01:00
|
|
|
#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \
|
2000-11-19 08:10:54 +01:00
|
|
|
avr_output_addr_vec_elt(STREAM, VALUE)
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define ASM_OUTPUT_CASE_LABEL(STREAM, PREFIX, NUM, TABLE) \
|
2002-12-16 19:23:00 +01:00
|
|
|
progmem_section (), (*targetm.asm_out.internal_label) (STREAM, PREFIX, NUM)
|
2000-02-11 23:31:46 +01:00
|
|
|
|
2001-10-19 21:42:46 +02:00
|
|
|
#define ASM_OUTPUT_SKIP(STREAM, N) \
|
2003-06-04 19:33:51 +02:00
|
|
|
fprintf (STREAM, "\t.skip %lu,0\n", (unsigned long)(N))
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define ASM_OUTPUT_ALIGN(STREAM, POWER)
|
|
|
|
|
|
|
|
#define CASE_VECTOR_MODE HImode
|
|
|
|
|
2000-11-14 20:05:41 +01:00
|
|
|
extern int avr_case_values_threshold;
|
|
|
|
|
|
|
|
#define CASE_VALUES_THRESHOLD avr_case_values_threshold
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#undef WORD_REGISTER_OPERATIONS
|
|
|
|
|
|
|
|
#define MOVE_MAX 4
|
|
|
|
|
|
|
|
#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
|
|
|
|
|
|
|
|
#define Pmode HImode
|
|
|
|
|
|
|
|
#define FUNCTION_MODE HImode
|
2004-01-29 08:35:40 +01:00
|
|
|
|
2000-02-11 23:31:46 +01:00
|
|
|
#define DOLLARS_IN_IDENTIFIERS 0
|
|
|
|
|
|
|
|
#define NO_DOLLAR_IN_LABEL 1
|
|
|
|
|
2001-02-05 05:11:54 +01:00
|
|
|
#define TRAMPOLINE_TEMPLATE(FILE) \
|
2001-12-03 20:15:19 +01:00
|
|
|
internal_error ("trampolines not supported")
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define TRAMPOLINE_SIZE 4
|
|
|
|
|
|
|
|
#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
|
|
|
|
{ \
|
arm.c, [...]: Replace "gen_rtx (FOO, " with "gen_rtx_FOO (".
* config/arm/arm.c, config/arm/arm.h, config/arm/arm.md,
config/arm/linux-gas.h, config/arm/netbsd-elf.h,
config/arm/netbsd.h, config/arm/pe.c, config/avr/avr.c,
config/avr/avr.h, config/avr/avr.md, config/c4x/c4x.h,
config/cris/cris.h, config/fr30/fr30.h, config/frv/frv.c,
config/frv/frv.h, config/ip2k/ip2k.c, config/iq2000/iq2000.c,
config/iq2000/iq2000.h, config/m32r/m32r.c,
config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
config/m68hc11/m68hc11.md, config/m68k/m68k.md,
config/mcore/mcore.c, config/mcore/mcore.h,
config/mcore/mcore.md, config/mips/mips.c,
config/ns32k/ns32k.h, config/ns32k/ns32k.md,
config/rs6000/rs6000.c, config/s390/s390.c,
config/s390/s390.md, config/sparc/sparc.c, config/v850/v850.c,
config/xtensa/xtensa.h, config/xtensa/xtensa.md: Replace
"gen_rtx (FOO, " with "gen_rtx_FOO (".
From-SVN: r77080
2004-02-01 22:21:45 +01:00
|
|
|
emit_move_insn (gen_rtx_MEM (HImode, plus_constant ((TRAMP), 2)), CXT); \
|
|
|
|
emit_move_insn (gen_rtx_MEM (HImode, plus_constant ((TRAMP), 6)), FNADDR); \
|
2000-02-11 23:31:46 +01:00
|
|
|
}
|
|
|
|
/* Store in cc_status the expressions
|
|
|
|
that the condition codes will describe
|
|
|
|
after execution of an instruction whose pattern is EXP.
|
|
|
|
Do not alter them if the instruction would not alter the cc's. */
|
|
|
|
|
|
|
|
#define NOTICE_UPDATE_CC(EXP, INSN) notice_update_cc(EXP, INSN)
|
|
|
|
|
|
|
|
/* The add insns don't set overflow in a usable way. */
|
|
|
|
#define CC_OVERFLOW_UNUSABLE 01000
|
|
|
|
/* The mov,and,or,xor insns don't set carry. That's ok though as the
|
|
|
|
Z bit is all we need when doing unsigned comparisons on the result of
|
|
|
|
these insns (since they're always with 0). However, conditions.h has
|
|
|
|
CC_NO_OVERFLOW defined for this purpose. Rename it to something more
|
|
|
|
understandable. */
|
|
|
|
#define CC_NO_CARRY CC_NO_OVERFLOW
|
|
|
|
|
|
|
|
|
|
|
|
/* Output assembler code to FILE to increment profiler label # LABELNO
|
|
|
|
for profiling a function entry. */
|
|
|
|
|
|
|
|
#define FUNCTION_PROFILER(FILE, LABELNO) \
|
|
|
|
fprintf (FILE, "/* profiler %d */", (LABELNO))
|
|
|
|
|
|
|
|
#define ADJUST_INSN_LENGTH(INSN, LENGTH) (LENGTH =\
|
|
|
|
adjust_insn_length (INSN, LENGTH))
|
|
|
|
|
|
|
|
#define TARGET_MEM_FUNCTIONS
|
|
|
|
|
2002-05-29 23:59:08 +02:00
|
|
|
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
|
|
|
|
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
#define CC1_SPEC "%{profile:-p}"
|
2000-02-11 23:31:46 +01:00
|
|
|
|
2002-09-14 10:03:16 +02:00
|
|
|
#define CC1PLUS_SPEC "%{!frtti:-fno-rtti} \
|
|
|
|
%{!fenforce-eh-specs:-fno-enforce-eh-specs} \
|
|
|
|
%{!fexceptions:-fno-exceptions}"
|
2003-09-27 06:48:30 +02:00
|
|
|
/* A C string constant that tells the GCC drvier program options to
|
2002-09-14 10:03:16 +02:00
|
|
|
pass to `cc1plus'. */
|
|
|
|
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
#define ASM_SPEC "%{mmcu=*:-mmcu=%*}"
|
2000-02-11 23:31:46 +01:00
|
|
|
|
2002-06-01 15:47:29 +02:00
|
|
|
#define LINK_SPEC " %{!mmcu*:-m avr2}\
|
|
|
|
%{mmcu=at90s1200|mmcu=attiny1*|mmcu=attiny28:-m avr1} \
|
2002-06-09 20:06:10 +02:00
|
|
|
%{mmcu=attiny22|mmcu=attiny26|mmcu=at90s2*|mmcu=at90s4*|mmcu=at90s8*|mmcu=at90c8*|mmcu=at86rf401:-m avr2}\
|
2002-06-01 15:47:29 +02:00
|
|
|
%{mmcu=atmega103|mmcu=atmega603|mmcu=at43*|mmcu=at76*:-m avr3}\
|
|
|
|
%{mmcu=atmega8*:-m avr4}\
|
|
|
|
%{mmcu=atmega16*|mmcu=atmega32*|mmcu=atmega64|mmcu=atmega128|mmcu=at94k:-m avr5}\
|
2002-06-09 20:06:10 +02:00
|
|
|
%{mmcu=atmega64|mmcu=atmega128|mmcu=atmega162|mmcu=atmega169: -Tdata 0x800100} "
|
2000-02-11 23:31:46 +01:00
|
|
|
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
#define LIB_SPEC \
|
|
|
|
"%{!mmcu=at90s1*:%{!mmcu=attiny1*:%{!mmcu=attiny28: -lc }}}"
|
2000-02-11 23:31:46 +01:00
|
|
|
|
2002-06-02 01:33:47 +02:00
|
|
|
#define LIBSTDCXX "-lgcc"
|
|
|
|
/* No libstdc++ for now. Empty string doesn't work. */
|
|
|
|
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
#define LIBGCC_SPEC \
|
|
|
|
"%{!mmcu=at90s1*:%{!mmcu=attiny1*:%{!mmcu=attiny28: -lgcc }}}"
|
2000-02-11 23:31:46 +01:00
|
|
|
|
|
|
|
#define STARTFILE_SPEC "%(crt_binutils)"
|
|
|
|
|
|
|
|
#define ENDFILE_SPEC ""
|
|
|
|
|
|
|
|
#define CRT_BINUTILS_SPECS "\
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
%{mmcu=at90s1200|mmcu=avr1:crts1200.o%s} \
|
2002-06-01 15:47:29 +02:00
|
|
|
%{mmcu=attiny11:crttn11.o%s} \
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
%{mmcu=attiny12:crttn12.o%s} \
|
|
|
|
%{mmcu=attiny15:crttn15.o%s} \
|
|
|
|
%{mmcu=attiny28:crttn28.o%s} \
|
|
|
|
%{!mmcu*|mmcu=at90s8515|mmcu=avr2:crts8515.o%s} \
|
|
|
|
%{mmcu=at90s2313:crts2313.o%s} \
|
|
|
|
%{mmcu=at90s2323:crts2323.o%s} \
|
|
|
|
%{mmcu=at90s2333:crts2333.o%s} \
|
|
|
|
%{mmcu=at90s2343:crts2343.o%s} \
|
2002-05-11 15:37:05 +02:00
|
|
|
%{mmcu=attiny22:crttn22.o%s} \
|
|
|
|
%{mmcu=attiny26:crttn26.o%s} \
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
%{mmcu=at90s4433:crts4433.o%s} \
|
|
|
|
%{mmcu=at90s4414:crts4414.o%s} \
|
|
|
|
%{mmcu=at90s4434:crts4434.o%s} \
|
|
|
|
%{mmcu=at90c8534:crtc8534.o%s} \
|
|
|
|
%{mmcu=at90s8535:crts8535.o%s} \
|
2002-06-09 20:06:10 +02:00
|
|
|
%{mmcu=at86rf401:crt86401.o%s} \
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
%{mmcu=atmega103|mmcu=avr3:crtm103.o%s} \
|
|
|
|
%{mmcu=atmega603:crtm603.o%s} \
|
2002-01-07 16:04:35 +01:00
|
|
|
%{mmcu=at43usb320:crt43320.o%s} \
|
2002-05-11 15:37:05 +02:00
|
|
|
%{mmcu=at43usb355:crt43355.o%s} \
|
2002-06-01 15:47:29 +02:00
|
|
|
%{mmcu=at76c711:crt76711.o%s} \
|
|
|
|
%{mmcu=atmega8|mmcu=avr4:crtm8.o%s} \
|
2002-05-11 15:37:05 +02:00
|
|
|
%{mmcu=atmega8515:crtm8515.o%s} \
|
2002-06-09 20:06:10 +02:00
|
|
|
%{mmcu=atmega8535:crtm8535.o%s} \
|
2002-01-07 16:04:35 +01:00
|
|
|
%{mmcu=atmega16:crtm16.o%s} \
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
%{mmcu=atmega161|mmcu=avr5:crtm161.o%s} \
|
2002-05-11 15:37:05 +02:00
|
|
|
%{mmcu=atmega162:crtm162.o%s} \
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
%{mmcu=atmega163:crtm163.o%s} \
|
2002-06-09 20:06:10 +02:00
|
|
|
%{mmcu=atmega169:crtm169.o%s} \
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
%{mmcu=atmega32:crtm32.o%s} \
|
2002-01-07 16:04:35 +01:00
|
|
|
%{mmcu=atmega323:crtm323.o%s} \
|
|
|
|
%{mmcu=atmega64:crtm64.o%s} \
|
|
|
|
%{mmcu=atmega128:crtm128.o%s} \
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
%{mmcu=at94k:crtat94k.o%s}"
|
|
|
|
|
2002-05-29 23:59:08 +02:00
|
|
|
#define EXTRA_SPECS {"crt_binutils", CRT_BINUTILS_SPECS},
|
|
|
|
|
avr-protos.h: (avr_output_ascii) Removed.
* config/avr/avr-protos.h: (avr_output_ascii) Removed.
(avr_progmem_p): New prototype.
(output_movsisf): Prototype declaration changed.
(output_movqi): New prototype.
(output_movhi): New prototype.
(call_insn_operand): Likewise.
(final_prescan_insn): Likewise.
(avr_simplify_comparision_p): Likewise.
(avr_normalize_condition): Likewise.
(compare_eq_p): Likewise.
(out_shift_with_cnt): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Prototype declaration changed.
* config/avr/avr.c: (debug_hard_reg_set): Prototype declared.
(ldi_reg_rtx): New. rtx for r31.
(avr_init_stack): Initialize as "__stack".
(function_prologue): Use it.
Replace all TARGET_ENHANCED with AVR_ENHANCED.
(avr_mcu_name): Initialize as "avr2".
(avr_enhanced_p, avr_mega_p): New variables.
(mcu_types, avr_override_options): Handle all known MCU types.
Also handle avr1 (only preprocess, assemble and link).
(print_operand): Using of `%K' in output template removed.
(out_movqi_r_mr): Optimized.
(out_movhi_r_mr): Likewise.
(output_movqi): New function.
(output_movhi): Likewise.
(out_movsi_r_mr): Optimized.
(output_movsisf): Compute insn length for `adjust_insn_length'
(out_movqi_mr_r): Optimized.
(out_movhi_mr_r): Optimized.
(adjust_insn_length): Use output_movsisf, output_movqi,
output_movhi for insn length adjusting.
(reg_unused_after): Use dead_or_set_p.
(preferred_reload_class): Now havn't any restriction.
(reg_was_0): New function.
(io_address_p): Likewise.
(const_int_pow2_p): Likewise.
(output_reload_inhi): Likewise.
(output_reload_insisf): Likewise.
* config/avr/avr.h (MULTILIB_DEFAULTS): Define.
(LIB_SPEC): Use -lc for all supported devices.
(LIBGCC_SPEC): Use -lgcc for all supported devices.
(AVR_MEGA): Define as avr_mega_p.
(AVR_ENHANCED): New, define as avr_enhanced_p.
(TARGET_SWITCHES): Remove -menhanced, now handled by -mmcu=...
(CPP_SPEC, LINK_SPEC): Handle all known MCU types.
(CRT_BINUTILS_SPECS): Handle all known MCU types.
Rename gcrt1-*.o to make file names unique on 8.3 filesystems.
(EXTRA_SPECS): Add CPP_AVR[1-5]_SPEC.
(ASM_SPEC): Pass -mmcu=... to the assembler.
Change all -DAVR_* to -D__AVR_*__.
(INIT_TARGET_OPTABS), config/avr/libgcc.S:
Rename library functions to start with two underscores.
(ASM_OUTPUT_COMMON): Outputs `.comm VAR,VAR-SIZE,1' to avoid
alignment.
(ASM_WEAKEN_LABEL): Declared for __attribute__((weak)).
(SUPPORTS_WEAK): Likewise.
(LDI_REG_REGNO): New. Register r31 will be used as temporary
register for loading constants to r0-r14.
* config/avr/avr.md: Replace all TARGET_ENHANCED with
AVR_ENHANCED.
(*mov_r_sp): Removed. Handled by output_movhi.
(*mov_sp_r): Likewise.
(*mov_sp_r_no_interrupts): Likewise
(*mov_sp_r_tiny): Likewise.
(*movqi): Use output_movqi.
(*reload_inqi): New.
(*movhi): Use output_movhi.
(*reload_inhi): New.
(*negsi2): Optimized.
(*negsf2): Likewise.
Added peepholes (define_peephole2) for loading constants to r0-r14
and for using `cpse' command.
* config/avr/libgcc.S: Rename library functions to start with two
underscores.
Add support for enhanced core.
(_moqhi3): Fix typo, now _modqi3.
(__divsi_raw): Use __zero_reg__ as loop counter, smaller by 1 word.
(__prologue_saves__): Remove test for stack adjust by 0.
(__tablejump__): New.
* config/avr/t-avr: Build libgcc2 with -mcall-prologues.
Add multilib support.
From-SVN: r36047
2000-08-29 21:37:45 +02:00
|
|
|
/* This is the default without any -mmcu=* option (AT90S*). */
|
|
|
|
#define MULTILIB_DEFAULTS { "mmcu=avr2" }
|
|
|
|
|
2000-02-11 23:31:46 +01:00
|
|
|
/* This is undefined macro for collect2 disabling */
|
|
|
|
#define LINKER_NAME "ld"
|
|
|
|
|
|
|
|
#define TEST_HARD_REG_CLASS(CLASS, REGNO) \
|
|
|
|
TEST_HARD_REG_BIT (reg_class_contents[ (int) (CLASS)], REGNO)
|
|
|
|
|
|
|
|
/* Note that the other files fail to use these
|
|
|
|
in some of the places where they should. */
|
|
|
|
|
|
|
|
#if defined(__STDC__) || defined(ALMOST_STDC)
|
|
|
|
#define AS2(a,b,c) #a " " #b "," #c
|
|
|
|
#define AS2C(b,c) " " #b "," #c
|
|
|
|
#define AS3(a,b,c,d) #a " " #b "," #c "," #d
|
|
|
|
#define AS1(a,b) #a " " #b
|
|
|
|
#else
|
|
|
|
#define AS1(a,b) "a b"
|
|
|
|
#define AS2(a,b,c) "a b,c"
|
|
|
|
#define AS2C(b,c) " b,c"
|
|
|
|
#define AS3(a,b,c,d) "a b,c,d"
|
|
|
|
#endif
|
|
|
|
#define OUT_AS1(a,b) output_asm_insn (AS1(a,b), operands)
|
|
|
|
#define OUT_AS2(a,b,c) output_asm_insn (AS2(a,b,c), operands)
|
|
|
|
#define CR_TAB "\n\t"
|
|
|
|
|
|
|
|
/* Temporary register r0 */
|
|
|
|
#define TMP_REGNO 0
|
|
|
|
|
|
|
|
/* zero register r1 */
|
|
|
|
#define ZERO_REGNO 1
|
|
|
|
|
|
|
|
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|