]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: assume recentish compiler/systems
authorMike Frysinger <vapier@gentoo.org>
Tue, 23 Jun 2015 17:54:52 +0000 (23:39 +0545)
committerMike Frysinger <vapier@gentoo.org>
Tue, 23 Jun 2015 18:04:49 +0000 (14:04 -0400)
Assume the build system supports stdint.h/stdarg.h as those have been
around long enough and we don't care about pre-stdc compilers anymore.

sim/arm/ChangeLog
sim/arm/armdefs.h
sim/arm/dbg_hif.h
sim/common/ChangeLog
sim/common/cgen-trace.c
sim/common/sim-trace.c

index 4cc45a02a084953194c82f6b778b8133a2bd5b6e..22b74db2dc5b82d56e62a8368ba5c49c1517f9e2 100644 (file)
@@ -1,3 +1,10 @@
+2015-06-23  Mike Frysinger  <vapier@gentoo.org>
+
+       * armdefs.h: Always include stdint.h.
+       [!__STDC__]: Delete.
+       [!HAVE_STDINT_H]: Delete.
+       * dbg_hif.h [!__STDC__]: Delete.
+
 2015-06-12  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 50a0619cccc3e93f0ee365f8cd9252dcd28d35a7..08a61f228c830650e1b847f36cfbb49f338a50fb 100644 (file)
@@ -17,6 +17,7 @@
 #include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdint.h>
 
 #define FALSE 0
 #define TRUE 1
 #define LOWHIGH 1
 #define HIGHLOW 2
 
-#ifndef __STDC__
-typedef char *VoidStar;
-#endif
-
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
 typedef uint32_t ARMword;
 typedef int32_t ARMsword;
 typedef uint64_t ARMdword;
 typedef int64_t ARMsdword;
-#else
-typedef unsigned int ARMword;  /* must be 32 bits wide */
-typedef signed int ARMsword;
-typedef unsigned long long ARMdword;   /* Must be at least 64 bits wide.  */
-typedef signed long long ARMsdword;
-#endif
 typedef struct ARMul_State ARMul_State;
 
 typedef unsigned ARMul_CPInits (ARMul_State * state);
index 3c6261a749cc44561a7f8592ce549b57192460ad..686ed3047994ca4d049c77e8c67391719c8b3383 100644 (file)
     You should have received a copy of the GNU General Public License
     along with this program; if not, see <http://www.gnu.org/licenses/>. */
 
-#ifdef __STDC__
-#  include <stdarg.h>
-#else
-#  include <varargs.h>
-#endif
+#include <stdarg.h>
 
 typedef void Hif_DbgPrint (void *arg, const char *format, va_list ap);
 typedef void Hif_DbgPause (void *arg);
index 722ad9884369af85952841b7ba8daebd24cb3206..0f0773deb813223436b4701423e94b97b4535a5f 100644 (file)
@@ -1,3 +1,8 @@
+2015-06-23  Mike Frysinger  <vapier@gentoo.org>
+
+       * cgen-trace.c [!__STDC__]: Delete.
+       * sim-trace.h [!__STDC__]: Likewise.
+
 2015-06-21  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-model.c (sim_model_init): Assert model is not NULL.
index 566f2e689f51042ca14e8b2fe17e8a5daf0085ea..f163a6e4f64db3320af82d345c09d844316a4d65 100644 (file)
@@ -302,18 +302,10 @@ cgen_trace_printf (SIM_CPU *cpu, char *fmt, ...)
 int
 sim_disasm_sprintf (SFILE *f, const char *format, ...)
 {
-#ifndef __STDC__
-  SFILE *f;
-  const char *format;
-#endif
   int n;
   va_list args;
 
   va_start (args, format);
-#ifndef __STDC__
-  f = va_arg (args, SFILE *);
-  format = va_arg (args, char *);
-#endif
   vsprintf (f->current, format, args);
   f->current += n = strlen (f->current);
   va_end (args);
index f00fe9bc3afae773a42bab57778b0d8ad30dd1e3..f5ee67842b16bd0f6f0c977d465b533fe376689d 100644 (file)
@@ -1294,19 +1294,9 @@ trace_one_insn (SIM_DESC sd, sim_cpu *cpu, address_word pc,
 void
 trace_printf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...)
 {
-#if !defined __STDC__ && !defined ALMOST_STDC
-  SIM_DESC sd;
-  sim_cpu *cpu;
-  const char *fmt;
-#endif
   va_list ap;
 
   va_start (ap, fmt);
-#if !defined __STDC__ && !defined ALMOST_STDC
-  sd = va_arg (ap, SIM_DESC);
-  cpu = va_arg (ap, sim_cpu *);
-  fmt = va_arg (ap, const char *);
-#endif
 
   trace_vprintf (sd, cpu, fmt, ap);
 
@@ -1316,17 +1306,9 @@ trace_printf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...)
 void
 debug_printf (sim_cpu *cpu, const char *fmt, ...)
 {
-#if !defined __STDC__ && !defined ALMOST_STDC
-  sim_cpu *cpu;
-  const char *fmt;
-#endif
   va_list ap;
 
   va_start (ap, fmt);
-#if !defined __STDC__ && !defined ALMOST_STDC
-  cpu = va_arg (ap, sim_cpu *);
-  fmt = va_arg (ap, const char *);
-#endif
 
   if (CPU_DEBUG_FILE (cpu) == NULL)
     (* STATE_CALLBACK (CPU_STATE (cpu))->evprintf_filtered)