m32r.h (BIG_ENDIAN_BIT): Deleted to fix endian bug.

* config/m32r/m32r.h (BIG_ENDIAN_BIT): Deleted to fix endian bug.
(TARGET_LITTLE_ENDIAN, TARGET_BIG_ENDIAN, TARGET_DEFAULT): Changed. Ditto.
(LITTLE_ENDIAN_BIT, TARGET_CPU_DEFAULT,	TARGET_ENDIAN_DEFAULT): Added. Ditto.
* config/m32r/little.h (TARGET_LITTLE_ENDIAN): Deleted.
(TARGET_ENDIAN_DEFAULT): Added.

From-SVN: r80747
This commit is contained in:
Kazuhiro Inaoka 2004-04-16 10:30:32 +00:00 committed by Nick Clifton
parent af55af57e1
commit 8a897efe7a
3 changed files with 26 additions and 10 deletions

View File

@ -1,3 +1,14 @@
2004-04-16 Kazuhiro Inaoka <inaoka dot kazuhiro at renesas dot com>
* config/m32r/m32r.h (BIG_ENDIAN_BIT): Deleted to fix endian
bug.
(TARGET_LITTLE_ENDIAN, TARGET_BIG_ENDIAN,
TARGET_DEFAULT): Changed. Ditto.
(LITTLE_ENDIAN_BIT, TARGET_CPU_DEFAULT,
TARGET_ENDIAN_DEFAULT): Added. Ditto.
* config/m32r/little.h (TARGET_LITTLE_ENDIAN): Deleted.
(TARGET_ENDIAN_DEFAULT): Added.
2004-04-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2004-04-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* builtins.def (BUILT_IN_ISDIGIT, BUILT_IN_ISXDIGIT): Mark with * builtins.def (BUILT_IN_ISDIGIT, BUILT_IN_ISXDIGIT): Mark with

View File

@ -1,5 +1,5 @@
/* Definitions for Renesas little endian M32R cpu. /* Definitions for Renesas little endian M32R cpu.
Copyright (C) 2003 Copyright (C) 2003, 2004
Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
@ -19,7 +19,7 @@
Free Software Foundation, 59 Temple Place - Suite 330, Boston, Free Software Foundation, 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */ MA 02111-1307, USA. */
#define TARGET_LITTLE_ENDIAN (!TARGET_BIG_ENDIAN) #define TARGET_ENDIAN_DEFAULT LITTLE_ENDIAN_BIT
#define CPP_ENDIAN_SPEC \ #define CPP_ENDIAN_SPEC \
" %{mbe:-D__BIG_ENDIAN__} %{mbig-endian:-D__BIG_ENDIAN__}" \ " %{mbe:-D__BIG_ENDIAN__} %{mbig-endian:-D__BIG_ENDIAN__}" \

View File

@ -246,14 +246,19 @@ extern int target_flags;
#undef TARGET_M32R #undef TARGET_M32R
#define TARGET_M32R (! TARGET_M32RX && ! TARGET_M32R2) #define TARGET_M32R (! TARGET_M32RX && ! TARGET_M32R2)
/* Big Endian Flag. */
#define BIG_ENDIAN_BIT (1 << 7)
#define TARGET_BIG_ENDIAN (target_flags & BIG_ENDIAN_BIT)
/* Little Endian Flag. */ /* Little Endian Flag. */
#define LITTLE_ENDIAN_BIT (1 << 8) #define LITTLE_ENDIAN_BIT (1 << 7)
#ifndef TARGET_LITTLE_ENDIAN /* See little.h */ #define TARGET_LITTLE_ENDIAN (target_flags & LITTLE_ENDIAN_BIT)
#define TARGET_LITTLE_ENDIAN (target_flags & LITTLE_ENDIAN_BIT) #define TARGET_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
/* This defaults us to big-endian. */
#ifndef TARGET_ENDIAN_DEFAULT
#define TARGET_ENDIAN_DEFAULT 0
#endif
/* This defaults us to m32r. */
#ifndef TARGET_CPU_DEFAULT
#define TARGET_CPU_DEFAULT 0
#endif #endif
/* Macro to define tables used to set the flags. /* Macro to define tables used to set the flags.
@ -267,7 +272,7 @@ extern int target_flags;
#endif #endif
#ifndef TARGET_DEFAULT #ifndef TARGET_DEFAULT
#define TARGET_DEFAULT 0 #define TARGET_DEFAULT (TARGET_CPU_DEFAULT | TARGET_ENDIAN_DEFAULT)
#endif #endif
#define TARGET_SWITCHES \ #define TARGET_SWITCHES \