summaryrefslogtreecommitdiff
path: root/sim/ppc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-01-04 04:06:01 -0500
committerMike Frysinger <vapier@gentoo.org>2016-01-04 05:04:30 -0500
commit9bbf6f91c6e85ca916ec2c266009167f20f5ecfd (patch)
tree6819794d652596c2af44565c9a87e93c064c40fb /sim/ppc
parent13adda68c54abf2654d01fa6523c379a13e418da (diff)
downloadbinutils-gdb-9bbf6f91c6e85ca916ec2c266009167f20f5ecfd.tar.gz
sim: punt x86-specific bswap logic
The compiler/C library should produce reasonable code for htonl/ntohl, and at least glibc tries pretty hard to always produce good code for them. This logic only had support for 32-bit x86 systems anymore, and it's unlikely people were even opting into this, so drop it all.
Diffstat (limited to 'sim/ppc')
-rw-r--r--sim/ppc/ChangeLog11
-rw-r--r--sim/ppc/INSTALL16
-rw-r--r--sim/ppc/Makefile.in3
-rwxr-xr-xsim/ppc/configure25
-rw-r--r--sim/ppc/configure.ac13
-rw-r--r--sim/ppc/options.c1
-rw-r--r--sim/ppc/sim-endian.h7
-rw-r--r--sim/ppc/std-config.h9
8 files changed, 13 insertions, 72 deletions
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 82fd50b5158..b5d1dd8ae5f 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,14 @@
+2016-01-04 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.ac (sim-bswap): Delete.
+ * configure: Regenerate.
+ * INSTALL: Delete --enable-sim-bswap docs.
+ * Makefile.in (BSWAP_CFLAGS): Delete.
+ (CONFIG_CFLAGS): Delete $(BSWAP_CFLAGS).
+ * options.c (print_options): Delete WITH_BSWAP.
+ * sim-endian.h (htonl, ntohl): Delete.
+ * std-config.h (WITH_BSWAP): Delete.
+
2016-01-02 Mike Frysinger <vapier@gentoo.org>
* main.c (main): Pass SIM_OPEN_STANDALONE to psim_options and
diff --git a/sim/ppc/INSTALL b/sim/ppc/INSTALL
index da288f1629d..8240ac79c5b 100644
--- a/sim/ppc/INSTALL
+++ b/sim/ppc/INSTALL
@@ -480,22 +480,6 @@ with:
---enable-sim-bswap
-
-
-(x86 specific) Use the i486/P5/P6 byte swap instruction.
-
-PSIM contains generic byte swapping code. For the x86 (P[4-6]) PSIM
-can be built so that it uses the bswap instruction instead of relying
-on the compiler to generate byte swap code.
-
-Ex: default
-
-By default, when compiling with GCC-2 on an i486/P5/P6 the bswap
-instruction is used.
-
-
-
--enable-sim-endian=endian
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index 5f689091271..6efa73f6d0d 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -72,7 +72,6 @@ RANLIB = @RANLIB@
SIM_CFLAGS = @sim_cflags@
INLINE_CFLAGS = @sim_inline@
-BSWAP_CFLAGS = @sim_bswap@
ENDIAN_CFLAGS = @sim_endian@
REGPARM_CFLAGS = @sim_regparm@
STDCALL_CFLAGS = @sim_stdcall@
@@ -94,7 +93,7 @@ STDIO_CFLAGS = @sim_stdio@
TERMIO_CFLAGS = @sim_termio@
WARNING_CFLAGS = @sim_warnings@
DEVZERO_CFLAGS = @sim_devzero@
-CONFIG_CFLAGS = $(BSWAP_CFLAGS) \
+CONFIG_CFLAGS = \
$(ENDIAN_CFLAGS) \
$(REGPARM_CFLAGS) \
$(STDCALL_CFLAGS) \
diff --git a/sim/ppc/configure b/sim/ppc/configure
index 1298d38e24f..63f13952576 100755
--- a/sim/ppc/configure
+++ b/sim/ppc/configure
@@ -605,7 +605,7 @@ sim_timebase
sim_env
sim_hostbitsize
sim_igen_smp
-sim_bswap
+sim_hostendian
sim_pk_obj
sim_pk_src
sim_hw_obj
@@ -684,7 +684,6 @@ sim_hw_cflags
sim_default_model
sim_scache
sim_float
-sim_hostendian
sim_endian
sim_bitsize
sim_assert
@@ -734,7 +733,6 @@ enable_option_checking
enable_sim_alignment
enable_sim_assert
enable_sim_bitsize
-enable_sim_bswap
enable_sim_cflags
enable_sim_config
enable_sim_decode_mechanism
@@ -1401,7 +1399,6 @@ Optional Features:
--enable-sim-alignment=align Specify strict or nonstrict alignment.
--enable-sim-assert Specify whether to perform random assertions.
--enable-sim-bitsize=n Specify target bitsize (32 or 64).
- --enable-sim-bswap Use the BSWAP instruction on Intel 486s and Pentiums.
--enable-sim-cflags=opts Extra CFLAGS for use in building simulator
--enable-sim-config=file Override default config file
--enable-sim-decode-mechanism=which Specify the instruction decode mechanism.
@@ -4068,10 +4065,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
sim_inline="-DDEFAULT_INLINE=0"
@@ -5238,21 +5231,6 @@ else
fi
-# Check whether --enable-sim-bswap was given.
-if test "${enable_sim_bswap+set}" = set; then :
- enableval=$enable_sim_bswap; case "${enableval}" in
- yes) sim_bswap="-DWITH_BSWAP=1";;
- no) sim_bswap="-DWITH_BSWAP=0";;
- *) as_fn_error "\"--enable-sim-bswap does not take a value\"" "$LINENO" 5; sim_bswap="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
- echo "Setting bswap flags = $sim_bswap" 6>&1
-fi
-else
- sim_bswap=""
-fi
-
-
# Check whether --enable-sim-cflags was given.
if test "${enable_sim_cflags+set}" = set; then :
enableval=$enable_sim_cflags; case "${enableval}" in
@@ -7943,7 +7921,6 @@ fi
-
ac_config_files="$ac_config_files Makefile"
ac_config_commands="$ac_config_commands default"
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index f1a7e06c9b5..dff48d2a7f6 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -56,18 +56,6 @@ if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then
fi],[sim_bitsize=""])dnl
-AC_ARG_ENABLE(sim-bswap,
-[ --enable-sim-bswap Use the BSWAP instruction on Intel 486s and Pentiums.],
-[case "${enableval}" in
- yes) sim_bswap="-DWITH_BSWAP=1";;
- no) sim_bswap="-DWITH_BSWAP=0";;
- *) AC_MSG_ERROR("--enable-sim-bswap does not take a value"); sim_bswap="";;
-esac
-if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
- echo "Setting bswap flags = $sim_bswap" 6>&1
-fi],[sim_bswap=""])dnl
-
-
AC_ARG_ENABLE(sim-cflags,
[ --enable-sim-cflags=opts Extra CFLAGS for use in building simulator],
[case "${enableval}" in
@@ -902,7 +890,6 @@ AC_SUBST(sim_hw_obj)
AC_SUBST(sim_pk_src)
AC_SUBST(sim_pk_obj)
AC_SUBST(sim_inline)
-AC_SUBST(sim_bswap)
AC_SUBST(sim_endian)
AC_SUBST(sim_regparm)
AC_SUBST(sim_stdcall)
diff --git a/sim/ppc/options.c b/sim/ppc/options.c
index f855c7ba4c6..b8f9f9c12af 100644
--- a/sim/ppc/options.c
+++ b/sim/ppc/options.c
@@ -120,7 +120,6 @@ print_options (void)
printf_filtered ("WITH_HOST_BYTE_ORDER = %s\n", options_byte_order (WITH_HOST_BYTE_ORDER));
printf_filtered ("WITH_TARGET_BYTE_ORDER = %s\n", options_byte_order (WITH_TARGET_BYTE_ORDER));
printf_filtered ("WITH_XOR_ENDIAN = %d\n", WITH_XOR_ENDIAN);
- printf_filtered ("WITH_BSWAP = %d\n", WITH_BSWAP);
printf_filtered ("WITH_SMP = %d\n", WITH_SMP);
printf_filtered ("WITH_HOST_WORD_BITSIZE = %d\n", WITH_HOST_WORD_BITSIZE);
printf_filtered ("WITH_TARGET_WORD_BITSIZE = %d\n", WITH_TARGET_WORD_BITSIZE);
diff --git a/sim/ppc/sim-endian.h b/sim/ppc/sim-endian.h
index c6df0f258d1..9a873333a11 100644
--- a/sim/ppc/sim-endian.h
+++ b/sim/ppc/sim-endian.h
@@ -154,13 +154,6 @@ INLINE_PSIM_ENDIAN(unsigned_8) endian_le2h_8(unsigned_8 x);
# 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)
diff --git a/sim/ppc/std-config.h b/sim/ppc/std-config.h
index 3b6b94363de..04ba654fc55 100644
--- a/sim/ppc/std-config.h
+++ b/sim/ppc/std-config.h
@@ -59,15 +59,6 @@ extern int current_target_byte_order;
#endif
-/* Intel host BSWAP support:
-
- Whether to use bswap on the 486 and pentiums rather than the 386
- sequence that uses xchgb/rorl/xchgb */
-#ifndef WITH_BSWAP
-#define WITH_BSWAP 0
-#endif
-
-
/* SMP support:
Sets a limit on the number of processors that can be simulated. If