diff options
author | gjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-07-10 09:49:18 +0000 |
---|---|---|
committer | gjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-07-10 09:49:18 +0000 |
commit | 056f86e82edf33c2818bcdf665c7c8435ae39fd3 (patch) | |
tree | fba252f8ceeea7879e3cf77eb3f76b8cb5e262d0 /gcc/configure | |
parent | f25d7d1e5a0cff80eee68b9b0f7f1c019a0019a9 (diff) | |
download | gcc-056f86e82edf33c2818bcdf665c7c8435ae39fd3.tar.gz |
gcc/
Better ISR prologues by supporting GASes __gcc_isr pseudo insn.
PR target/20296
PR target/81268
* configure.ac [target=avr]: Add GAS check for -mgcc-isr.
(HAVE_AS_AVR_MGCCISR_OPTION): If so, AC_DEFINE it.
* config.in: Regenerate.
* configure: Regenerate.
* doc/extend.texi (AVR Function Attributes) <no_gccisr>: Document it.
* doc/invoke.texi (AVR Options) <-mgas-isr-prologues>: Document it.
* config/avr/avr.opt (-mgas-isr-prologues): New option and...
(TARGET_GASISR_PROLOGUES): ...target mask.
* common/config/avr/avr-common.c
(avr_option_optimization_table) [OPT_LEVELS_1_PLUS_NOT_DEBUG]:
Set -mgas-isr-prologues.
* config/avr/avr-passes.def (avr_pass_pre_proep): Add
INSERT_PASS_BEFORE for it.
* config/avr/avr-protos.h (make_avr_pass_pre_proep): New proto.
* config/avr/avr.c (avr_option_override)
[!HAVE_AS_AVR_MGCCISR_OPTION]: Unset TARGET_GASISR_PROLOGUES.
(avr_no_gccisr_function_p, avr_hregs_split_reg): New static functions.
(avr_attribute_table) <no_gccisr>: Add new function attribute.
(avr_set_current_function) <is_no_gccisr>: Init machine field.
(avr_pass_data_pre_proep, avr_pass_pre_proep): New pass data
and rtl_opt_pass.
(make_avr_pass_pre_proep): New function.
(emit_push_sfr) <treg>: Add argument to function and use it
instead of TMP_REG.
(avr_expand_prologue) [machine->gasisr.maybe]: Emit gasisr insn
and set machine->gasisr.yes.
(avr_expand_epilogue) [machine->gasisr.yes]: Similar.
(avr_asm_function_end_prologue) [machine->gasisr.yes]: Add
__gcc_isr.n_pushed to .L__stack_usage.
(TARGET_ASM_FINAL_POSTSCAN_INSN): Define to...
(avr_asm_final_postscan_insn): ...this new static function.
* config/avr/avr.h (machine_function)
<is_no_gccisr, use_L__stack_usage>: New fields.
<gasisr, gasisr.yes, gasisr.maybe, gasisr.regno>: New fields.
* config/avr/avr.md (UNSPECV_GASISR): Add unspecv enum.
(GASISR_Prologue, GASISR_Epilogue, GASISR_Done): New define_constants.
(gasisr, *gasisr): New expander and insn.
* config/avr/gen-avr-mmcu-specs.c (print_mcu)
[HAVE_AS_AVR_MGCCISR_OPTION]: Print asm_gccisr spec.
* config/avr/specs.h (ASM_SPEC) <asm_gccisr>: Add sub spec.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250093 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/gcc/configure b/gcc/configure index 893f9587efa..98aa62c00be 100755 --- a/gcc/configure +++ b/gcc/configure @@ -24820,6 +24820,42 @@ $as_echo "#define HAVE_AS_AVR_MRMW_OPTION 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for __gcc_isr pseudo instruction" >&5 +$as_echo_n "checking assembler for __gcc_isr pseudo instruction... " >&6; } +if test "${gcc_cv_as_avr_mgccisr+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + gcc_cv_as_avr_mgccisr=no + if test x$gcc_cv_as != x; then + $as_echo '.text + __gcc_isr 1 + __gcc_isr 2 + __gcc_isr 0,r24 + ' > conftest.s + if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mgcc-isr -o conftest.o conftest.s >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then + gcc_cv_as_avr_mgccisr=yes + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_avr_mgccisr" >&5 +$as_echo "$gcc_cv_as_avr_mgccisr" >&6; } +if test $gcc_cv_as_avr_mgccisr = yes; then + +$as_echo "#define HAVE_AS_AVR_MGCCISR_OPTION 1" >>confdefs.h + +fi + + # Check how default linker description file implements .rodata for # avrxmega3 (PR21472). avr-gcc assumes .rodata is *not* loaded to # RAM so avr-gcc skips __do_copy_data for .rodata objects. @@ -25282,6 +25318,7 @@ $as_echo "#define HAVE_AS_SPARC5_VIS4 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for SPARC6 instructions" >&5 $as_echo_n "checking assembler for SPARC6 instructions... " >&6; } if test "${gcc_cv_as_sparc_sparc6+set}" = set; then : @@ -25318,6 +25355,7 @@ $as_echo "#define HAVE_AS_SPARC6 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for LEON instructions" >&5 $as_echo_n "checking assembler for LEON instructions... " >&6; } if test "${gcc_cv_as_sparc_leon+set}" = set; then : |