diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2012-01-02 12:51:57 +0000 |
---|---|---|
committer | Georg-Johann Lay <gjl@gcc.gnu.org> | 2012-01-02 12:51:57 +0000 |
commit | 884f56d1e1ee1a31d6ac75c8f3b3989b8118271e (patch) | |
tree | 09faf9ffade22c526948920809d1a98fde9264e0 /libgcc/config | |
parent | 94fae14bf8aa693c31a8d19febfffd048edb9535 (diff) | |
download | gcc-884f56d1e1ee1a31d6ac75c8f3b3989b8118271e.zip gcc-884f56d1e1ee1a31d6ac75c8f3b3989b8118271e.tar.gz gcc-884f56d1e1ee1a31d6ac75c8f3b3989b8118271e.tar.bz2 |
re PR target/51345 ([avr] Devices with 8-bit SP need their own multilib(s))
contrib/
PR target/51345
* gcc_update (files_and_dependencies): Add
gcc/config/avr/t-multilib, gcc/config/avr/multilib.h.
libgcc/
PR target/51345
* config/avr/lib1funcs.S: Remove FIXME comments.
(SPEED_DIV): Depend on __AVR_HAVE_8BIT_SP__.
gcc/
PR target/51345
* config.gcc (tm_file target=avr]): Add avr/avr-multilib.h
(tmake_file target=avr): Add avr/t-multilib.
* config/avr/avr-c.c (avr_cpu_cpp_builtins): Use AVR_HAVE_8BIT_SP
to built-in define __AVR_HAVE_8BIT_SP__, __AVR_HAVE_16BIT_SP__.
* config/avr/genmultilib.awk: New file.
* config/avr/t-multilib: New auto-generated file.
* config/avr/multilib.h: New auto-generated file.
* config/avr/t-avr (AVR_MCUS): New variable.
(genopt.sh): Use it.
(s-mlib): Depend on t-multilib.
(t-multilib, multilib.h): New dependencies.
(s-avr-mlib): New rule to build t-multilib, multilib.h from AVR_MCUS.
(MULTILIB_OPTIONS): Remove.
(MULTILIB_MATCHES): Remove.
(MULTILIB_DIRNAMES): Remove.
(MULTILIB_EXCEPTIONS): Remove:
* config/avr/genopt.sh: Don't use hard coded file name;
pass AVR_MCUS from t-avr instead.
From-SVN: r182797
Diffstat (limited to 'libgcc/config')
-rw-r--r-- | libgcc/config/avr/lib1funcs.S | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/libgcc/config/avr/lib1funcs.S b/libgcc/config/avr/lib1funcs.S index f7f0865..b519993 100644 --- a/libgcc/config/avr/lib1funcs.S +++ b/libgcc/config/avr/lib1funcs.S @@ -1253,11 +1253,12 @@ ENDF __divmodsi4 ;; Use Speed-optimized Version on "big" Devices, i.e. Devices with ;; at least 16k of Program Memory. For smaller Devices, depend -;; on MOVW. +;; on MOVW and SP Size. There is a Connexion between SP Size and +;; Flash Size so that SP Size can be used to test for Flash Size. #if defined (__AVR_HAVE_JMP_CALL__) # define SPEED_DIV 8 -#elif defined (__AVR_HAVE_MOVW__) +#elif defined (__AVR_HAVE_MOVW__) && !defined (__AVR_HAVE_8BIT_SP__) # define SPEED_DIV 16 #else # define SPEED_DIV 0 @@ -1540,9 +1541,6 @@ DEFUN __divdi3_moddi3 4: ;; Epilogue: Restore the Z = 12 Registers and return in r28, __SP_L__ #if defined (__AVR_HAVE_8BIT_SP__) -;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level -;; so this lines are dead code. To make it work, devices without -;; SP_H must get their own multilib(s). clr r29 #else in r29, __SP_H__ @@ -1694,9 +1692,6 @@ DEFUN __prologue_saves__ push r28 push r29 #if defined (__AVR_HAVE_8BIT_SP__) -;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level -;; so this lines are dead code. To make it work, devices without -;; SP_H must get their own multilib(s). in r28,__SP_L__ sub r28,r26 out __SP_L__,r28 @@ -1746,9 +1741,6 @@ DEFUN __epilogue_restores__ ldd r17,Y+3 ldd r26,Y+2 #if defined (__AVR_HAVE_8BIT_SP__) -;; FIXME: __AVR_HAVE_8BIT_SP__ is set on device level, not on core level -;; so this lines are dead code. To make it work, devices without -;; SP_H must get their own multilib(s). ldd r29,Y+1 add r28,r30 out __SP_L__,r28 |