aboutsummaryrefslogtreecommitdiff
path: root/sim/common
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-04-18 04:08:56 -0400
committerMike Frysinger <vapier@gentoo.org>2015-04-18 04:14:38 -0400
commit7e83aa92f2d986ba60f124287a9fd1e534fbbcf8 (patch)
tree910cafbc984799297c2e8b0dc1cfe86dcf13f9c1 /sim/common
parentb9a7202de81202af1337d2cef22db5e3b5bca665 (diff)
downloadgdb-7e83aa92f2d986ba60f124287a9fd1e534fbbcf8.zip
gdb-7e83aa92f2d986ba60f124287a9fd1e534fbbcf8.tar.gz
gdb-7e83aa92f2d986ba60f124287a9fd1e534fbbcf8.tar.bz2
sim: unify sim_cia definition
Almost every target defines sim_cia the same way -- either using the address_word type directly, or a type of equivalent size. The only odd one out is sh64 (who has 32bit address_word and 64bit cia), and even that case doesn't seem to make sense. We'll put off clean up though of sh64 and at least set up a sensible default for everyone.
Diffstat (limited to 'sim/common')
-rw-r--r--sim/common/ChangeLog6
-rw-r--r--sim/common/cgen-engine.h4
-rw-r--r--sim/common/sim-base.h3
3 files changed, 8 insertions, 5 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index d5c965c..f437768 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,9 @@
+2015-04-18 Mike Frysinger <vapier@gentoo.org>
+
+ * cgen-engine.h (CIA_ADDR): Delete.
+ * sim-base.h: Update sim_cia example.
+ [!CIA_ADDR] (sim_cia): New typedef.
+
2015-04-17 Mike Frysinger <vapier@gentoo.org>
* cgen-utils.c (cgen_rtx_error): Change CIA_GET to CPU_PC_GET.
diff --git a/sim/common/cgen-engine.h b/sim/common/cgen-engine.h
index 3de1407..70a4029 100644
--- a/sim/common/cgen-engine.h
+++ b/sim/common/cgen-engine.h
@@ -186,8 +186,6 @@ do { \
#if WITH_SCACHE
-#define CIA_ADDR(cia) (cia)
-
#if WITH_SCACHE_PBB
/* Return the scache pointer of the current insn. */
@@ -280,8 +278,6 @@ do { \
/* This is the "simple" engine case. */
-#define CIA_ADDR(cia) (cia)
-
#define SEM_SEM_ARG(vpc, sc) (sc)
#define SEM_NEXT_VPC(sem_arg, pc, len) ((pc) + (len))
diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
index 0dae541..e90e07c 100644
--- a/sim/common/sim-base.h
+++ b/sim/common/sim-base.h
@@ -28,9 +28,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
information), include ``sim-base.h'':
#include "sim-basics.h"
- typedef address_word sim_cia;
/-* If `sim_cia' is not an integral value (e.g. a struct), define
CIA_ADDR to return the integral value. *-/
+ /-* typedef struct {...} sim_cia; *-/
/-* #define CIA_ADDR(cia) (...) *-/
#include "sim-base.h"
@@ -66,6 +66,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
(e.g. for delay slot handling). */
#ifndef CIA_ADDR
#define CIA_ADDR(cia) (cia)
+typedef address_word sim_cia;
#endif
#ifndef INVALID_INSTRUCTION_ADDRESS
#define INVALID_INSTRUCTION_ADDRESS ((address_word)0 - 1)