OSDN Git Service

* configure.in (host_xm_file, build_xm_file): Include hwint.h.
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Apr 1999 07:27:38 +0000 (07:27 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Apr 1999 07:27:38 +0000 (07:27 +0000)
        Use case statements instead of "if test -a ... -a ... -a ..."
        * machmode.h: Don't define HOST_WIDE_INT, etc. Wrap use of
        HOST_WIDE_INT in #ifdef.
        * mips.h: Include hwint.h instead of providing definitions for
        HOST_WIDE_INT, etc.  Wrap uses of HOST_WIDE_INT in #ifdef.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26291 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/mips/mips.h
gcc/configure
gcc/configure.in
gcc/machmode.h

index 8bcadbe..a5abdeb 100644 (file)
@@ -1,3 +1,14 @@
+Thu Apr  8 10:22:23 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * configure.in (host_xm_file, build_xm_file): Include hwint.h.
+       Use case statements instead of "if test -a ... -a ... -a ..."
+
+       * machmode.h: Don't define HOST_WIDE_INT, etc. Wrap use of
+       HOST_WIDE_INT in #ifdef.
+
+       * mips.h: Include hwint.h instead of providing definitions for
+       HOST_WIDE_INT, etc.  Wrap uses of HOST_WIDE_INT in #ifdef.
+
 Thu Apr  8 06:16:14 EDT 1999  John Wehle  (john@feith.com)
 
        * i386.md (truncdfsf2, truncxfsf2,
index 4358a70..d28e26a 100644 (file)
@@ -162,27 +162,17 @@ extern struct rtx_def *embedded_pic_fnaddr_rtx;   /* function address */
 extern int mips_string_length;         /* length of strings for mips16 */
 extern struct rtx_def *mips16_gp_pseudo_rtx; /* psuedo reg holding $gp */
 
-/* Functions within mips.c that we reference.  Some of these return  type
-   HOST_WIDE_INT, so define that here.  This is a copy of code in machmode.h.
+/* Functions within mips.c that we reference.  Some of these return
+   type HOST_WIDE_INT, so define that here.  */
 
-   ??? It would be good to try to put this as common code someplace.  */
-
-#ifndef HOST_BITS_PER_WIDE_INT
-
-#if HOST_BITS_PER_LONG > HOST_BITS_PER_INT
-#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
-#define HOST_WIDE_INT long
-#else
-#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT
-#define HOST_WIDE_INT int
-#endif
-
-#endif
+#include "hwint.h"
 
 extern int             arith32_operand ();
 extern int             arith_operand ();
 extern int             cmp_op ();
+#ifdef HOST_WIDE_INT
 extern HOST_WIDE_INT   compute_frame_size ();
+#endif
 extern int             const_float_1_operand ();
 extern void            expand_block_move ();
 extern int             equality_op ();
@@ -205,7 +195,9 @@ extern void         mips_asm_file_start ();
 extern int             mips_can_use_return_insn ();
 extern int             mips_const_double_ok ();
 extern void            mips_count_memory_refs ();
+#ifdef HOST_WIDE_INT
 extern HOST_WIDE_INT   mips_debugger_offset ();
+#endif
 extern void            mips_declare_object ();
 extern int             mips_epilogue_delay_slots ();
 extern void            mips_expand_epilogue ();
index d159bae..c6c2842 100755 (executable)
@@ -5795,14 +5795,14 @@ fi
 # auto-host.h is the file containing items generated by autoconf and is
 # the first file included by config.h.
 null_defines=
-host_xm_file="auto-host.h gansidecl.h ${host_xm_file}"
+host_xm_file="auto-host.h gansidecl.h ${host_xm_file} hwint.h"
 
 # If host=build, it is correct to have hconfig include auto-host.h
 # as well.  If host!=build, we are in error and need to do more 
 # work to find out the build config parameters.
 if test x$host = x$build
 then
-       build_xm_file="auto-host.h gansidecl.h ${build_xm_file}"
+       build_xm_file="auto-host.h gansidecl.h ${build_xm_file} hwint.h"
 else
        # We create a subdir, then run autoconf in the subdir.
        # To prevent recursion we set host and build for the new
@@ -5824,7 +5824,7 @@ else
        mv auto-host.h ../auto-build.h
        cd ..
        rm -rf $tempdir
-       build_xm_file="auto-build.h gansidecl.h ${build_xm_file}"
+       build_xm_file="auto-build.h gansidecl.h ${build_xm_file} hwint.h"
 fi
 
 xm_file="gansidecl.h ${xm_file}"
@@ -7817,29 +7817,29 @@ out_object_file=`basename $out_file .c`.o
 
 tm_file_list=
 for f in $tm_file; do
-       if test $f != "gansidecl.h" ; then
-               tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-       else
-               tm_file_list="${tm_file_list} $f"
-       fi
+  case $f in
+    gansidecl.h )
+       tm_file_list="${tm_file_list} $f" ;;
+    *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
+  esac
 done
 
 host_xm_file_list=
 for f in $host_xm_file; do
-       if test $f != "auto-host.h" -a $f != "gansidecl.h" ; then
-               host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
-       else
-               host_xm_file_list="${host_xm_file_list} $f"
-       fi
+  case $f in
+    auto-host.h | gansidecl.h | hwint.h )
+       host_xm_file_list="${host_xm_file_list} $f" ;;
+    *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
+  esac
 done
 
 build_xm_file_list=
 for f in $build_xm_file; do
-       if test $f != "auto-build.h" -a $f != "auto-host.h" -a $f != "gansidecl.h" ; then
-               build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
-       else
-               build_xm_file_list="${build_xm_file_list} $f"
-       fi
+  case $f in
+    auto-build.h | auto-host.h | gansidecl.h | hwint.h )
+       build_xm_file_list="${build_xm_file_list} $f" ;;
+    *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
+  esac
 done
 
 # Define macro CROSS_COMPILE in compilation
index 2b1dd42..7585237 100644 (file)
@@ -3551,14 +3551,14 @@ fi
 # auto-host.h is the file containing items generated by autoconf and is
 # the first file included by config.h.
 null_defines=
-host_xm_file="auto-host.h gansidecl.h ${host_xm_file}"
+host_xm_file="auto-host.h gansidecl.h ${host_xm_file} hwint.h"
 
 # If host=build, it is correct to have hconfig include auto-host.h
 # as well.  If host!=build, we are in error and need to do more 
 # work to find out the build config parameters.
 if test x$host = x$build
 then
-       build_xm_file="auto-host.h gansidecl.h ${build_xm_file}"
+       build_xm_file="auto-host.h gansidecl.h ${build_xm_file} hwint.h"
 else
        # We create a subdir, then run autoconf in the subdir.
        # To prevent recursion we set host and build for the new
@@ -3580,7 +3580,7 @@ else
        mv auto-host.h ../auto-build.h
        cd ..
        rm -rf $tempdir
-       build_xm_file="auto-build.h gansidecl.h ${build_xm_file}"
+       build_xm_file="auto-build.h gansidecl.h ${build_xm_file} hwint.h"
 fi
 
 xm_file="gansidecl.h ${xm_file}"
@@ -3726,29 +3726,29 @@ out_object_file=`basename $out_file .c`.o
 
 tm_file_list=
 for f in $tm_file; do
-       if test $f != "gansidecl.h" ; then
-               tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-       else
-               tm_file_list="${tm_file_list} $f"
-       fi
+  case $f in
+    gansidecl.h )
+       tm_file_list="${tm_file_list} $f" ;;
+    *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
+  esac
 done
 
 host_xm_file_list=
 for f in $host_xm_file; do
-       if test $f != "auto-host.h" -a $f != "gansidecl.h" ; then
-               host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
-       else
-               host_xm_file_list="${host_xm_file_list} $f"
-       fi
+  case $f in
+    auto-host.h | gansidecl.h | hwint.h )
+       host_xm_file_list="${host_xm_file_list} $f" ;;
+    *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
+  esac
 done
 
 build_xm_file_list=
 for f in $build_xm_file; do
-       if test $f != "auto-build.h" -a $f != "auto-host.h" -a $f != "gansidecl.h" ; then
-               build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
-       else
-               build_xm_file_list="${build_xm_file_list} $f"
-       fi
+  case $f in
+    auto-build.h | auto-host.h | gansidecl.h | hwint.h )
+       build_xm_file_list="${build_xm_file_list} $f" ;;
+    *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
+  esac
 done
 
 # Define macro CROSS_COMPILE in compilation
index 595d8bd..5814007 100644 (file)
@@ -24,20 +24,6 @@ Boston, MA 02111-1307, USA.  */
 /* Strictly speaking, this isn't the proper place to include these definitions,
    but this file is included by every GCC file. */
 
-/* Find the largest host integer type and set its size and type.  */
-
-#ifndef HOST_BITS_PER_WIDE_INT
-
-#if HOST_BITS_PER_LONG > HOST_BITS_PER_INT
-#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
-#define HOST_WIDE_INT long
-#else
-#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT
-#define HOST_WIDE_INT int
-#endif
-
-#endif
-
 /* Provide a default way to print an address in hex via printf.  */
 
 #ifndef HOST_PTR_PRINTF
@@ -50,69 +36,6 @@ Boston, MA 02111-1307, USA.  */
 # endif
 #endif /* ! HOST_PTR_PRINTF */
 
-/* Provide defaults for the way to print a HOST_WIDE_INT
-   in various manners.  */
-
-#ifndef HOST_WIDE_INT_PRINT_DEC
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
-#define HOST_WIDE_INT_PRINT_DEC "%d"
-#else
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
-#define HOST_WIDE_INT_PRINT_DEC "%ld"
-#else
-#define HOST_WIDE_INT_PRINT_DEC "%lld"
-#endif
-#endif
-#endif
-
-#ifndef HOST_WIDE_INT_PRINT_UNSIGNED
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
-#define HOST_WIDE_INT_PRINT_UNSIGNED "%u"
-#else
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
-#define HOST_WIDE_INT_PRINT_UNSIGNED "%lu"
-#else
-#define HOST_WIDE_INT_PRINT_UNSIGNED "%llu"
-#endif
-#endif
-#endif
-
-#ifndef HOST_WIDE_INT_PRINT_HEX
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
-#define HOST_WIDE_INT_PRINT_HEX "0x%x"
-#else
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
-#define HOST_WIDE_INT_PRINT_HEX "0x%lx"
-#else
-#define HOST_WIDE_INT_PRINT_HEX "0x%llx"
-#endif
-#endif
-#endif
-
-#ifndef HOST_WIDE_INT_PRINT_DOUBLE_HEX
-#if HOST_BITS_PER_WIDE_INT == 64
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
-#define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%x%016x"
-#else
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
-#define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%lx%016lx"
-#else
-#define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%llx%016llx"
-#endif
-#endif
-#else
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
-#define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%x%08x"
-#else
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
-#define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%lx%08lx"
-#else
-#define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%llx%08llx"
-#endif
-#endif
-#endif
-#endif
-
 /* Make an enum class that gives all the machine modes.  */
 
 #define DEF_MACHMODE(SYM, NAME, TYPE, SIZE, UNIT, WIDER)  SYM,
@@ -181,6 +104,8 @@ extern int mode_unit_size[];
 
 #define GET_MODE_BITSIZE(MODE)  (BITS_PER_UNIT * mode_size[(int) (MODE)])
 
+#ifdef HOST_WIDE_INT
+
 /* Get a bitmask containing 1 for all bits in a word
    that fit within mode MODE.  */
 
@@ -188,6 +113,8 @@ extern unsigned HOST_WIDE_INT mode_mask_array[];
 
 #define GET_MODE_MASK(MODE) mode_mask_array[(int) (MODE)]
 
+#endif /* HOST_WIDE_INT */
+
 /* Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI).  */
 
 extern unsigned char mode_wider_mode[];