diff options
author | Anatoly Sokolov <aesok@post.ru> | 2007-01-17 21:42:58 +0300 |
---|---|---|
committer | Anatoly Sokolov <aesok@gcc.gnu.org> | 2007-01-17 21:42:58 +0300 |
commit | dd6d1f8c3f8cd06fa2aa436de20a88c46a84d33c (patch) | |
tree | 5308ef5b9dccfd7d6ce87c837a5fad63b801fa09 /gcc/config/avr/avr.c | |
parent | efb7e1e02617b779d8bd376d9dcccd0cdb4d3a94 (diff) | |
download | gcc-dd6d1f8c3f8cd06fa2aa436de20a88c46a84d33c.zip gcc-dd6d1f8c3f8cd06fa2aa436de20a88c46a84d33c.tar.gz gcc-dd6d1f8c3f8cd06fa2aa436de20a88c46a84d33c.tar.bz2 |
avr.h (AVR_HAVE_LPMX): New macro.
* config/avr/avr.h (AVR_HAVE_LPMX): New macro.
(AVR_ENHANCED): Rename to ...
(AVR_HAVE_MUL): ... new.
(avr_enhanced_p): Rename to ...
(avr_have_mul_p): ... new.
(TARGET_CPU_CPP_BUILTINS): Use 'avr_have_mul_p' instead of
'avr_enhanced_p' for "__AVR_ENHANCED__". Define "__AVR_HAVE_MUL__".
* config/avr/avr.c (avr_enhanced_p): Rename to ...
(avr_have_mul_p): ... new.
(base_arch_s): Rename 'enhanced' to 'have_mul'.
(avr_override_options): Use 'avr_have_mul_p' and 'have_mul' instead of
'avr_enhanced_p' and 'enhanced'.
(ashlhi3_out, ashrhi3_out, lshrhi3_out, avr_rtx_costs): Use
AVR_HAVE_MUL instead of AVR_ENHANCED.
* avr.md (*tablejump_enh): Use AVR_HAVE_LPMX instead of AVR_ENHANCED.
(mulqi3, *mulqi3_enh, *mulqi3_call, mulqihi3, umulqihi3, mulhi3,
*mulhi3_enh, *mulhi3_call, mulsi3, *mulsi3_call): Use AVR_HAVE_MUL
instead of AVR_ENHANCED.
(*tablejump_enh): Use AVR_HAVE_LPMX instead of AVR_ENHANCED.
* libgcc.S: Use __AVR_HAVE_MUL__ instead of __AVR_ENHANCED__.
(__tablejump__): Use __AVR_HAVE_LPMX__ instead of __AVR_ENHANCED__.
From-SVN: r120865
Diffstat (limited to 'gcc/config/avr/avr.c')
-rw-r--r-- | gcc/config/avr/avr.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 41142a4..d222a53 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -120,8 +120,8 @@ section *progmem_section; /* More than 8K of program memory: use "call" and "jmp". */ int avr_mega_p = 0; -/* Enhanced core: use "movw", "mul", ... */ -int avr_enhanced_p = 0; +/* Core have 'MUL*' instructions. */ +int avr_have_mul_p = 0; /* Assembler only. */ int avr_asm_only_p = 0; @@ -131,7 +131,7 @@ int avr_have_movw_lpmx_p = 0; struct base_arch_s { int asm_only; - int enhanced; + int have_mul; int mega; int have_movw_lpmx; const char *const macro; @@ -324,7 +324,7 @@ avr_override_options (void) base = &avr_arch_types[t->arch]; avr_asm_only_p = base->asm_only; - avr_enhanced_p = base->enhanced; + avr_have_mul_p = base->have_mul; avr_mega_p = base->mega; avr_have_movw_lpmx_p = base->have_movw_lpmx; avr_base_arch_macro = base->macro; @@ -3170,7 +3170,7 @@ ashlhi3_out (rtx insn, rtx operands[], int *len) AS1 (lsl,%B0) CR_TAB AS2 (andi,%B0,0xe0)); } - if (AVR_ENHANCED && scratch) + if (AVR_HAVE_MUL && scratch) { *len = 5; return (AS2 (ldi,%3,0x20) CR_TAB @@ -3191,7 +3191,7 @@ ashlhi3_out (rtx insn, rtx operands[], int *len) AS2 (ldi,%3,0xe0) CR_TAB AS2 (and,%B0,%3)); } - if (AVR_ENHANCED) + if (AVR_HAVE_MUL) { *len = 6; return ("set" CR_TAB @@ -3211,7 +3211,7 @@ ashlhi3_out (rtx insn, rtx operands[], int *len) AS1 (lsl,%B0)); case 14: - if (AVR_ENHANCED && ldi_ok) + if (AVR_HAVE_MUL && ldi_ok) { *len = 5; return (AS2 (ldi,%B0,0x40) CR_TAB @@ -3220,7 +3220,7 @@ ashlhi3_out (rtx insn, rtx operands[], int *len) AS1 (clr,%A0) CR_TAB AS1 (clr,__zero_reg__)); } - if (AVR_ENHANCED && scratch) + if (AVR_HAVE_MUL && scratch) { *len = 5; return (AS2 (ldi,%3,0x40) CR_TAB @@ -3500,7 +3500,7 @@ ashrhi3_out (rtx insn, rtx operands[], int *len) AS1 (asr,%A0)); case 11: - if (AVR_ENHANCED && ldi_ok) + if (AVR_HAVE_MUL && ldi_ok) { *len = 5; return (AS2 (ldi,%A0,0x20) CR_TAB @@ -3520,7 +3520,7 @@ ashrhi3_out (rtx insn, rtx operands[], int *len) AS1 (asr,%A0)); case 12: - if (AVR_ENHANCED && ldi_ok) + if (AVR_HAVE_MUL && ldi_ok) { *len = 5; return (AS2 (ldi,%A0,0x10) CR_TAB @@ -3541,7 +3541,7 @@ ashrhi3_out (rtx insn, rtx operands[], int *len) AS1 (asr,%A0)); case 13: - if (AVR_ENHANCED && ldi_ok) + if (AVR_HAVE_MUL && ldi_ok) { *len = 5; return (AS2 (ldi,%A0,0x08) CR_TAB @@ -3947,7 +3947,7 @@ lshrhi3_out (rtx insn, rtx operands[], int *len) AS1 (lsr,%A0) CR_TAB AS2 (andi,%A0,0x07)); } - if (AVR_ENHANCED && scratch) + if (AVR_HAVE_MUL && scratch) { *len = 5; return (AS2 (ldi,%3,0x08) CR_TAB @@ -3968,7 +3968,7 @@ lshrhi3_out (rtx insn, rtx operands[], int *len) AS2 (ldi,%3,0x07) CR_TAB AS2 (and,%A0,%3)); } - if (AVR_ENHANCED) + if (AVR_HAVE_MUL) { *len = 6; return ("set" CR_TAB @@ -3988,7 +3988,7 @@ lshrhi3_out (rtx insn, rtx operands[], int *len) AS1 (lsr,%A0)); case 14: - if (AVR_ENHANCED && ldi_ok) + if (AVR_HAVE_MUL && ldi_ok) { *len = 5; return (AS2 (ldi,%A0,0x04) CR_TAB @@ -3997,7 +3997,7 @@ lshrhi3_out (rtx insn, rtx operands[], int *len) AS1 (clr,%B0) CR_TAB AS1 (clr,__zero_reg__)); } - if (AVR_ENHANCED && scratch) + if (AVR_HAVE_MUL && scratch) { *len = 5; return (AS2 (ldi,%3,0x04) CR_TAB @@ -4983,7 +4983,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total) switch (mode) { case QImode: - if (AVR_ENHANCED) + if (AVR_HAVE_MUL) *total = COSTS_N_INSNS (optimize_size ? 3 : 4); else if (optimize_size) *total = COSTS_N_INSNS (AVR_MEGA ? 2 : 1); @@ -4991,7 +4991,7 @@ avr_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total) return false; case HImode: - if (AVR_ENHANCED) + if (AVR_HAVE_MUL) *total = COSTS_N_INSNS (optimize_size ? 7 : 10); else if (optimize_size) *total = COSTS_N_INSNS (AVR_MEGA ? 2 : 1); |