aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/ppc/ChangeLog4
-rw-r--r--sim/ppc/inline.c4
-rw-r--r--sim/ppc/inline.h9
-rw-r--r--sim/ppc/options.c4
-rw-r--r--sim/ppc/options.h30
-rw-r--r--sim/ppc/std-config.h28
6 files changed, 76 insertions, 3 deletions
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index cd96e8e..ec5b7c8 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -20,6 +20,10 @@ Wed Nov 15 17:32:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
* {ppc-instructions,igen.c}: More global changes to add model
specific features.
+ * inline.{c,h}: Provide for inlining options.c.
+ * options.{c,h}: Ditto.
+ * std-config.h: Add OPTIONS_INLINE.
+
Tue Nov 14 04:47:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
* Makefile.in (devices.o, main.o): Update dependency.
diff --git a/sim/ppc/inline.c b/sim/ppc/inline.c
index 894f0c9..b025745 100644
--- a/sim/ppc/inline.c
+++ b/sim/ppc/inline.c
@@ -54,6 +54,10 @@
#include "model.c"
#endif
+#if OPTIONS_INLINE
+#include "options.c"
+#endif
+
#if FUNCTION_UNIT_INLINE
#include "function_unit.c"
#endif
diff --git a/sim/ppc/inline.h b/sim/ppc/inline.h
index 0c191f5..c6112f3 100644
--- a/sim/ppc/inline.h
+++ b/sim/ppc/inline.h
@@ -69,6 +69,7 @@
#define INLINE_MODEL static
#endif
#define STATIC_MODEL static
+#define EXTERN_MODEL static
#endif
#if BITS_INLINE
@@ -162,5 +163,13 @@
#endif
#endif
+#if OPTIONS_INLINE
+#if OPTIONS_INLINE == 2
+#define INLINE_OPTIONS static INLINE
+#else
+#define INLINE_OPTIONS static
+#endif
+#endif
+
#endif
diff --git a/sim/ppc/options.c b/sim/ppc/options.c
index a48a3b7..7240b58 100644
--- a/sim/ppc/options.c
+++ b/sim/ppc/options.c
@@ -85,7 +85,7 @@ options_mon (int mon)
return "UNKNOWN";
}
-void
+INLINE_OPTIONS void
print_options (void)
{
#if defined(_GNUC_) && defined(__VERSION__)
@@ -96,6 +96,7 @@ 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);
@@ -129,6 +130,7 @@ print_options (void)
printf_filtered ("SEMANTICS_INLINE = %d\n", SEMANTICS_INLINE);
printf_filtered ("IDECODE_INLINE = %d\n", IDECODE_INLINE);
printf_filtered ("FUNCTION_UNIT_INLINE = %d\n", FUNCTION_UNIT_INLINE);
+ printf_filtered ("OPTIONS_INLINE = %d\n", FUNCTION_UNIT_INLINE);
#ifdef OPCODE_RULES
printf_filtered ("OPCODE rules = %s\n", OPCODE_RULES);
diff --git a/sim/ppc/options.h b/sim/ppc/options.h
new file mode 100644
index 0000000..e27b6ae
--- /dev/null
+++ b/sim/ppc/options.h
@@ -0,0 +1,30 @@
+/* This file is part of the program psim.
+
+ Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
+
+ 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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ */
+
+#ifndef _OPTIONS_H_
+#define _OPTIONS_H_
+
+#ifndef INLINE_OPTIONS
+#define INLINE_OPTIONS
+#endif
+
+INLINE_OPTIONS void print_options (void);
+
+#endif /* _OPTIONS_H_ */
diff --git a/sim/ppc/std-config.h b/sim/ppc/std-config.h
index 8a77d3a..6195db7 100644
--- a/sim/ppc/std-config.h
+++ b/sim/ppc/std-config.h
@@ -49,6 +49,17 @@ extern int current_target_byte_order;
: current_target_byte_order)
+/* PowerPC XOR endian.
+
+ In addition to the above, the simulator can support the PowerPC's
+ horrible XOR endian mode. This feature makes it possible to
+ control the endian mode of a processor using the MSR. */
+
+#ifndef WITH_XOR_ENDIAN
+#define WITH_XOR_ENDIAN 8
+#endif
+
+
/* Intel host BSWAP support:
Whether to use bswap on the 486 and pentiums rather than the 386
@@ -69,7 +80,7 @@ extern int current_target_byte_order;
/options/smp@<nr-cpu> */
#ifndef WITH_SMP
-#define WITH_SMP 2
+#define WITH_SMP 5
#endif
#if WITH_SMP
#define MAX_NR_PROCESSORS WITH_SMP
@@ -343,7 +354,11 @@ extern ppc_model current_ppc_model;
/* Your compilers inline reserved word */
#ifndef INLINE
-#if defined(__GNUC__) && defined(__OPTIMIZE__)
+#if defined(__GNUC__) && defined(__OPTIMIZE__) && \
+ (DEFAULT_INLINE || SIM_ENDIAN_INLINE || BITS_INLINE || CPU_INLINE || VM_INLINE || CORE_INLINE \
+ || EVENTS_INLINE || MON_INLINE || INTERRUPTS_INLINE || REGISTERS_INLINE || DEVICE_TREE_INLINE \
+ || DEVICES_INLINE || SPREG_INLINE || SEMANTICS_INLINE || IDECODE_INLINE || MODEL_INLINE \
+ || FUNCTION_UNIT_INLINE)
#define INLINE __inline__
#else
#define INLINE /*inline*/
@@ -485,4 +500,13 @@ extern ppc_model current_ppc_model;
#define FUNCTION_UNIT_INLINE DEFAULT_INLINE
#endif
+/* Code to print out what options we were compiled with. Because this
+ is called at process startup, it doesn't have to be inlined, but
+ if it isn't brought in and the model routines are inline, the model
+ routines will be pulled in twice. */
+
+#ifndef OPTIONS_INLINE
+#define OPTIONS_INLINE (DEFAULT_INLINE ? 1 : 0)
+#endif
+
#endif /* _CONFIG_H */