From 7fd6378ef41d6b6dd820036b5a100d99368060aa Mon Sep 17 00:00:00 2001 From: Georg-Johann Lay Date: Wed, 28 Mar 2012 08:31:26 +0000 Subject: re PR target/52737 ([avr]: -mtiny-stack shall not influence multilib selection) PR target/52737 * contrib/gcc_update (files_and_dependencies): Remove gcc/config/avr/t-multilib from touch data. gcc/ PR target/52737 * config.gcc (tm_file): Remove avr/multilib.h. * doc/invoke.texi (AVR Options): Adjust documentation of -mtiny-stack. * config/avr/genmultilib.awk: Remove code to generate multilib.h. (BEGIN): Use -msp8 as multilib option instead of -mtiny-stack. * config/avr/t-avr: Remove generation of multilib.h. * config/avr/t-multilib: Regenerate. * config/avr/multilib.h: Remove. * config/avr/avr.opt (-msp8): New option. (avr_sp8): New variable. * config/avr/driver-avr.c (avr_device_to_sp8): New function. * config/avr/avr.h (AVR_HAVE_SPH): New define. (AVR_HAVE_8BIT_SP): Also set by avr_sp8 i.e. -msp8. (avr_device_to_sp8): New prototype. (EXTRA_SPEC_FUNCTIONS): Add { "device_to_sp8", avr_device_to_sp8 } (DRIVER_SELF_SPECS): New define. * config/avr/avr-c.c (avr_cpu_cpp_builtins): New built-in defines: __AVR_SP8__, __AVR_HAVE_SPH__. * config/avr/avr.c (output_movhi): Use AVR_HAVE_SPH instead of AVR_HAVE_8BIT_SP to decide if SP_H is present. (avr_file_start): Ditto. libgcc/ PR target/52737 * config/avr/lib1funcs.S: Use __AVR_HAVE_SPH__ for SP_H checks instead of __AVR_HAVE_8BIT_SP__. From-SVN: r185907 --- libgcc/ChangeLog | 6 ++++++ libgcc/config/avr/lib1funcs.S | 14 ++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index be35f81..5efe950 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2012-03-28 Georg-Johann Lay + + PR target/52737 + * config/avr/lib1funcs.S: Use __AVR_HAVE_SPH__ for SP_H checks + instead of __AVR_HAVE_8BIT_SP__. + 2012-03-26 Tristan Gingold * config/ia64/unwind-ia64.h: Declare unw_word and unw_sword. diff --git a/libgcc/config/avr/lib1funcs.S b/libgcc/config/avr/lib1funcs.S index 9bd235b..95a7d3d 100644 --- a/libgcc/config/avr/lib1funcs.S +++ b/libgcc/config/avr/lib1funcs.S @@ -25,7 +25,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define __zero_reg__ r1 #define __tmp_reg__ r0 #define __SREG__ 0x3f +#if defined (__AVR_HAVE_SPH__) #define __SP_H__ 0x3e +#endif #define __SP_L__ 0x3d #define __RAMPZ__ 0x3B #define __EIND__ 0x3C @@ -1258,7 +1260,7 @@ ENDF __divmodsi4 #if defined (__AVR_HAVE_JMP_CALL__) # define SPEED_DIV 8 -#elif defined (__AVR_HAVE_MOVW__) && !defined (__AVR_HAVE_8BIT_SP__) +#elif defined (__AVR_HAVE_MOVW__) && defined (__AVR_HAVE_SPH__) # define SPEED_DIV 16 #else # define SPEED_DIV 0 @@ -1540,10 +1542,10 @@ DEFUN __divdi3_moddi3 4: ;; Epilogue: Restore the Z = 12 Registers and return in r28, __SP_L__ -#if defined (__AVR_HAVE_8BIT_SP__) - clr r29 -#else +#if defined (__AVR_HAVE_SPH__) in r29, __SP_H__ +#else + clr r29 #endif /* #SP = 8/16 */ ldi r30, 12 XJMP __epilogue_restores__ + ((18 - 12) * 2) @@ -1691,7 +1693,7 @@ DEFUN __prologue_saves__ push r17 push r28 push r29 -#if defined (__AVR_HAVE_8BIT_SP__) +#if !defined (__AVR_HAVE_SPH__) in r28,__SP_L__ sub r28,r26 out __SP_L__,r28 @@ -1747,7 +1749,7 @@ DEFUN __epilogue_restores__ ldd r16,Y+4 ldd r17,Y+3 ldd r26,Y+2 -#if defined (__AVR_HAVE_8BIT_SP__) +#if !defined (__AVR_HAVE_SPH__) ldd r29,Y+1 add r28,r30 out __SP_L__,r28 -- cgit v1.1