From 1ac72f0659d64d6a14da862242db0d841d2878d0 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 2 Jan 2016 17:46:16 -0500 Subject: [PATCH] sim: convert to bfd_endian Rather than re-invent endian defines, as well as maintain our own list of OS & arch-specific includes, punt all that logic in favor of the bfd ones already set up and maintained elsewhere. We already rely on the bfd library, so leveraging the endian aspect should be fine. --- sim/aarch64/ChangeLog | 4 + sim/aarch64/configure | 34 +++--- sim/arm/ChangeLog | 5 + sim/arm/configure | 34 +++--- sim/arm/wrapper.c | 2 +- sim/avr/ChangeLog | 6 + sim/avr/configure | 36 +++--- sim/avr/configure.ac | 2 +- sim/bfin/ChangeLog | 6 + sim/bfin/configure | 36 +++--- sim/bfin/configure.ac | 2 +- sim/common/ChangeLog | 41 +++++++ sim/common/acinclude.m4 | 34 +++--- sim/common/cgen-ops.h | 10 +- sim/common/nrun.c | 2 +- sim/common/sim-config.c | 44 ++++---- sim/common/sim-config.h | 190 +++----------------------------- sim/common/sim-endian.c | 8 +- sim/common/sim-events.c | 12 +- sim/common/sim-events.h | 6 +- sim/common/sim-n-core.h | 4 +- sim/common/sim-n-endian.h | 10 +- sim/common/sim-options.c | 8 +- sim/cr16/ChangeLog | 6 + sim/cr16/configure | 36 +++--- sim/cr16/configure.ac | 2 +- sim/cris/ChangeLog | 7 ++ sim/cris/arch.h | 2 - sim/cris/configure | 36 +++--- sim/cris/configure.ac | 2 +- sim/d10v/ChangeLog | 4 + sim/d10v/configure | 34 +++--- sim/erc32/ChangeLog | 4 + sim/erc32/configure | 12 +- sim/frv/ChangeLog | 9 ++ sim/frv/arch.h | 2 - sim/frv/configure | 36 +++--- sim/frv/configure.ac | 2 +- sim/frv/frv.c | 4 +- sim/ft32/ChangeLog | 6 + sim/ft32/configure | 36 +++--- sim/ft32/configure.ac | 2 +- sim/h8300/ChangeLog | 5 + sim/h8300/configure | 24 ++-- sim/h8300/configure.ac | 2 +- sim/iq2000/ChangeLog | 6 + sim/iq2000/arch.h | 2 - sim/iq2000/configure | 36 +++--- sim/iq2000/configure.ac | 2 +- sim/lm32/ChangeLog | 6 + sim/lm32/arch.h | 2 - sim/lm32/configure | 36 +++--- sim/lm32/configure.ac | 2 +- sim/m32r/ChangeLog | 9 ++ sim/m32r/arch.h | 2 - sim/m32r/configure | 36 +++--- sim/m32r/configure.ac | 2 +- sim/m32r/traps-linux.c | 4 +- sim/m68hc11/ChangeLog | 5 + sim/m68hc11/configure | 36 +++--- sim/m68hc11/configure.ac | 2 +- sim/mcore/ChangeLog | 4 + sim/mcore/configure | 34 +++--- sim/microblaze/ChangeLog | 4 + sim/microblaze/configure | 34 +++--- sim/mips/ChangeLog | 7 ++ sim/mips/configure | 52 ++++----- sim/mips/configure.ac | 16 +-- sim/mips/sim-main.h | 2 +- sim/mn10300/ChangeLog | 6 + sim/mn10300/configure | 36 +++--- sim/mn10300/configure.ac | 2 +- sim/moxie/ChangeLog | 5 + sim/moxie/configure | 36 +++--- sim/moxie/configure.ac | 2 +- sim/msp430/ChangeLog | 6 + sim/msp430/configure | 24 ++-- sim/msp430/configure.ac | 2 +- sim/sh/ChangeLog | 7 ++ sim/sh/configure | 34 +++--- sim/sh/interp.c | 4 +- sim/sh64/ChangeLog | 6 + sim/sh64/arch.h | 2 - sim/sh64/configure | 36 +++--- sim/sh64/configure.ac | 2 +- sim/testsuite/ChangeLog | 5 + sim/testsuite/common/bits-gen.c | 2 +- sim/v850/ChangeLog | 6 + sim/v850/configure | 36 +++--- sim/v850/configure.ac | 2 +- 90 files changed, 712 insertions(+), 699 deletions(-) diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog index fbbf562c44c..b16bb612f86 100644 --- a/sim/aarch64/ChangeLog +++ b/sim/aarch64/ChangeLog @@ -1,3 +1,7 @@ +2016-01-02 Mike Frysinger + + * configure: Regenerate. + 2015-12-27 Mike Frysinger * interp.c (sim_dis_read): Change private_data to application_data. diff --git a/sim/aarch64/configure b/sim/aarch64/configure index d909324e33b..219d770063c 100755 --- a/sim/aarch64/configure +++ b/sim/aarch64/configure @@ -12917,26 +12917,26 @@ default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12946,10 +12946,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13010,9 +13010,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13246,12 +13246,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index 024f52e03ce..f6989e95a3f 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,8 @@ +2016-01-02 Mike Frysinger + + * configure: Regenerate. + * wrapper.c (init): Change BIG_ENDIAN to BFD_ENDIAN_BIG. + 2015-12-30 Mike Frysinger * wrapper.c (sim_store_register): Rename to ... diff --git a/sim/arm/configure b/sim/arm/configure index d46ffcb66b0..3fd5d8c10c7 100755 --- a/sim/arm/configure +++ b/sim/arm/configure @@ -12917,26 +12917,26 @@ default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12946,10 +12946,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13006,9 +13006,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13242,12 +13242,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c index 81fb21f0fe7..3938f3ce5fd 100644 --- a/sim/arm/wrapper.c +++ b/sim/arm/wrapper.c @@ -140,7 +140,7 @@ init (void) { ARMul_EmulateInit (); state = ARMul_NewState (); - state->bigendSig = (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN ? HIGH : LOW); + state->bigendSig = (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? HIGH : LOW); ARMul_MemoryInit (state, mem_size); ARMul_OSInit (state); state->verbose = 0; diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog index d0f63e5b5d8..5fcbea12862 100644 --- a/sim/avr/ChangeLog +++ b/sim/avr/ChangeLog @@ -1,3 +1,9 @@ +2016-01-02 Mike Frysinger + + * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to + LITTLE. + * configure: Regenerate. + 2015-12-27 Mike Frysinger * Makefile.in (SIM_OBJS): Delete sim-hload.o. diff --git a/sim/avr/configure b/sim/avr/configure index fded2838593..001142f6d55 100755 --- a/sim/avr/configure +++ b/sim/avr/configure @@ -12912,31 +12912,31 @@ sim_link_links="${sim_link_links} targ-vals.def" -wire_endian="LITTLE_ENDIAN" +wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12946,10 +12946,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13006,9 +13006,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13242,12 +13242,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/avr/configure.ac b/sim/avr/configure.ac index a487225058c..08577878cc1 100644 --- a/sim/avr/configure.ac +++ b/sim/avr/configure.ac @@ -5,7 +5,7 @@ sinclude(../common/acinclude.m4) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN) +SIM_AC_OPTION_ENDIAN(LITTLE) SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) SIM_AC_OPTION_HOSTENDIAN SIM_AC_OPTION_ENVIRONMENT diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index cc1b3cc3c6d..6844035e4c6 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,9 @@ +2016-01-02 Mike Frysinger + + * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to + LITTLE. + * configure: Regenerate. + 2015-12-27 Mike Frysinger * Makefile.in (SIM_OBJS): Delete sim-hload.o. diff --git a/sim/bfin/configure b/sim/bfin/configure index 8edee2514b7..9b8dd5d7420 100755 --- a/sim/bfin/configure +++ b/sim/bfin/configure @@ -12935,31 +12935,31 @@ sim_link_links="${sim_link_links} targ-vals.def" -wire_endian="LITTLE_ENDIAN" +wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12969,10 +12969,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13029,9 +13029,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13265,12 +13265,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/bfin/configure.ac b/sim/bfin/configure.ac index 31cd159f614..5ae3b81bb59 100644 --- a/sim/bfin/configure.ac +++ b/sim/bfin/configure.ac @@ -5,7 +5,7 @@ sinclude(../common/acinclude.m4) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN) +SIM_AC_OPTION_ENDIAN(LITTLE) SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) SIM_AC_OPTION_HOSTENDIAN SIM_AC_OPTION_DEFAULT_MODEL(bf537) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 65a0abfd1bc..699178647b0 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,44 @@ +2016-01-02 Mike Frysinger + + * acinclude.m4 (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to + BFD_ENDIAN_BIG, LITTLE_ENDIAN to BFD_ENDIAN_LITTLE, and 0 to + BFD_ENDIAN_UNKNOWN. + (SIM_AC_OPTION_HOSTENDIAN): Likewise. + * cgen-ops.h (SUBWORDXFSI): Change BIG_ENDIAN to BFD_ENDIAN_BIG. + (SUBWORDTFSI, JOINSIDF, JOINSIXF, JOINSITF): Likewise. + * nrun.c (main): Likewise. + * sim-config.c (current_host_byte_order): Change type to enum + bfd_endian. Initialize to BFD_ENDIAN_UNKNOWN. + (current_target_byte_order): Likewise. + (config_byte_order_to_a): Likewise. Change BIG_ENDIAN to + BFD_ENDIAN_BIG, LITTLE_ENDIAN to BFD_ENDIAN_LITTLE, and 0 to + BFD_ENDIAN_UNKNOWN. + (sim_config): Change prefered_target_byte_order type to enum + bfd_endian. Change BIG_ENDIAN to BFD_ENDIAN_BIG, LITTLE_ENDIAN + to BFD_ENDIAN_LITTLE, and 0 to BFD_ENDIAN_UNKNOWN. + * sim-config.h: Change BIG_ENDIAN to BFD_ENDIAN_BIG, LITTLE_ENDIAN + to BFD_ENDIAN_LITTLE, and 0 to BFD_ENDIAN_UNKNOWN. + Delete all the various arch/OS endian includes & defines. + (current_host_byte_order): Change type to enum bfd_endian. + (current_target_byte_order): Likewise. + (CURRENT_HOST_BYTE_ORDER): Compare to BFD_ENDIAN_UNKNOWN, not 0. + (CURRENT_TARGET_BYTE_ORDER): Likewise. + * sim-endian.c: Change LITTLE_ENDIAN to BFD_ENDIAN_LITTLE. + * sim-events.c (sim_events_watch_sim): Change BIG_ENDIAN to + BFD_ENDIAN_BIG, LITTLE_ENDIAN to BFD_ENDIAN_LITTLE, and 0 to + BFD_ENDIAN_UNKNOWN. + (sim_events_watch_core): Likewise. + * sim-events.h: Likewise. + * sim-n-core.h (sim_core_read_misaligned_N): Change BIG_ENDIAN to + BFD_ENDIAN_BIG. + (sim_core_write_misaligned_N): Likewise. + * sim-n-endian.h (endian_h2be_N): Likewise. + (endian_be2h_N): Likewise. + (endian_h2le_N): Change LITTLE_ENDIAN to BFD_ENDIAN_LITTLE. + (offset_N): Likewise. + * sim-options.c (standard_option_handler): Change LITTLE_ENDIAN to + BFD_ENDIAN_LITTLE and BIG_ENDIAN to BFD_ENDIAN_BIG. + 2016-01-02 Mike Frysinger * cgen-defs.h (current_state): Delete. diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4 index ebb6d1bc29e..2af6d5d5634 100644 --- a/sim/common/acinclude.m4 +++ b/sim/common/acinclude.m4 @@ -449,26 +449,26 @@ AC_ARG_ENABLE(sim-endian, [AS_HELP_STRING([--enable-sim-endian=endian], [Specify target byte endian orientation])], [case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-endian"); sim_endian="";; @@ -477,10 +477,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then echo "Setting endian flags = $sim_endian" 6>&1 fi], [if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -498,9 +498,9 @@ AC_ARG_ENABLE(sim-hostendian, [AS_HELP_STRING([--enable-sim-hostendian=end], [Specify host byte endian orientation])], [case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-hostendian"); sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -509,12 +509,12 @@ fi],[ if test "x$cross_compiling" = "xno"; then AC_C_BIGENDIAN if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi])dnl ]) AC_SUBST(sim_hostendian) diff --git a/sim/common/cgen-ops.h b/sim/common/cgen-ops.h index 9256d8b9073..7ff1b4db26a 100644 --- a/sim/common/cgen-ops.h +++ b/sim/common/cgen-ops.h @@ -404,7 +404,7 @@ SUBWORDXFSI (XF in, int word) /* Note: typedef struct { SI parts[3]; } XF; */ union { XF in; SI out[3]; } x; x.in = in; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) + if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) return x.out[word]; else return x.out[2 - word]; @@ -416,7 +416,7 @@ SUBWORDTFSI (TF in, int word) /* Note: typedef struct { SI parts[4]; } TF; */ union { TF in; SI out[4]; } x; x.in = in; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) + if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) return x.out[word]; else return x.out[3 - word]; @@ -432,7 +432,7 @@ SEMOPS_INLINE DF JOINSIDF (SI x0, SI x1) { union { SI in[2]; DF out; } x; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) + if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) x.in[0] = x0, x.in[1] = x1; else x.in[1] = x0, x.in[0] = x1; @@ -443,7 +443,7 @@ SEMOPS_INLINE XF JOINSIXF (SI x0, SI x1, SI x2) { union { SI in[3]; XF out; } x; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) + if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) x.in[0] = x0, x.in[1] = x1, x.in[2] = x2; else x.in[2] = x0, x.in[1] = x1, x.in[0] = x2; @@ -454,7 +454,7 @@ SEMOPS_INLINE TF JOINSITF (SI x0, SI x1, SI x2, SI x3) { union { SI in[4]; TF out; } x; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) + if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) x.in[0] = x0, x.in[1] = x1, x.in[2] = x2, x.in[3] = x3; else x.in[3] = x0, x.in[2] = x1, x.in[1] = x2, x.in[0] = x3; diff --git a/sim/common/nrun.c b/sim/common/nrun.c index 61c3c04a8f0..2e477153022 100644 --- a/sim/common/nrun.c +++ b/sim/common/nrun.c @@ -99,7 +99,7 @@ main (int argc, char **argv) /* We can't set the endianness in the callback structure until sim_config is called, which happens in sim_open. */ default_callback.target_endian - = (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN + = (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE); /* Was there a program to run? */ diff --git a/sim/common/sim-config.c b/sim/common/sim-config.c index ff2098391a8..8e9b1ddd222 100644 --- a/sim/common/sim-config.c +++ b/sim/common/sim-config.c @@ -25,8 +25,8 @@ #include "bfd.h" -int current_host_byte_order; -int current_target_byte_order; +enum bfd_endian current_host_byte_order = BFD_ENDIAN_UNKNOWN; +enum bfd_endian current_target_byte_order = BFD_ENDIAN_UNKNOWN; int current_stdio; enum sim_alignments current_alignment; @@ -40,16 +40,16 @@ int current_floating_point; /* map a byte order onto a textual string */ static const char * -config_byte_order_to_a (int byte_order) +config_byte_order_to_a (enum bfd_endian byte_order) { switch (byte_order) { - case LITTLE_ENDIAN: + case BFD_ENDIAN_LITTLE: return "LITTLE_ENDIAN"; - case BIG_ENDIAN: + case BFD_ENDIAN_BIG: return "BIG_ENDIAN"; - case 0: - return "0"; + case BFD_ENDIAN_UNKNOWN: + return "UNKNOWN_ENDIAN"; } return "UNKNOWN"; } @@ -140,7 +140,7 @@ sim_config_default (SIM_DESC sd) SIM_RC sim_config (SIM_DESC sd) { - int prefered_target_byte_order; + enum bfd_endian prefered_target_byte_order; SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); /* extract all relevant information */ @@ -149,18 +149,18 @@ sim_config (SIM_DESC sd) "--architecture"), it'll have no endianness. */ || (!bfd_little_endian (STATE_PROG_BFD (sd)) && !bfd_big_endian (STATE_PROG_BFD (sd)))) - prefered_target_byte_order = 0; + prefered_target_byte_order = BFD_ENDIAN_UNKNOWN; else prefered_target_byte_order = (bfd_little_endian (STATE_PROG_BFD (sd)) - ? LITTLE_ENDIAN - : BIG_ENDIAN); + ? BFD_ENDIAN_LITTLE + : BFD_ENDIAN_BIG); /* set the host byte order */ current_host_byte_order = 1; if (*(char*)(¤t_host_byte_order)) - current_host_byte_order = LITTLE_ENDIAN; + current_host_byte_order = BFD_ENDIAN_LITTLE; else - current_host_byte_order = BIG_ENDIAN; + current_host_byte_order = BFD_ENDIAN_BIG; /* verify the host byte order */ if (CURRENT_HOST_BYTE_ORDER != current_host_byte_order) @@ -174,22 +174,22 @@ sim_config (SIM_DESC sd) /* set the target byte order */ #if (WITH_TREE_PROPERTIES) - if (current_target_byte_order == 0) + if (current_target_byte_order == BFD_ENDIAN_UNKNOWN) current_target_byte_order = (tree_find_boolean_property (root, "/options/little-endian?") - ? LITTLE_ENDIAN - : BIG_ENDIAN); + ? BFD_ENDIAN_LITTLE + : BFD_ENDIAN_BIG); #endif - if (current_target_byte_order == 0 - && prefered_target_byte_order != 0) + if (current_target_byte_order == BFD_ENDIAN_UNKNOWN + && prefered_target_byte_order != BFD_ENDIAN_UNKNOWN) current_target_byte_order = prefered_target_byte_order; - if (current_target_byte_order == 0) + if (current_target_byte_order == BFD_ENDIAN_UNKNOWN) current_target_byte_order = WITH_TARGET_BYTE_ORDER; - if (current_target_byte_order == 0) + if (current_target_byte_order == BFD_ENDIAN_UNKNOWN) current_target_byte_order = WITH_DEFAULT_TARGET_BYTE_ORDER; /* verify the target byte order */ - if (CURRENT_TARGET_BYTE_ORDER == 0) + if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_UNKNOWN) { sim_io_eprintf (sd, "Target byte order unspecified\n"); return SIM_RC_FAIL; @@ -198,7 +198,7 @@ sim_config (SIM_DESC sd) sim_io_eprintf (sd, "Target (%s) and configured (%s) byte order in conflict\n", config_byte_order_to_a (current_target_byte_order), config_byte_order_to_a (CURRENT_TARGET_BYTE_ORDER)); - if (prefered_target_byte_order != 0 + if (prefered_target_byte_order != BFD_ENDIAN_UNKNOWN && CURRENT_TARGET_BYTE_ORDER != prefered_target_byte_order) sim_io_eprintf (sd, "Target (%s) and specified (%s) byte order in conflict\n", config_byte_order_to_a (CURRENT_TARGET_BYTE_ORDER), diff --git a/sim/common/sim-config.h b/sim/common/sim-config.h index a5a8950c425..fbd9b25eda6 100644 --- a/sim/common/sim-config.h +++ b/sim/common/sim-config.h @@ -30,181 +30,19 @@ particular it defines the macro's: WITH_HOST_BYTE_ORDER The byte order of the host. Could - be any of LITTLE_ENDIAN, BIG_ENDIAN - or 0 (unknown). Those macro's also + be any of BFD_ENDIAN_LITTLE, BFD_ENDIAN_BIG, + or BFD_ENDIAN_UNKNOWN. Those macro's also need to be defined. */ -/* NetBSD: - - NetBSD is easy, everything you could ever want is in a header file - (well almost :-) */ - -#if defined(__NetBSD__) -# include -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER BYTE_ORDER -# endif -# if (BYTE_ORDER != WITH_HOST_BYTE_ORDER) -# error "host endian incorrectly configured, check config.h" -# endif -#endif - -/* Linux is similarly easy. */ - -#if defined(__linux__) -# include -# if defined(__LITTLE_ENDIAN) && !defined(LITTLE_ENDIAN) -# define LITTLE_ENDIAN __LITTLE_ENDIAN -# endif -# if defined(__BIG_ENDIAN) && !defined(BIG_ENDIAN) -# define BIG_ENDIAN __BIG_ENDIAN -# endif -# if defined(__BYTE_ORDER) && !defined(BYTE_ORDER) -# define BYTE_ORDER __BYTE_ORDER -# endif -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER BYTE_ORDER -# endif -# if (BYTE_ORDER != WITH_HOST_BYTE_ORDER) -# error "host endian incorrectly configured, check config.h" -# endif -#endif - -/* INSERT HERE - hosts that have available LITTLE_ENDIAN and - BIG_ENDIAN macro's */ - - -/* Some hosts don't define LITTLE_ENDIAN or BIG_ENDIAN, help them out */ - -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 -#endif -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 -#endif - - -/* SunOS on SPARC: - - Big endian last time I looked */ - -#if defined(sparc) || defined(__sparc__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER BIG_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != BIG_ENDIAN) -# error "sun was big endian last time I looked ..." -# endif -#endif - - -/* Random x86 - - Little endian last time I looked */ - -#if defined(i386) || defined(i486) || defined(i586) || defined (i686) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined (__i686__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER LITTLE_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != LITTLE_ENDIAN) -# error "x86 was little endian last time I looked ..." -# endif -#endif - #if (defined (__i486__) || defined (__i586__) || defined (__i686__)) && defined(__GNUC__) && WITH_BSWAP #undef htonl #undef ntohl #define htonl(IN) __extension__ ({ int _out; __asm__ ("bswap %0" : "=r" (_out) : "0" (IN)); _out; }) #define ntohl(IN) __extension__ ({ int _out; __asm__ ("bswap %0" : "=r" (_out) : "0" (IN)); _out; }) #endif - -/* Power or PowerPC running AIX */ -#if defined(_POWER) && defined(_AIX) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER BIG_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != BIG_ENDIAN) -# error "Power/PowerPC AIX was big endian last time I looked ..." -# endif -#endif - -/* Solaris running PowerPC */ -#if defined(__PPC) && defined(__sun__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER LITTLE_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != LITTLE_ENDIAN) -# error "Solaris on PowerPCs was little endian last time I looked ..." -# endif -#endif - -/* HP/PA */ -#if defined(__hppa__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER BIG_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != BIG_ENDIAN) -# error "HP/PA was big endian last time I looked ..." -# endif -#endif - -/* Big endian MIPS */ -#if defined(__MIPSEB__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER BIG_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != BIG_ENDIAN) -# error "MIPSEB was big endian last time I looked ..." -# endif -#endif - -/* Little endian MIPS */ -#if defined(__MIPSEL__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER LITTLE_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != LITTLE_ENDIAN) -# error "MIPSEL was little endian last time I looked ..." -# endif -#endif - -/* Windows NT */ -#if defined(__WIN32__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER LITTLE_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != LITTLE_ENDIAN) -# error "Windows NT was little endian last time I looked ..." -# endif -#endif - -/* Alpha running DEC unix */ -#if defined(__osf__) && defined(__alpha__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER LITTLE_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != LITTLE_ENDIAN) -# error "AXP running DEC unix was little endian last time I looked ..." -# endif -#endif - - -/* INSERT HERE - additional hosts that do not have LITTLE_ENDIAN and - BIG_ENDIAN definitions available. */ /* Until devices and tree properties are sorted out, tell sim-config.c not to call the tree_find_foo fns. */ @@ -217,28 +55,28 @@ of the host/target it is able to eliminate slower generic endian handling code. - Possible values are 0 (unknown), LITTLE_ENDIAN, BIG_ENDIAN */ + Possible values are BFD_ENDIAN_UNKNOWN, BFD_ENDIAN_LITTLE, BFD_ENDIAN_BIG. */ #ifndef WITH_HOST_BYTE_ORDER -#define WITH_HOST_BYTE_ORDER 0 /*unknown*/ +#define WITH_HOST_BYTE_ORDER BFD_ENDIAN_UNKNOWN #endif #ifndef WITH_TARGET_BYTE_ORDER -#define WITH_TARGET_BYTE_ORDER 0 /*unknown*/ +#define WITH_TARGET_BYTE_ORDER BFD_ENDIAN_UNKNOWN #endif #ifndef WITH_DEFAULT_TARGET_BYTE_ORDER -#define WITH_DEFAULT_TARGET_BYTE_ORDER 0 /* fatal */ +#define WITH_DEFAULT_TARGET_BYTE_ORDER BFD_ENDIAN_UNKNOWN #endif -extern int current_host_byte_order; -#define CURRENT_HOST_BYTE_ORDER (WITH_HOST_BYTE_ORDER \ - ? WITH_HOST_BYTE_ORDER \ - : current_host_byte_order) -extern int current_target_byte_order; -#define CURRENT_TARGET_BYTE_ORDER (WITH_TARGET_BYTE_ORDER \ - ? WITH_TARGET_BYTE_ORDER \ - : current_target_byte_order) +extern enum bfd_endian current_host_byte_order; +#define CURRENT_HOST_BYTE_ORDER \ + (WITH_HOST_BYTE_ORDER != BFD_ENDIAN_UNKNOWN \ + ? WITH_HOST_BYTE_ORDER : current_host_byte_order) +extern enum bfd_endian current_target_byte_order; +#define CURRENT_TARGET_BYTE_ORDER \ + (WITH_TARGET_BYTE_ORDER != BFD_ENDIAN_UNKNOWN \ + ? WITH_TARGET_BYTE_ORDER : current_target_byte_order) diff --git a/sim/common/sim-endian.c b/sim/common/sim-endian.c index a69957787a2..e8ef53434c3 100644 --- a/sim/common/sim-endian.c +++ b/sim/common/sim-endian.c @@ -31,7 +31,7 @@ #define _SWAP_1(SET,RAW) SET (RAW) #endif -#if !defined(_SWAP_2) && (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) && defined(htons) +#if !defined(_SWAP_2) && (WITH_HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) && defined(htons) #define _SWAP_2(SET,RAW) SET htons (RAW) #endif @@ -39,7 +39,7 @@ #define _SWAP_2(SET,RAW) SET (((RAW) >> 8) | ((RAW) << 8)) #endif -#if !defined(_SWAP_4) && (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) && defined(htonl) +#if !defined(_SWAP_4) && (WITH_HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) && defined(htonl) #define _SWAP_4(SET,RAW) SET htonl (RAW) #endif @@ -93,7 +93,7 @@ INLINE_SIM_ENDIAN\ (unsigned_8) sim_endian_split_16 (unsigned_16 word, int w) { - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) + if (CURRENT_HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) { return word.a[1 - w]; } @@ -110,7 +110,7 @@ sim_endian_join_16 (unsigned_8 h, unsigned_8 l) { unsigned_16 word; - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) + if (CURRENT_HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) { word.a[0] = l; word.a[1] = h; diff --git a/sim/common/sim-events.c b/sim/common/sim-events.c index f29e40c4cf6..54d75c27ac5 100644 --- a/sim/common/sim-events.c +++ b/sim/common/sim-events.c @@ -635,7 +635,7 @@ sim_events_watch_sim (SIM_DESC sd, /* type */ switch (byte_order) { - case 0: + case BFD_ENDIAN_UNKNOWN: switch (nr_bytes) { case 1: new_event->watching = watch_sim_host_1; break; @@ -645,7 +645,7 @@ sim_events_watch_sim (SIM_DESC sd, default: sim_io_error (sd, "sim_events_watch_sim - invalid nr bytes"); } break; - case BIG_ENDIAN: + case BFD_ENDIAN_BIG: switch (nr_bytes) { case 1: new_event->watching = watch_sim_be_1; break; @@ -655,7 +655,7 @@ sim_events_watch_sim (SIM_DESC sd, default: sim_io_error (sd, "sim_events_watch_sim - invalid nr bytes"); } break; - case LITTLE_ENDIAN: + case BFD_ENDIAN_LITTLE: switch (nr_bytes) { case 1: new_event->watching = watch_sim_le_1; break; @@ -714,7 +714,7 @@ sim_events_watch_core (SIM_DESC sd, /* type */ switch (byte_order) { - case 0: + case BFD_ENDIAN_UNKNOWN: switch (nr_bytes) { case 1: new_event->watching = watch_core_targ_1; break; @@ -724,7 +724,7 @@ sim_events_watch_core (SIM_DESC sd, default: sim_io_error (sd, "sim_events_watch_core - invalid nr bytes"); } break; - case BIG_ENDIAN: + case BFD_ENDIAN_BIG: switch (nr_bytes) { case 1: new_event->watching = watch_core_be_1; break; @@ -734,7 +734,7 @@ sim_events_watch_core (SIM_DESC sd, default: sim_io_error (sd, "sim_events_watch_core - invalid nr bytes"); } break; - case LITTLE_ENDIAN: + case BFD_ENDIAN_LITTLE: switch (nr_bytes) { case 1: new_event->watching = watch_core_le_1; break; diff --git a/sim/common/sim-events.h b/sim/common/sim-events.h index 60e204604a6..c01cea0455d 100644 --- a/sim/common/sim-events.h +++ b/sim/common/sim-events.h @@ -154,7 +154,8 @@ extern sim_event *sim_events_watch_clock true. HOST_ADDR: pointer into the host address space. - BYTE_ORDER: 0 - host endian; BIG_ENDIAN; LITTLE_ENDIAN */ + BYTE_ORDER: BFD_ENDIAN_UNKNOWN - host endian; BFD_ENDIAN_BIG; + BFD_ENDIAN_LITTLE. */ extern sim_event *sim_events_watch_sim (SIM_DESC sd, @@ -173,7 +174,8 @@ extern sim_event *sim_events_watch_sim true. CORE_ADDR/MAP: pointer into the target address space. - BYTE_ORDER: 0 - current target endian; BIG_ENDIAN; LITTLE_ENDIAN */ + BYTE_ORDER: BFD_ENDIAN_UNKNOWN - host endian; BFD_ENDIAN_BIG; + BFD_ENDIAN_LITTLE. */ extern sim_event *sim_events_watch_core (SIM_DESC sd, diff --git a/sim/common/sim-n-core.h b/sim/common/sim-n-core.h index d67fb9ceb25..0c1cb7af438 100644 --- a/sim/common/sim-n-core.h +++ b/sim/common/sim-n-core.h @@ -250,7 +250,7 @@ sim_core_read_misaligned_N(sim_cpu *cpu, read_transfer, sim_core_unaligned_signal); if (CURRENT_HOST_BYTE_ORDER != CURRENT_TARGET_BYTE_ORDER) val = SWAP_M (val); - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) + if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) val >>= (M - N) * 8; PROFILE_COUNT_CORE (cpu, addr, N, map); if (TRACE_P (cpu, TRACE_CORE_IDX)) @@ -366,7 +366,7 @@ sim_core_write_misaligned_N(sim_cpu *cpu, unsigned_M val) { unsigned_M data = val; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) + if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) data <<= (M - N) * 8; if (CURRENT_HOST_BYTE_ORDER != CURRENT_TARGET_BYTE_ORDER) data = SWAP_M (data); diff --git a/sim/common/sim-n-endian.h b/sim/common/sim-n-endian.h index 4cfb9255924..ef7d2cee199 100644 --- a/sim/common/sim-n-endian.h +++ b/sim/common/sim-n-endian.h @@ -81,7 +81,7 @@ INLINE_SIM_ENDIAN\ (unsigned_N) endian_h2be_N(unsigned_N raw_in) { - if (CURRENT_HOST_BYTE_ORDER == BIG_ENDIAN) { + if (CURRENT_HOST_BYTE_ORDER == BFD_ENDIAN_BIG) { return raw_in; } else { @@ -95,7 +95,7 @@ INLINE_SIM_ENDIAN\ (unsigned_N) endian_be2h_N(unsigned_N raw_in) { - if (CURRENT_HOST_BYTE_ORDER == BIG_ENDIAN) { + if (CURRENT_HOST_BYTE_ORDER == BFD_ENDIAN_BIG) { return raw_in; } else { @@ -109,7 +109,7 @@ INLINE_SIM_ENDIAN\ (unsigned_N) endian_h2le_N(unsigned_N raw_in) { - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) { + if (CURRENT_HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) { return raw_in; } else { @@ -123,7 +123,7 @@ INLINE_SIM_ENDIAN\ (unsigned_N) endian_le2h_N(unsigned_N raw_in) { - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) { + if (CURRENT_HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) { return raw_in; } else { @@ -145,7 +145,7 @@ offset_N (unsigned_N *x, ASSERT (offset + sizeof_word <= sizeof(unsigned_N)); ASSERT (word < (sizeof (unsigned_N) / sizeof_word)); ASSERT ((sizeof (unsigned_N) % sizeof_word) == 0); - if (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) + if (WITH_HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) { out = in + sizeof (unsigned_N) - offset - sizeof_word; } diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index 1fca5de8839..e25275695fa 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -197,23 +197,23 @@ standard_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, case OPTION_ENDIAN: if (strcmp (arg, "big") == 0) { - if (WITH_TARGET_BYTE_ORDER == LITTLE_ENDIAN) + if (WITH_TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE) { sim_io_eprintf (sd, "Simulator compiled for little endian only.\n"); return SIM_RC_FAIL; } /* FIXME:wip: Need to set something in STATE_CONFIG. */ - current_target_byte_order = BIG_ENDIAN; + current_target_byte_order = BFD_ENDIAN_BIG; } else if (strcmp (arg, "little") == 0) { - if (WITH_TARGET_BYTE_ORDER == BIG_ENDIAN) + if (WITH_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) { sim_io_eprintf (sd, "Simulator compiled for big endian only.\n"); return SIM_RC_FAIL; } /* FIXME:wip: Need to set something in STATE_CONFIG. */ - current_target_byte_order = LITTLE_ENDIAN; + current_target_byte_order = BFD_ENDIAN_LITTLE; } else { diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index 44e24fe5aba..130e8787791 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,9 @@ +2016-01-02 Mike Frysinger + + * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to + LITTLE. + * configure: Regenerate. + 2015-12-27 Mike Frysinger * Makefile.in (SIM_OBJS): Delete sim-hload.o. diff --git a/sim/cr16/configure b/sim/cr16/configure index 676e9a9270f..c538ede267f 100755 --- a/sim/cr16/configure +++ b/sim/cr16/configure @@ -12912,31 +12912,31 @@ sim_link_links="${sim_link_links} targ-vals.def" -wire_endian="LITTLE_ENDIAN" +wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12946,10 +12946,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13006,9 +13006,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13242,12 +13242,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/cr16/configure.ac b/sim/cr16/configure.ac index ebf8bd350da..7464e342e41 100644 --- a/sim/cr16/configure.ac +++ b/sim/cr16/configure.ac @@ -5,7 +5,7 @@ sinclude(../common/acinclude.m4) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN) +SIM_AC_OPTION_ENDIAN(LITTLE) SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) SIM_AC_OPTION_HOSTENDIAN SIM_AC_OPTION_ENVIRONMENT diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index 1e28c12b937..79ce999db90 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/ChangeLog @@ -1,3 +1,10 @@ +2016-01-02 Mike Frysinger + + * arch.h (TARGET_BIG_ENDIAN): Delete. + * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to + LITTLE. + * configure: Regenerate. + 2016-01-02 Mike Frysinger * sim-if.c (xprintf, eprintf): Delete. diff --git a/sim/cris/arch.h b/sim/cris/arch.h index f765f4a25fd..efd861fe5af 100644 --- a/sim/cris/arch.h +++ b/sim/cris/arch.h @@ -24,8 +24,6 @@ This file is part of the GNU simulators. #ifndef CRIS_ARCH_H #define CRIS_ARCH_H -#define TARGET_BIG_ENDIAN 1 - /* Enum declaration for model types. */ typedef enum model_type { MODEL_CRISV10, MODEL_CRISV32, MODEL_MAX diff --git a/sim/cris/configure b/sim/cris/configure index be7f6fc7739..99143377ccf 100755 --- a/sim/cris/configure +++ b/sim/cris/configure @@ -12942,31 +12942,31 @@ done -wire_endian="LITTLE_ENDIAN" +wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12976,10 +12976,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13036,9 +13036,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13272,12 +13272,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac index 4e6b1be7d2a..5b384a271ff 100644 --- a/sim/cris/configure.ac +++ b/sim/cris/configure.ac @@ -8,7 +8,7 @@ SIM_AC_COMMON # For dv-rv and rvdummy. AC_CHECK_HEADERS(sys/socket.h sys/select.h limits.h sys/param.h) -SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN) +SIM_AC_OPTION_ENDIAN(LITTLE) SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) SIM_AC_OPTION_HOSTENDIAN SIM_AC_OPTION_SCACHE(16384) diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index 6a796bbdb94..1a2f94ff314 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,7 @@ +2016-01-02 Mike Frysinger + + * configure: Regenerate. + 2015-12-30 Mike Frysinger * wrapper.c (d10v_reg_store, d10v_reg_fetch): Define. diff --git a/sim/d10v/configure b/sim/d10v/configure index d46ffcb66b0..3fd5d8c10c7 100755 --- a/sim/d10v/configure +++ b/sim/d10v/configure @@ -12917,26 +12917,26 @@ default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12946,10 +12946,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13006,9 +13006,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13242,12 +13242,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog index e9a324118b8..fd23fe6b88c 100644 --- a/sim/erc32/ChangeLog +++ b/sim/erc32/ChangeLog @@ -1,3 +1,7 @@ +2016-01-02 Mike Frysinger + + * configure: Regenerate. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/erc32/configure b/sim/erc32/configure index 94c6fa44132..d12525bc6d4 100755 --- a/sim/erc32/configure +++ b/sim/erc32/configure @@ -13034,9 +13034,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13270,12 +13270,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index a566ba05b1b..dd28834d8ef 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,12 @@ +2016-01-02 Mike Frysinger + + * arch.h (TARGET_BIG_ENDIAN): Delete. + * configure.ac (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to BIG. + * configure: Regenerate. + * frv.c (frvbf_h_fr_double_get_handler): Change LITTLE_ENDIAN to + BFD_ENDIAN_LITTLE. + (frvbf_h_fr_double_set_handler): Likewise. + 2016-01-02 Mike Frysinger * reset.c (frv_term): Change current_state to sd. diff --git a/sim/frv/arch.h b/sim/frv/arch.h index 06abe868c64..18d09407771 100644 --- a/sim/frv/arch.h +++ b/sim/frv/arch.h @@ -24,8 +24,6 @@ This file is part of the GNU simulators. #ifndef FRV_ARCH_H #define FRV_ARCH_H -#define TARGET_BIG_ENDIAN 1 - /* Enum declaration for model types. */ typedef enum model_type { MODEL_FRV, MODEL_FR550, MODEL_FR500, MODEL_TOMCAT diff --git a/sim/frv/configure b/sim/frv/configure index ca3363c6a13..40b8bdfd105 100755 --- a/sim/frv/configure +++ b/sim/frv/configure @@ -12918,31 +12918,31 @@ sim_link_links="${sim_link_links} targ-vals.def" -wire_endian="BIG_ENDIAN" +wire_endian="BIG" default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12952,10 +12952,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13012,9 +13012,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13248,12 +13248,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/frv/configure.ac b/sim/frv/configure.ac index ebaf6ab3b60..ad73eedd556 100644 --- a/sim/frv/configure.ac +++ b/sim/frv/configure.ac @@ -5,7 +5,7 @@ sinclude(../common/acinclude.m4) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(BIG_ENDIAN) +SIM_AC_OPTION_ENDIAN(BIG) SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT) SIM_AC_OPTION_HOSTENDIAN SIM_AC_OPTION_SCACHE(16384) diff --git a/sim/frv/frv.c b/sim/frv/frv.c index 2b78edb2966..594931fadfd 100644 --- a/sim/frv/frv.c +++ b/sim/frv/frv.c @@ -303,7 +303,7 @@ frvbf_h_fr_double_get_handler (SIM_CPU *current_cpu, UINT fr) /* Check the register alignment. */ fr = check_fr_register_alignment (current_cpu, fr, 1); - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) + if (CURRENT_HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) { value.as_sf[1] = GET_H_FR (fr); value.as_sf[0] = GET_H_FR (fr + 1); @@ -329,7 +329,7 @@ frvbf_h_fr_double_set_handler (SIM_CPU *current_cpu, UINT fr, DF newval) fr = check_fr_register_alignment (current_cpu, fr, 1); value.as_df = newval; - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) + if (CURRENT_HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) { SET_H_FR (fr , value.as_sf[1]); SET_H_FR (fr + 1, value.as_sf[0]); diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog index 7164c7fe6f5..3f301648452 100644 --- a/sim/ft32/ChangeLog +++ b/sim/ft32/ChangeLog @@ -1,3 +1,9 @@ +2016-01-02 Mike Frysinger + + * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to + LITTLE. + * configure: Regenerate. + 2015-12-27 Mike Frysinger * Makefile.in (SIM_OBJS): Delete sim-hload.o. diff --git a/sim/ft32/configure b/sim/ft32/configure index d16b9c5e00d..a12de766b84 100755 --- a/sim/ft32/configure +++ b/sim/ft32/configure @@ -12912,31 +12912,31 @@ sim_link_links="${sim_link_links} targ-vals.def" -wire_endian="LITTLE_ENDIAN" +wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12946,10 +12946,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13006,9 +13006,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13242,12 +13242,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/ft32/configure.ac b/sim/ft32/configure.ac index 2107f74e185..57573d8c701 100644 --- a/sim/ft32/configure.ac +++ b/sim/ft32/configure.ac @@ -5,7 +5,7 @@ sinclude(../common/acinclude.m4) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN) +SIM_AC_OPTION_ENDIAN(LITTLE) SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT) SIM_AC_OPTION_HOSTENDIAN SIM_AC_OPTION_ENVIRONMENT diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog index 7d87d1fcf18..2327bb48644 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,3 +1,8 @@ +2016-01-02 Mike Frysinger + + * configure.ac (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to BIG. + * configure: Regenerate. + 2015-12-30 Mike Frysinger * compile.c (sim_state_initialize): Delete. diff --git a/sim/h8300/configure b/sim/h8300/configure index 79043dc8f62..12b72e41c3a 100755 --- a/sim/h8300/configure +++ b/sim/h8300/configure @@ -12894,31 +12894,31 @@ sim_link_links="${sim_link_links} targ-vals.def" -wire_endian="BIG_ENDIAN" +wire_endian="BIG" default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12928,10 +12928,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi diff --git a/sim/h8300/configure.ac b/sim/h8300/configure.ac index 53a02bb3054..39661602733 100644 --- a/sim/h8300/configure.ac +++ b/sim/h8300/configure.ac @@ -5,7 +5,7 @@ sinclude(../common/acinclude.m4) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(BIG_ENDIAN) +SIM_AC_OPTION_ENDIAN(BIG) SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) AC_CHECK_HEADERS(sys/param.h) diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog index 07c6ef67b0d..7fbebd5ebd0 100644 --- a/sim/iq2000/ChangeLog +++ b/sim/iq2000/ChangeLog @@ -1,3 +1,9 @@ +2016-01-02 Mike Frysinger + + * arch.h (TARGET_BIG_ENDIAN): Delete. + * configure.ac (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to BIG. + * configure: Regenerate. + 2016-01-02 Mike Frysinger * sim-if.c (sim_open): Delete #if 0 sim_add_option_table call. diff --git a/sim/iq2000/arch.h b/sim/iq2000/arch.h index ab268325fb5..3e062db6cec 100644 --- a/sim/iq2000/arch.h +++ b/sim/iq2000/arch.h @@ -24,8 +24,6 @@ This file is part of the GNU simulators. #ifndef IQ2000_ARCH_H #define IQ2000_ARCH_H -#define TARGET_BIG_ENDIAN 1 - /* Enum declaration for model types. */ typedef enum model_type { MODEL_IQ2000, MODEL_MAX diff --git a/sim/iq2000/configure b/sim/iq2000/configure index 26937d375ed..7f6b7bf6ad6 100755 --- a/sim/iq2000/configure +++ b/sim/iq2000/configure @@ -12918,31 +12918,31 @@ sim_link_links="${sim_link_links} targ-vals.def" -wire_endian="BIG_ENDIAN" +wire_endian="BIG" default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12952,10 +12952,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13012,9 +13012,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13248,12 +13248,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/iq2000/configure.ac b/sim/iq2000/configure.ac index 78dcbb6c7ed..923ae926fa1 100644 --- a/sim/iq2000/configure.ac +++ b/sim/iq2000/configure.ac @@ -5,7 +5,7 @@ sinclude(../common/acinclude.m4) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(BIG_ENDIAN) +SIM_AC_OPTION_ENDIAN(BIG) SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT) SIM_AC_OPTION_HOSTENDIAN SIM_AC_OPTION_SCACHE(16384) diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index 5aaab314303..552e848943e 100644 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,3 +1,9 @@ +2016-01-02 Mike Frysinger + + * arch.h (TARGET_BIG_ENDIAN): Delete. + * configure.ac (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to BIG. + * configure: Regenerate. + 2016-01-02 Mike Frysinger * sim-if.c (free_state, print_lm32_misc_cpu): Delete prototypes. diff --git a/sim/lm32/arch.h b/sim/lm32/arch.h index b2ed4b2ec64..720705aee06 100644 --- a/sim/lm32/arch.h +++ b/sim/lm32/arch.h @@ -24,8 +24,6 @@ This file is part of the GNU simulators. #ifndef LM32_ARCH_H #define LM32_ARCH_H -#define TARGET_BIG_ENDIAN 1 - /* Enum declaration for model types. */ typedef enum model_type { MODEL_LM32, MODEL_MAX diff --git a/sim/lm32/configure b/sim/lm32/configure index be10750066e..3968c92c95e 100755 --- a/sim/lm32/configure +++ b/sim/lm32/configure @@ -12915,31 +12915,31 @@ sim_link_links="${sim_link_links} targ-vals.def" -wire_endian="BIG_ENDIAN" +wire_endian="BIG" default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12949,10 +12949,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13009,9 +13009,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13245,12 +13245,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/lm32/configure.ac b/sim/lm32/configure.ac index 764c611eb89..90f5e2b74e6 100644 --- a/sim/lm32/configure.ac +++ b/sim/lm32/configure.ac @@ -5,7 +5,7 @@ sinclude(../common/acinclude.m4) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(BIG_ENDIAN) +SIM_AC_OPTION_ENDIAN(BIG) SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) SIM_AC_OPTION_HOSTENDIAN SIM_AC_OPTION_SCACHE(16384) diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index 8b65bb9ee0c..7578315e9fb 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,12 @@ +2016-01-02 Mike Frysinger + + * arch.h (TARGET_BIG_ENDIAN): Delete. + * configure.ac (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to BIG. + * configure: Regenerate. + * traps-linux.c (conv_endian): Change LITTLE_ENDIAN to + BFD_ENDIAN_LITTLE. + (conv_endian16): Likewise. + 2016-01-02 Mike Frysinger * sim-if.c (sim_open): Delete #if 0 sim_add_option_table call. diff --git a/sim/m32r/arch.h b/sim/m32r/arch.h index 8341c4c26e2..93e7e2ed157 100644 --- a/sim/m32r/arch.h +++ b/sim/m32r/arch.h @@ -24,8 +24,6 @@ This file is part of the GNU simulators. #ifndef M32R_ARCH_H #define M32R_ARCH_H -#define TARGET_BIG_ENDIAN 1 - /* Enum declaration for model types. */ typedef enum model_type { MODEL_M32R_D, MODEL_TEST, MODEL_M32RX, MODEL_M32R2 diff --git a/sim/m32r/configure b/sim/m32r/configure index 5c263dacce2..8742adbc219 100755 --- a/sim/m32r/configure +++ b/sim/m32r/configure @@ -12920,31 +12920,31 @@ sim_link_links="${sim_link_links} targ-vals.def" -wire_endian="BIG_ENDIAN" +wire_endian="BIG" default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12954,10 +12954,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13014,9 +13014,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13250,12 +13250,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/m32r/configure.ac b/sim/m32r/configure.ac index d92e62b5e15..68fb20d3e75 100644 --- a/sim/m32r/configure.ac +++ b/sim/m32r/configure.ac @@ -5,7 +5,7 @@ sinclude(../common/acinclude.m4) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(BIG_ENDIAN) +SIM_AC_OPTION_ENDIAN(BIG) SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT) SIM_AC_OPTION_HOSTENDIAN SIM_AC_OPTION_SCACHE(16384) diff --git a/sim/m32r/traps-linux.c b/sim/m32r/traps-linux.c index f2663028a20..92204517347 100644 --- a/sim/m32r/traps-linux.c +++ b/sim/m32r/traps-linux.c @@ -136,7 +136,7 @@ conv_endian (unsigned int tvalue) unsigned int hvalue; unsigned int t1, t2, t3, t4; - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) + if (CURRENT_HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) { t1 = tvalue & 0xff000000; t2 = tvalue & 0x00ff0000; @@ -160,7 +160,7 @@ conv_endian16 (unsigned short tvalue) unsigned short hvalue; unsigned short t1, t2; - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) + if (CURRENT_HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) { t1 = tvalue & 0xff00; t2 = tvalue & 0x00ff; diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index 1df68108a64..fb9c4bc72ad 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,3 +1,8 @@ +2016-01-02 Mike Frysinger + + * configure.ac (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to BIG. + * configure: Regenerate. + 2015-12-30 Mike Frysinger * configure.ac: Change LITTLE_ENDIAN to BIG_ENDIAN. diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure index 3a277d1389e..df2d8725efa 100755 --- a/sim/m68hc11/configure +++ b/sim/m68hc11/configure @@ -12955,31 +12955,31 @@ fi fi -wire_endian="BIG_ENDIAN" +wire_endian="BIG" default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12989,10 +12989,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13049,9 +13049,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13285,12 +13285,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/m68hc11/configure.ac b/sim/m68hc11/configure.ac index cbfe9e8070b..aafbb319fa4 100644 --- a/sim/m68hc11/configure.ac +++ b/sim/m68hc11/configure.ac @@ -7,7 +7,7 @@ SIM_AC_COMMON dnl Options available in this module SIM_AC_OPTION_INLINE() -SIM_AC_OPTION_ENDIAN(BIG_ENDIAN) +SIM_AC_OPTION_ENDIAN(BIG) SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) SIM_AC_OPTION_HOSTENDIAN SIM_AC_OPTION_WARNINGS diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog index fb80f2c1930..ce997149b88 100644 --- a/sim/mcore/ChangeLog +++ b/sim/mcore/ChangeLog @@ -1,3 +1,7 @@ +2016-01-02 Mike Frysinger + + * configure: Regenerate. + 2015-12-27 Mike Frysinger * Makefile.in (SIM_OBJS): Delete sim-hload.o. diff --git a/sim/mcore/configure b/sim/mcore/configure index d46ffcb66b0..3fd5d8c10c7 100755 --- a/sim/mcore/configure +++ b/sim/mcore/configure @@ -12917,26 +12917,26 @@ default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12946,10 +12946,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13006,9 +13006,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13242,12 +13242,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog index 934677847eb..3c21d5ed0ef 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,3 +1,7 @@ +2016-01-02 Mike Frysinger + + * configure: Regenerate. + 2015-12-30 Mike Frysinger * wrapper.c (sim_store_register): Rename to ... diff --git a/sim/microblaze/configure b/sim/microblaze/configure index d46ffcb66b0..3fd5d8c10c7 100755 --- a/sim/microblaze/configure +++ b/sim/microblaze/configure @@ -12917,26 +12917,26 @@ default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12946,10 +12946,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13006,9 +13006,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13242,12 +13242,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index a77058e0847..ba0a50bccee 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,10 @@ +2016-01-02 Mike Frysinger + + * configure.ac (mips_endian): Change LITTLE_ENDIAN to LITTLE. + (default_endian): Likewise. Change BIG_ENDIAN to BIG. + * configure: Regenerate. + * sim-main.h (BigEndianMem): Change BIG_ENDIAN to BFD_ENDIAN_BIG. + 2016-01-02 Mike Frysinger * dv-tx3904cpu.c (CPU, SD): Delete. diff --git a/sim/mips/configure b/sim/mips/configure index 6f1d13659fa..c31d65e6529 100755 --- a/sim/mips/configure +++ b/sim/mips/configure @@ -13037,9 +13037,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13273,12 +13273,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi @@ -13426,14 +13426,14 @@ esac mips_endian= default_endian= case "${target}" in - mips64el*-*-*) mips_endian=LITTLE_ENDIAN ;; - mips64vr*el-*-*) default_endian=LITTLE_ENDIAN ;; - mips64*-*-*) default_endian=BIG_ENDIAN ;; - mips16*-*-*) default_endian=BIG_ENDIAN ;; - mipsisa32*-*-*) default_endian=BIG_ENDIAN ;; - mipsisa64*-*-*) default_endian=BIG_ENDIAN ;; - mips*-*-*) default_endian=BIG_ENDIAN ;; - *) default_endian=BIG_ENDIAN ;; + mips64el*-*-*) mips_endian=LITTLE ;; + mips64vr*el-*-*) default_endian=LITTLE ;; + mips64*-*-*) default_endian=BIG ;; + mips16*-*-*) default_endian=BIG ;; + mipsisa32*-*-*) default_endian=BIG ;; + mipsisa64*-*-*) default_endian=BIG ;; + mips*-*-*) default_endian=BIG ;; + *) default_endian=BIG ;; esac wire_endian="$mips_endian" @@ -13441,26 +13441,26 @@ default_endian="$default_endian" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -13470,10 +13470,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13769,7 +13769,7 @@ if test ${sim_gen} = MULTI; then cat << __EOF__ > multi-run.c /* Main entry point for MULTI simulators. - Copyright (C) 2003-2015 Free Software Foundation, Inc. + Copyright (C) 2003-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac index 7f04473cc36..91e7b0cdec1 100644 --- a/sim/mips/configure.ac +++ b/sim/mips/configure.ac @@ -37,14 +37,14 @@ AC_SUBST(SIM_SUBTARGET) mips_endian= default_endian= case "${target}" in - mips64el*-*-*) mips_endian=LITTLE_ENDIAN ;; - mips64vr*el-*-*) default_endian=LITTLE_ENDIAN ;; - mips64*-*-*) default_endian=BIG_ENDIAN ;; - mips16*-*-*) default_endian=BIG_ENDIAN ;; - mipsisa32*-*-*) default_endian=BIG_ENDIAN ;; - mipsisa64*-*-*) default_endian=BIG_ENDIAN ;; - mips*-*-*) default_endian=BIG_ENDIAN ;; - *) default_endian=BIG_ENDIAN ;; + mips64el*-*-*) mips_endian=LITTLE ;; + mips64vr*el-*-*) default_endian=LITTLE ;; + mips64*-*-*) default_endian=BIG ;; + mips16*-*-*) default_endian=BIG ;; + mipsisa32*-*-*) default_endian=BIG ;; + mipsisa64*-*-*) default_endian=BIG ;; + mips*-*-*) default_endian=BIG ;; + *) default_endian=BIG ;; esac SIM_AC_OPTION_ENDIAN($mips_endian,$default_endian) diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h index b7e30726914..0ea1234fe6b 100644 --- a/sim/mips/sim-main.h +++ b/sim/mips/sim-main.h @@ -592,7 +592,7 @@ struct sim_state { /* Hardware configuration. Affects endianness of LoadMemory and StoreMemory and the endianness of Kernel and Supervisor mode execution. The value is 0 for little-endian; 1 for big-endian. */ -#define BigEndianMem (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) +#define BigEndianMem (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) /*(state & simBE) ? 1 : 0)*/ /* ReverseEndian */ diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index d59a7e85000..1d05f8d4262 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,9 @@ +2016-01-02 Mike Frysinger + + * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to + LITTLE. + * configure: Regenerate. + 2015-12-30 Mike Frysinger * wrapper.c (mn10300_reg_store, mn10300_reg_fetch): Define. diff --git a/sim/mn10300/configure b/sim/mn10300/configure index 6e4246eec16..1fac8bffe26 100755 --- a/sim/mn10300/configure +++ b/sim/mn10300/configure @@ -12917,31 +12917,31 @@ sim_link_links="${sim_link_links} targ-vals.def" -wire_endian="LITTLE_ENDIAN" +wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12951,10 +12951,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13011,9 +13011,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13247,12 +13247,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/mn10300/configure.ac b/sim/mn10300/configure.ac index 037d405e261..7d3c2239e82 100644 --- a/sim/mn10300/configure.ac +++ b/sim/mn10300/configure.ac @@ -5,7 +5,7 @@ sinclude(../common/acinclude.m4) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN) +SIM_AC_OPTION_ENDIAN(LITTLE) SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) SIM_AC_OPTION_HOSTENDIAN SIM_AC_OPTION_WARNINGS diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index 439b69c9995..718e8049ce7 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,3 +1,8 @@ +2016-01-02 Mike Frysinger + + * configure.ac (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to BIG. + * configure: Regenerate. + 2015-12-30 Mike Frysinger * wrapper.c (sim_store_register): Rename to ... diff --git a/sim/moxie/configure b/sim/moxie/configure index 3232de3a52a..6990a8ff762 100755 --- a/sim/moxie/configure +++ b/sim/moxie/configure @@ -13006,31 +13006,31 @@ fi -wire_endian="BIG_ENDIAN" +wire_endian="BIG" default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -13040,10 +13040,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13100,9 +13100,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13336,12 +13336,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/moxie/configure.ac b/sim/moxie/configure.ac index 34b80ce0e6c..a7f2b8254ad 100644 --- a/sim/moxie/configure.ac +++ b/sim/moxie/configure.ac @@ -7,7 +7,7 @@ SIM_AC_COMMON AC_CHECK_TOOL(DTC, dtc) -SIM_AC_OPTION_ENDIAN(BIG_ENDIAN) +SIM_AC_OPTION_ENDIAN(BIG) SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT) SIM_AC_OPTION_HOSTENDIAN SIM_AC_OPTION_ENVIRONMENT diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog index dd9aad0be91..db8269e2c9b 100644 --- a/sim/msp430/ChangeLog +++ b/sim/msp430/ChangeLog @@ -1,3 +1,9 @@ +2016-01-02 Mike Frysinger + + * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to + LITTLE. + * configure: Regenerate. + 2015-12-27 Mike Frysinger * msp430-sim.c (sim_dis_read): Change private_data to application_data. diff --git a/sim/msp430/configure b/sim/msp430/configure index 796741b31bd..229096a07c2 100755 --- a/sim/msp430/configure +++ b/sim/msp430/configure @@ -12918,31 +12918,31 @@ done -wire_endian="LITTLE_ENDIAN" +wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12952,10 +12952,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi diff --git a/sim/msp430/configure.ac b/sim/msp430/configure.ac index f24480e0591..b896ce405fd 100644 --- a/sim/msp430/configure.ac +++ b/sim/msp430/configure.ac @@ -26,7 +26,7 @@ SIM_AC_COMMON AC_CHECK_HEADERS(getopt.h) -SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN) +SIM_AC_OPTION_ENDIAN(LITTLE) SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT,STRICT_ALIGNMENT) SIM_AC_OPTION_INLINE SIM_AC_OPTION_WARNINGS diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index 0a0bb5682cf..56e9f1070a9 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,10 @@ +2016-01-02 Mike Frysinger + + * configure: Regenerate. + * interp.c (target_little_endian): Change LITTLE_ENDIAN to + BFD_ENDIAN_LITTLE. + (host_little_endian): Likewise. + 2015-12-30 Mike Frysinger * wrapper.c (sim_store_register): Rename to ... diff --git a/sim/sh/configure b/sim/sh/configure index d46ffcb66b0..3fd5d8c10c7 100755 --- a/sim/sh/configure +++ b/sim/sh/configure @@ -12917,26 +12917,26 @@ default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12946,10 +12946,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13006,9 +13006,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13242,12 +13242,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/sh/interp.c b/sim/sh/interp.c index 3abeda6b028..f7c49486cd6 100644 --- a/sim/sh/interp.c +++ b/sim/sh/interp.c @@ -116,10 +116,10 @@ struct loop_bounds { unsigned char *start, *end; }; /* These variables are at file scope so that functions other than sim_resume can use the fetch/store macros */ -#define target_little_endian (CURRENT_TARGET_BYTE_ORDER == LITTLE_ENDIAN) +#define target_little_endian (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE) static int global_endianw, endianb; static int target_dsp; -#define host_little_endian (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) +#define host_little_endian (CURRENT_HOST_BYTE_ORDER == BFD_ENDIAN_LITTLE) static int maskw = 0; static int maskl = 0; diff --git a/sim/sh64/ChangeLog b/sim/sh64/ChangeLog index 74f89bc9a6b..18a1d8a9c54 100644 --- a/sim/sh64/ChangeLog +++ b/sim/sh64/ChangeLog @@ -1,3 +1,9 @@ +2016-01-02 Mike Frysinger + + * arch.h (TARGET_BIG_ENDIAN): Delete. + * configure.ac (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to BIG. + * configure: Regenerate. + 2016-01-02 Mike Frysinger * sim-if.c (sim_open): Delete #if 0 sim_add_option_table call. diff --git a/sim/sh64/arch.h b/sim/sh64/arch.h index 88cd0371c89..aaa3991897d 100644 --- a/sim/sh64/arch.h +++ b/sim/sh64/arch.h @@ -24,8 +24,6 @@ This file is part of the GNU simulators. #ifndef SH_ARCH_H #define SH_ARCH_H -#define TARGET_BIG_ENDIAN 1 - /* Enum declaration for model types. */ typedef enum model_type { MODEL_SH2A_NOFPU, MODEL_SH2A_FPU, MODEL_SH4_NOFPU, MODEL_SH4 diff --git a/sim/sh64/configure b/sim/sh64/configure index 6310f429c12..7c3b4247cb5 100755 --- a/sim/sh64/configure +++ b/sim/sh64/configure @@ -12919,30 +12919,30 @@ sim_link_links="${sim_link_links} targ-vals.def" wire_endian="" -default_endian="BIG_ENDIAN" +default_endian="BIG" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12952,10 +12952,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13012,9 +13012,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13248,12 +13248,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/sh64/configure.ac b/sim/sh64/configure.ac index c979458acf7..4da1756f209 100644 --- a/sim/sh64/configure.ac +++ b/sim/sh64/configure.ac @@ -5,7 +5,7 @@ sinclude(../common/acinclude.m4) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN([], BIG_ENDIAN) +SIM_AC_OPTION_ENDIAN([], BIG) SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT) SIM_AC_OPTION_HOSTENDIAN SIM_AC_OPTION_SCACHE(16384) diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog index f79042009a8..63ec3edb28c 100644 --- a/sim/testsuite/ChangeLog +++ b/sim/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-01-02 Mike Frysinger + + * common/bits-gen.c (main): Change BIG_ENDIAN to BFD_ENDIAN_BIG and + LITTLE_ENDIAN and BFD_ENDIAN_LITTLE. + 2015-11-24 Nick Clifton * configure: Regenerate. diff --git a/sim/testsuite/common/bits-gen.c b/sim/testsuite/common/bits-gen.c index 84e4372e75d..6e7dd75b93c 100644 --- a/sim/testsuite/common/bits-gen.c +++ b/sim/testsuite/common/bits-gen.c @@ -233,7 +233,7 @@ main (int argc, char *argv[]) printf ("#define WITH_TARGET_WORD_BITSIZE %d\n", bitsize); printf ("#define WITH_TARGET_WORD_MSB %d\n", msb); printf ("#define WITH_HOST_WORD_BITSIZE %d\n", sizeof (int) * 8); - printf ("#define WITH_TARGET_BYTE_ORDER %s\n", big_endian ? "BIG_ENDIAN" : "LITTLE_ENDIAN"); + printf ("#define WITH_TARGET_BYTE_ORDER %s\n", big_endian ? "BFD_ENDIAN_BIG" : "BFD_ENDIAN_LITTLE"); printf ("\n"); printf ("#define SIM_BITS_INLINE (ALL_H_INLINE)\n"); printf ("\n"); diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 2b664881a25..d21492b0df5 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,9 @@ +2016-01-02 Mike Frysinger + + * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to + LITTLE. + * configure: Regenerate. + 2015-12-30 Mike Frysinger * wrapper.c (v850_reg_store, v850_reg_fetch): Define. diff --git a/sim/v850/configure b/sim/v850/configure index 97113c3caaf..c1e449a4132 100755 --- a/sim/v850/configure +++ b/sim/v850/configure @@ -12911,31 +12911,31 @@ sim_link_links="${sim_link_links} targ-vals.def" -wire_endian="LITTLE_ENDIAN" +wire_endian="LITTLE" default_endian="" # Check whether --enable-sim-endian was given. if test "${enable_sim_endian+set}" = set; then : enableval=$enable_sim_endian; case "${enableval}" in - b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";; + b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_LITTLE";; yes) if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else - if test x"$default_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}" + if test x"$default_endian" != x; then + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else echo "No hard-wired endian for target $target" 1>&6 - sim_endian="-DWITH_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; no) if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else echo "No default endian for target $target" 1>&6 - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi;; *) as_fn_error "\"Unknown value $enableval for --enable-sim-endian\"" "$LINENO" 5; sim_endian="";; @@ -12945,10 +12945,10 @@ if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then fi else if test x"$default_endian" != x; then - sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}" + sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=BFD_ENDIAN_${default_endian}" else if test x"$wire_endian" != x; then - sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}" + sim_endian="-DWITH_TARGET_BYTE_ORDER=BFD_ENDIAN_${wire_endian}" else sim_endian= fi @@ -13005,9 +13005,9 @@ fi # Check whether --enable-sim-hostendian was given. if test "${enable_sim_hostendian+set}" = set; then : enableval=$enable_sim_hostendian; case "${enableval}" in - no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";; - b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";; - l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";; + no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN";; + b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG";; + l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE";; *) as_fn_error "\"Unknown value $enableval for --enable-sim-hostendian\"" "$LINENO" 5; sim_hostendian="";; esac if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then @@ -13241,12 +13241,12 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h esac if test $ac_cv_c_bigendian = yes; then - sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_BIG" else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_LITTLE" fi else - sim_hostendian="-DWITH_HOST_BYTE_ORDER=0" + sim_hostendian="-DWITH_HOST_BYTE_ORDER=BFD_ENDIAN_UNKNOWN" fi fi diff --git a/sim/v850/configure.ac b/sim/v850/configure.ac index 1471eeb2a78..0ac54e07265 100644 --- a/sim/v850/configure.ac +++ b/sim/v850/configure.ac @@ -5,7 +5,7 @@ sinclude(../common/acinclude.m4) SIM_AC_COMMON -SIM_AC_OPTION_ENDIAN(LITTLE_ENDIAN) +SIM_AC_OPTION_ENDIAN(LITTLE) SIM_AC_OPTION_ALIGNMENT(,NONSTRICT_ALIGNMENT) SIM_AC_OPTION_HOSTENDIAN SIM_AC_OPTION_WARNINGS -- 2.30.2