sim: convert to bfd_endian
authorMike Frysinger <vapier@gentoo.org>
Sat, 2 Jan 2016 22:46:16 +0000 (17:46 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sun, 3 Jan 2016 05:18:07 +0000 (00:18 -0500)
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.

90 files changed:
sim/aarch64/ChangeLog
sim/aarch64/configure
sim/arm/ChangeLog
sim/arm/configure
sim/arm/wrapper.c
sim/avr/ChangeLog
sim/avr/configure
sim/avr/configure.ac
sim/bfin/ChangeLog
sim/bfin/configure
sim/bfin/configure.ac
sim/common/ChangeLog
sim/common/acinclude.m4
sim/common/cgen-ops.h
sim/common/nrun.c
sim/common/sim-config.c
sim/common/sim-config.h
sim/common/sim-endian.c
sim/common/sim-events.c
sim/common/sim-events.h
sim/common/sim-n-core.h
sim/common/sim-n-endian.h
sim/common/sim-options.c
sim/cr16/ChangeLog
sim/cr16/configure
sim/cr16/configure.ac
sim/cris/ChangeLog
sim/cris/arch.h
sim/cris/configure
sim/cris/configure.ac
sim/d10v/ChangeLog
sim/d10v/configure
sim/erc32/ChangeLog
sim/erc32/configure
sim/frv/ChangeLog
sim/frv/arch.h
sim/frv/configure
sim/frv/configure.ac
sim/frv/frv.c
sim/ft32/ChangeLog
sim/ft32/configure
sim/ft32/configure.ac
sim/h8300/ChangeLog
sim/h8300/configure
sim/h8300/configure.ac
sim/iq2000/ChangeLog
sim/iq2000/arch.h
sim/iq2000/configure
sim/iq2000/configure.ac
sim/lm32/ChangeLog
sim/lm32/arch.h
sim/lm32/configure
sim/lm32/configure.ac
sim/m32r/ChangeLog
sim/m32r/arch.h
sim/m32r/configure
sim/m32r/configure.ac
sim/m32r/traps-linux.c
sim/m68hc11/ChangeLog
sim/m68hc11/configure
sim/m68hc11/configure.ac
sim/mcore/ChangeLog
sim/mcore/configure
sim/microblaze/ChangeLog
sim/microblaze/configure
sim/mips/ChangeLog
sim/mips/configure
sim/mips/configure.ac
sim/mips/sim-main.h
sim/mn10300/ChangeLog
sim/mn10300/configure
sim/mn10300/configure.ac
sim/moxie/ChangeLog
sim/moxie/configure
sim/moxie/configure.ac
sim/msp430/ChangeLog
sim/msp430/configure
sim/msp430/configure.ac
sim/sh/ChangeLog
sim/sh/configure
sim/sh/interp.c
sim/sh64/ChangeLog
sim/sh64/arch.h
sim/sh64/configure
sim/sh64/configure.ac
sim/testsuite/ChangeLog
sim/testsuite/common/bits-gen.c
sim/v850/ChangeLog
sim/v850/configure
sim/v850/configure.ac

index fbbf562c44cffc17d88279f9ce133addf8878085..b16bb612f868fc41e0fb3a1ac511a2034038dc3c 100644 (file)
@@ -1,3 +1,7 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2015-12-27  Mike Frysinger  <vapier@gentoo.org>
 
        * interp.c (sim_dis_read): Change private_data to application_data.
index d909324e33b53b84ba41c408cd40551cbfe7f4f5..219d770063c474aabc064b26330cc89e85177071 100755 (executable)
@@ -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
 
index 024f52e03cea51646fd9c5080792e41d546b7060..f6989e95a3fdf1a7cf00a47c0a256d89376df68d 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+       * wrapper.c (init): Change BIG_ENDIAN to BFD_ENDIAN_BIG.
+
 2015-12-30  Mike Frysinger  <vapier@gentoo.org>
 
        * wrapper.c (sim_store_register): Rename to ...
index d46ffcb66b06adfb84e555dfa0c77c89d2829f7a..3fd5d8c10c7c070fca28c1356768eae62b267cb7 100755 (executable)
@@ -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
 
index 81fb21f0fe7711de625df32d3aa134d0bccb613d..3938f3ce5fd8435477fd10b38d22e3199666196c 100644 (file)
@@ -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;
index d0f63e5b5d89b29e8f25a0a6253b4545df211299..5fcbea1286227f8cd57b718a7085db586e9a4512 100644 (file)
@@ -1,3 +1,9 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to
+       LITTLE.
+       * configure: Regenerate.
+
 2015-12-27  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (SIM_OBJS): Delete sim-hload.o.
index fded283859383aff90b9d09fe979d6cbd1e34b4f..001142f6d555e46de75ff093946405179cd27555 100755 (executable)
@@ -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
 
index a487225058c0eeee921fde14df01d339b5d09e78..08577878cc117c714352fd4c31c17af407c49b25 100644 (file)
@@ -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
index cc1b3cc3c6d6b45ba96160ee4dddaf96fa3a6bcd..6844035e4c64a801c8b7b6bb95f4b70d798b096e 100644 (file)
@@ -1,3 +1,9 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to
+       LITTLE.
+       * configure: Regenerate.
+
 2015-12-27  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (SIM_OBJS): Delete sim-hload.o.
index 8edee2514b7fee259ef444bd5d46aa69047e4cf4..9b8dd5d74208ce664c5638343b383e199456a49f 100755 (executable)
@@ -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
 
index 31cd159f614947eae4130c49013fd4edb33889f3..5ae3b81bb5986cc864de2cc1b2ec8b7db7423032 100644 (file)
@@ -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)
index 65a0abfd1bc7f8ba933438964ef4f032e6b27425..699178647b03b66afb77fe5f751933794de753f0 100644 (file)
@@ -1,3 +1,44 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * cgen-defs.h (current_state): Delete.
index ebb6d1bc29ecfc70ca0872c0a88c7570c66aea9a..2af6d5d56343e0116970296fe63496abaad46334 100644 (file)
@@ -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)
index 9256d8b907369172f092186d4d492baf7404678b..7ff1b4db26a48de44029e27f3c05ebea67d0777b 100644 (file)
@@ -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;
index 61c3c04a8f0fe4d960ad981eaf8da8ea5513181e..2e477153022a873c8e4ade1da8f1d5796983f6b2 100644 (file)
@@ -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?  */
index ff2098391a8cb12f696236c8ec573f54c6a02de2..8e9b1ddd222de531d8561e59650f9ab5cb72c542 100644 (file)
@@ -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*)(&current_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),
index a5a8950c425d5eaa8623bd16c04ad424da6f0103..fbd9b25eda6e802afa0264501f5d769c40912c9f 100644 (file)
    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 <machine/endian.h>
-# 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 <endian.h>
-# 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.  */
 \f
 /* Until devices and tree properties are sorted out, tell sim-config.c
    not to call the tree_find_foo fns.  */
    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)
 
 
 
index a69957787a2a3f51c6279353c53a826b457749a9..e8ef53434c3627d01b4e17ff8033815d6fcec494 100644 (file)
@@ -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;
index f29e40c4cf6e937f90b35a97d8550b9907f7084f..54d75c27ac5d61c9111dad60ecf405af8bd2b27e 100644 (file)
@@ -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;
index 60e204604a665a2cc43c3a30df96f611422e2d36..c01cea0455d8defb1981e10dabeb7fc5a1e3ec05 100644 (file)
@@ -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,
index d67fb9ceb257fb006ba09bb38fe9c189900684bb..0c1cb7af438f536cd6307eb956ef25f6a2118837 100644 (file)
@@ -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);
index 4cfb92559242cf2e32003d0c7b7c529997bca60f..ef7d2cee19938d05be1f60a5710b79859ef8e329 100644 (file)
@@ -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;
     }
index 1fca5de8839403e69b665624aa570cf53843fee0..e25275695fa5fc6618c6a8a61249572bf57b3e43 100644 (file)
@@ -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
        {
index 44e24fe5aba2d1879135ca5ec2fcebe5f71f423b..130e878779180da61ed781dda0acca3ecb168442 100644 (file)
@@ -1,3 +1,9 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to
+       LITTLE.
+       * configure: Regenerate.
+
 2015-12-27  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (SIM_OBJS): Delete sim-hload.o.
index 676e9a9270f216613d8084dfe1bbe22321324371..c538ede267fe9ff1f6e91124e358b2fef0168e80 100755 (executable)
@@ -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
 
index ebf8bd350daab3ecea8350a3f5c9d93659c08cd3..7464e342e41476981afe8766a86bd80ece44f598 100644 (file)
@@ -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
index 1e28c12b937870fe27a930deb5162e00d609a5cb..79ce999db9026dccb92db1ce80b0b03d7300a5cc 100644 (file)
@@ -1,3 +1,10 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * arch.h (TARGET_BIG_ENDIAN): Delete.
+       * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to
+       LITTLE.
+       * configure: Regenerate.
+
 2016-01-02  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-if.c (xprintf, eprintf): Delete.
index f765f4a25fd8af67bace63196fa5383e5e8993a2..efd861fe5afada9445649b6e15647c18a09d3e33 100644 (file)
@@ -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
index be7f6fc7739c4d0128ec1ba6833dd2d212ffe4ab..99143377ccf2f65cc895cacafa2bb435350785e9 100755 (executable)
@@ -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
 
index 4e6b1be7d2a5de1a4af8cc7fcb9acc8464756363..5b384a271fff17a7afe6a526c73dfadc255677b5 100644 (file)
@@ -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)
index 6a796bbdb947a4406637c3ed16692f6fa3115a77..1a2f94ff314cc2aa4ae38f72427886aea90d60bd 100644 (file)
@@ -1,3 +1,7 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2015-12-30  Mike Frysinger  <vapier@gentoo.org>
 
        * wrapper.c (d10v_reg_store, d10v_reg_fetch): Define.
index d46ffcb66b06adfb84e555dfa0c77c89d2829f7a..3fd5d8c10c7c070fca28c1356768eae62b267cb7 100755 (executable)
@@ -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
 
index e9a324118b82444128bace343cd270cfce09a3f1..fd23fe6b88c4f634175b4bc8db5700143d6434d1 100644 (file)
@@ -1,3 +1,7 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2015-12-26  Mike Frysinger  <vapier@gentoo.org>
 
        * config.in, configure: Regenerate.
index 94c6fa44132555bfe60e047f7f547c2cdd985853..d12525bc6d4d9c6c280aae609fa87cf149e14875 100755 (executable)
@@ -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
 
index a566ba05b1bbcb1010aa643960d5152d832306cf..dd28834d8ef6693e955de25ab46b67307c2becb7 100644 (file)
@@ -1,3 +1,12 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * reset.c (frv_term): Change current_state to sd.
index 06abe868c6455bfc23907207a24275ef14cc009f..18d09407771132ac0760841695d650c441308068 100644 (file)
@@ -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
index ca3363c6a13ff5725e9f1d77f37752d4586550c7..40b8bdfd1058731271a86feea9e698a6fac83670 100755 (executable)
@@ -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
 
index ebaf6ab3b605e55905b4f7958d65e06f4029d06b..ad73eedd556dbffbb743edb69df36b33998f7c6e 100644 (file)
@@ -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)
index 2b78edb29666b156f4b551c6e8b2efd79de07001..594931fadfd14f7a605099ad9b8e9f6aa7768331 100644 (file)
@@ -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]);
index 7164c7fe6f58023bbe24ea622aad420eefd2ee8c..3f301648452b229ed30e696327c40bfa12ea52da 100644 (file)
@@ -1,3 +1,9 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to
+       LITTLE.
+       * configure: Regenerate.
+
 2015-12-27  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (SIM_OBJS): Delete sim-hload.o.
index d16b9c5e00dd10507600e993498ac422bcbc6ca7..a12de766b848523826fbfe9ff1758cdb567e130d 100755 (executable)
@@ -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
 
index 2107f74e1852ba10da61ef907b27365820b2f9ae..57573d8c701ef813ba37bec7c7c78ba1ecb913d3 100644 (file)
@@ -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
index 7d87d1fcf18c8d804d7aefd07ac3a858d63a57ba..2327bb48644fc0c60e053059cd928f6d2f3e2968 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to BIG.
+       * configure: Regenerate.
+
 2015-12-30  Mike Frysinger  <vapier@gentoo.org>
 
        * compile.c (sim_state_initialize): Delete.
index 79043dc8f62c50862bd9940aa3b6b074d9ef1ebc..12b72e41c3a68e416ed7f49ac5550c276178028f 100755 (executable)
@@ -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
index 53a02bb3054dd4f38caea8a065b99677748c07d9..39661602733762b9bd4bbb031ea8ff5cc33592d4 100644 (file)
@@ -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)
index 07c6ef67b0d0c4825959e694f4b6922794ed7d09..7fbebd5ebd0324281140ce7bc55fb64b3f2c80de 100644 (file)
@@ -1,3 +1,9 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * arch.h (TARGET_BIG_ENDIAN): Delete.
+       * configure.ac (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to BIG.
+       * configure: Regenerate.
+
 2016-01-02  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-if.c (sim_open): Delete #if 0 sim_add_option_table call.
index ab268325fb57a40a16452330b4e1bdef93db803a..3e062db6cec6999a9731fbdac4445f83572cd444 100644 (file)
@@ -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
index 26937d375ed56baa061a9bed4520095e27d111ca..7f6b7bf6ad6f41e55ea9f72e0425702db1bf5723 100755 (executable)
@@ -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
 
index 78dcbb6c7ed5fbb5c371590b3c0a02a1b3fe3dfd..923ae926fa185699d12609b7bccbce865a611942 100644 (file)
@@ -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)
index 5aaab314303f0bdf804796d6e28c4e9ec301205e..552e848943ec192f212cf60a5a5fae3838c981af 100644 (file)
@@ -1,3 +1,9 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * arch.h (TARGET_BIG_ENDIAN): Delete.
+       * configure.ac (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to BIG.
+       * configure: Regenerate.
+
 2016-01-02  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-if.c (free_state, print_lm32_misc_cpu): Delete prototypes.
index b2ed4b2ec64b6b8609d4ae0bf263a65f836b70ef..720705aee0698f949b73190e7d466d2766ee3ea8 100644 (file)
@@ -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
index be10750066e9fc13344fe9d8c4c2abe779a3165d..3968c92c95e809c324405e2b5980d464f4eabb95 100755 (executable)
@@ -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
 
index 764c611eb89921619260636e2a3ed25b8dcd578f..90f5e2b74e6b93a598893a3243344a0a5a890459 100644 (file)
@@ -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)
index 8b65bb9ee0cdb56747431945580c87841abec1e8..7578315e9fb969d12b8190b72c67fc3815aaaab1 100644 (file)
@@ -1,3 +1,12 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * sim-if.c (sim_open): Delete #if 0 sim_add_option_table call.
index 8341c4c26e2baa3d0102c372de5b49dad76dd2c4..93e7e2ed15799b6d36762da4a7fe60aa19c4bb8b 100644 (file)
@@ -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
index 5c263dacce241b55ab6712584710a44dc80df10a..8742adbc2194003d0c32a661a14e08bce5c1c4cb 100755 (executable)
@@ -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
 
index d92e62b5e15a1601bd9e877d81ca6a2cef7209af..68fb20d3e751332d08ffe3af0e905f4413a64ad5 100644 (file)
@@ -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)
index f2663028a205d61cf305ffbccf86094187823ebf..9220451734769b112eaf7fe4ffbc6fa8534e3610 100644 (file)
@@ -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;
index 1df68108a64ad8fdb179d244c21036acc00b18eb..fb9c4bc72adff50b181f2985faac13b7007d3b35 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to BIG.
+       * configure: Regenerate.
+
 2015-12-30  Mike Frysinger  <vapier@gentoo.org>
 
        * configure.ac: Change LITTLE_ENDIAN to BIG_ENDIAN.
index 3a277d1389e11f8d37f7b64be5765481fd5f8e2a..df2d8725efa1fe10d88294c6c2a1b94c1f0061c7 100755 (executable)
 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
 
index cbfe9e8070b93edc3d4d1b66395b28e2596e1a68..aafbb319fa4ec70f22ee3c3ba0ef3528f29e37fb 100644 (file)
@@ -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
index fb80f2c193046eea9714a7d333594ffc49021c87..ce997149b8810dbf361d161a89b1380cc9add347 100644 (file)
@@ -1,3 +1,7 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2015-12-27  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (SIM_OBJS): Delete sim-hload.o.
index d46ffcb66b06adfb84e555dfa0c77c89d2829f7a..3fd5d8c10c7c070fca28c1356768eae62b267cb7 100755 (executable)
@@ -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
 
index 934677847eb78466faf45dab418aadba2ae855a5..3c21d5ed0ef0eabd609c85c3d99fa26999d6ac19 100644 (file)
@@ -1,3 +1,7 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+
 2015-12-30  Mike Frysinger  <vapier@gentoo.org>
 
        * wrapper.c (sim_store_register): Rename to ...
index d46ffcb66b06adfb84e555dfa0c77c89d2829f7a..3fd5d8c10c7c070fca28c1356768eae62b267cb7 100755 (executable)
@@ -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
 
index a77058e0847625646601d151d7e8b5b9f3a616b1..ba0a50bcceecf0c1f58f4921c03c2706ffbe7d06 100644 (file)
@@ -1,3 +1,10 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * 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  <vapier@gentoo.org>
 
        * dv-tx3904cpu.c (CPU, SD): Delete.
index 6f1d13659fad41cd25a8f0e94d24b1b8f9ad7cc9..c31d65e652910ffde3e67ea4bee4a06fabdae352 100755 (executable)
@@ -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
index 7f04473cc3628bedcb94dfd857cfb514209791fc..91e7b0cdec17205de0c437f046129968654f0421 100644 (file)
@@ -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)
 
index b7e30726914e2f6d975e16595793102f98b0c136..0ea1234fe6b019927e29298f3a745e6e064eb963 100644 (file)
@@ -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 */
index d59a7e85000a846f8c6dd59a3a9283fc89d283d9..1d05f8d4262ba4488500400f3129baea039b6e20 100644 (file)
@@ -1,3 +1,9 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to
+       LITTLE.
+       * configure: Regenerate.
+
 2015-12-30  Mike Frysinger  <vapier@gentoo.org>
 
        * wrapper.c (mn10300_reg_store, mn10300_reg_fetch): Define.
index 6e4246eec16cfb95755e30e5117e09cf7c0bedea..1fac8bffe26f2aaf0cce8ddec37ae08c9a3193ef 100755 (executable)
@@ -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
 
index 037d405e26140beb157abcffee17bca487b5b601..7d3c2239e822830c9038c1965d0746a77e989420 100644 (file)
@@ -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
index 439b69c9995a6624cc03a27f8d692010afa24d62..718e8049ce7cd980d94bd9ec4e546639cda4aaac 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to BIG.
+       * configure: Regenerate.
+
 2015-12-30  Mike Frysinger  <vapier@gentoo.org>
 
        * wrapper.c (sim_store_register): Rename to ...
index 3232de3a52af538f38729eec3270f77ced63d9c7..6990a8ff762da55066465e8577ff9ca62a59e297 100755 (executable)
 
 
 
-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
 
index 34b80ce0e6c64af330ecf384befa0f80a8855ef8..a7f2b8254adf564fae30b57a82b556823ecbbee0 100644 (file)
@@ -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
index dd9aad0be9120372a134c838592a2e369ddbf8a5..db8269e2c9b95fa23012a62b03cca411970d738f 100644 (file)
@@ -1,3 +1,9 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to
+       LITTLE.
+       * configure: Regenerate.
+
 2015-12-27  Mike Frysinger  <vapier@gentoo.org>
 
        * msp430-sim.c (sim_dis_read): Change private_data to application_data.
index 796741b31bde0a3de7fc82a53e4ed0d3c38099e2..229096a07c20a34235d1e17faee85aa89459f200 100755 (executable)
@@ -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
index f24480e0591b48c23f0ad3153da5e0cba9db1df7..b896ce405fdf5dcf3484c5c9dc222762f0a6acf7 100644 (file)
@@ -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
index 0a0bb5682cf18a238adffa3835fff9a1e18a89b4..56e9f1070a9281d481c1e74730c63db100138f2b 100644 (file)
@@ -1,3 +1,10 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure: Regenerate.
+       * interp.c (target_little_endian): Change LITTLE_ENDIAN to
+       BFD_ENDIAN_LITTLE.
+       (host_little_endian): Likewise.
+
 2015-12-30  Mike Frysinger  <vapier@gentoo.org>
 
        * wrapper.c (sim_store_register): Rename to ...
index d46ffcb66b06adfb84e555dfa0c77c89d2829f7a..3fd5d8c10c7c070fca28c1356768eae62b267cb7 100755 (executable)
@@ -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
 
index 3abeda6b028f1f999f9d9866ef18d02fde9c531f..f7c49486cd69f0327f07b1dda72c6b88675b2b9e 100644 (file)
@@ -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;
index 74f89bc9a6bfc2c2553a7b10fa685eec773952cc..18a1d8a9c54f6c9bdec3937f09233550d2cdcaa9 100644 (file)
@@ -1,3 +1,9 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * arch.h (TARGET_BIG_ENDIAN): Delete.
+       * configure.ac (SIM_AC_OPTION_ENDIAN): Change BIG_ENDIAN to BIG.
+       * configure: Regenerate.
+
 2016-01-02  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-if.c (sim_open): Delete #if 0 sim_add_option_table call.
index 88cd0371c89d6750a17e53e6fb50d3132712682d..aaa3991897ddf142b48bcccf4e884a054c2a3747 100644 (file)
@@ -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
index 6310f429c12ef8b8bf602979701d0c851c8f3ed4..7c3b4247cb5b67b8e65068be3741c357fa350cc1 100755 (executable)
@@ -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
 
index c979458acf7dd31fe23e5c6182e226689428aeea..4da1756f2098b7551d7f40be78d289e04eff7b25 100644 (file)
@@ -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)
index f79042009a8e8620f35cd2ea682ef9f5c708f2f2..63ec3edb28cd33254b9248476e91b5c62e251be7 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * common/bits-gen.c (main): Change BIG_ENDIAN to BFD_ENDIAN_BIG and
+       LITTLE_ENDIAN and BFD_ENDIAN_LITTLE.
+
 2015-11-24  Nick Clifton  <nickc@redhat.com>
 
        * configure: Regenerate.
index 84e4372e75d3a6c36945d3e8760052bce4da37b8..6e7dd75b93c8f910452a5f25b8b4111edc9192ed 100644 (file)
@@ -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");
index 2b664881a25fea5004845695d826ae2d622b182a..d21492b0df5bf8a776a13d66b0063fb05a210f92 100644 (file)
@@ -1,3 +1,9 @@
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac (SIM_AC_OPTION_ENDIAN): Change LITTLE_ENDIAN to
+       LITTLE.
+       * configure: Regenerate.
+
 2015-12-30  Mike Frysinger  <vapier@gentoo.org>
 
        * wrapper.c (v850_reg_store, v850_reg_fetch): Define.
index 97113c3caafce82d04f26d8aa4d02fa89079df47..c1e449a413269435fb5d8b94a0a1b9f637bb8d10 100755 (executable)
@@ -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
 
index 1471eeb2a780c695938fa65fd5f8e8971b72b137..0ac54e072656ef4a30ac144c8afb9953f828e1cb 100644 (file)
@@ -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