This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[AVR] Set AVR35 architecture for atmega103 device, define __AVR_HAVE_EIJMP_EICALL__ macro
- From: Anatoly Sokolov <aesok at post dot ru>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: aesok <aesok at post dot ru>, eweddington at cso dot atmel dot com
- Date: Tue, 8 Apr 2008 10:53:19 +0400
- Subject: [AVR] Set AVR35 architecture for atmega103 device, define __AVR_HAVE_EIJMP_EICALL__ macro
Hello
This patch fix two bug in AVR backend:
1. Set AVR35 architecture for atmega103 device;
2. Define _AVR_HAVE_EIJMP_EICALL__ macro if device have EIJMP and EICALL
instructions.
Committed to mainline.
2008-04-08 Anatoly Sokolov <aesok@post.ru>
* config/avr/avr.h (TARGET_CPU_CPP_BUILTINS): Define
__AVR_HAVE_EIJMP_EICALL__ macro if device have EIJMP and EICALL
instructions.
* config/avr/avr.c (avr_mcu_types): Set AVR35 architecture for
atmega103 device
Index: gcc/config/avr/avr.c
===================================================================
--- gcc/config/avr/avr.c (revision 134007)
+++ gcc/config/avr/avr.c (working copy)
@@ -200,7 +200,7 @@
{ "at76c711", ARCH_AVR3, "__AVR_AT76C711__" },
/* Classic, == 128K. */
{ "avr31", ARCH_AVR31, NULL },
- { "atmega103", ARCH_AVR3, "__AVR_ATmega103__" },
+ { "atmega103", ARCH_AVR31, "__AVR_ATmega103__" },
/* Classic + MOVW + JMP/CALL. */
{ "avr35", ARCH_AVR35, NULL },
{ "at90usb82", ARCH_AVR35, "__AVR_AT90USB82__" },
Index: gcc/config/avr/avr.h
===================================================================
--- gcc/config/avr/avr.h (revision 134007)
+++ gcc/config/avr/avr.h (working copy)
@@ -82,7 +82,7 @@
builtin_define ("__AVR_HAVE_JMP_CALL__"); \
if (avr_current_arch->have_eijmp_eicall) \
{ \
- builtin_define ("__AVR_HAVE_JMP_CALL__"); \
+ builtin_define ("__AVR_HAVE_EIJMP_EICALL__"); \
builtin_define ("__AVR_3_BYTE_PC__"); \
} \
else \
Anatoly.