[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb-cvs
Subject:    [binutils-gdb] sim: cgen: require long long support
From:       Michael Frysinger via Gdb-cvs <gdb-cvs () sourceware ! org>
Date:       2021-06-29 5:58:21
Message-ID: 20210629055821.B7EA83848021 () sourceware ! org
[Download RAW message or body]

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1fb164a112015fc79ee6aa71102e8409c8172f77

commit 1fb164a112015fc79ee6aa71102e8409c8172f77
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sun Jun 27 21:36:03 2021 -0400

    sim: cgen: require long long support
    
    We require C11 now, so we can assume & require long long exists.
    Drop this old code that hasn't been used for a long long time.

Diff:
---
 sim/common/ChangeLog    |  6 ++++++
 sim/common/cgen-types.h | 18 ------------------
 sim/common/cgen-utils.c | 11 -----------
 3 files changed, 6 insertions(+), 29 deletions(-)

diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 56c7dc666dc..2faba1fc8fb 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,9 @@
+2021-06-29  Mike Frysinger  <vapier@gentoo.org>
+
+	* cgen-types.h (HAVE_LONGLONG): Delete define.
+	[!HAVE_LONGLONG]: Delete all protected code.
+	* cgen-utils.c (make_struct_di): Delete.
+
 2021-06-27  Mike Frysinger  <vapier@gentoo.org>
 
 	* cgen-trace.c: Include diagnostics.h.
diff --git a/sim/common/cgen-types.h b/sim/common/cgen-types.h
index c002876803c..cb71b6bdda1 100644
--- a/sim/common/cgen-types.h
+++ b/sim/common/cgen-types.h
@@ -31,10 +31,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #define SIM_HAVE_ADDR_RANGE
 
 #ifdef __GNUC__
-#define HAVE_LONGLONG
 #undef DI_FN_SUPPORT
 #else
-#undef HAVE_LONGLONG
 #define DI_FN_SUPPORT
 #endif
 
@@ -68,7 +66,6 @@ typedef unsigned8 UQI;
 typedef unsigned16 UHI;
 typedef unsigned32 USI;
 
-#ifdef HAVE_LONGLONG
 typedef signed64 DI;
 typedef unsigned64 UDI;
 #define GETLODI(di) ((SI) (di))
@@ -76,21 +73,6 @@ typedef unsigned64 UDI;
 #define SETLODI(di, val) ((di) = (((di) & 0xffffffff00000000LL) | (val)))
 #define SETHIDI(di, val) ((di) = (((di) & 0xffffffffLL) | (((DI) (val)) << 32)))
 #define MAKEDI(hi, lo) ((((DI) (SI) (hi)) << 32) | ((UDI) (USI) (lo)))
-#else
-/* DI mode support if "long long" doesn't exist.
-   At one point CGEN supported K&R C compilers, and ANSI C compilers without
-   "long long".  One can argue the various merits of keeping this in or
-   throwing it out.  I went to the trouble of adding it so for the time being
-   I'm leaving it in.  */
-typedef struct { SI hi,lo; } DI;
-typedef DI UDI;
-#define GETLODI(di) ((di).lo)
-#define GETHIDI(di) ((di).hi)
-#define SETLODI(di, val) ((di).lo = (val))
-#define SETHIDI(di, val) ((di).hi = (val))
-extern DI make_struct_di (SI, SI);
-#define MAKEDI(hi, lo) (make_struct_di ((hi), (lo)))
-#endif
 
 /* These are used to record extracted raw data from an instruction, among other
    things.  It must be a host data type, and not a target one.  */
diff --git a/sim/common/cgen-utils.c b/sim/common/cgen-utils.c
index 529d80dfb15..8c0856c795b 100644
--- a/sim/common/cgen-utils.c
+++ b/sim/common/cgen-utils.c
@@ -117,17 +117,6 @@ cgen_cpu_max_extra_bytes (void)
 
 #ifdef DI_FN_SUPPORT
 
-DI
-make_struct_di (hi, lo)
-     SI hi, lo;
-{
-  DI result;
-
-  result.hi = hi;
-  result.lo = lo;
-  return result;
-}
-
 DI
 ANDDI (a, b)
      DI a, b;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic