]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[wip] always compile in cgen logic users/vapier/sim/cpu-uni
authorMike Frysinger <vapier@gentoo.org>
Wed, 9 Nov 2022 03:31:53 +0000 (10:31 +0700)
committerMike Frysinger <vapier@gentoo.org>
Thu, 10 Nov 2022 18:44:21 +0000 (01:44 +0700)
see if sizeof cgen structs differ in some way.

sim/common/cgen-cpu.h
sim/common/cgen-defs.h
sim/common/cgen-scache.h
sim/common/sim-cpu.h

index d65e0dba0b2002c50086668bc18184d821ba709b..6b0f85cf2f6999946855879eb59f780dc4e56af8 100644 (file)
@@ -105,6 +105,6 @@ typedef struct {
 
 /* Shorthand macro for fetching registers.
    CPU_CGEN_HW is defined in cpu.h.  */
-#define CPU(x) (CPU_CGEN_HW (current_cpu)->x)
+//#define CPU(x) (CPU_CGEN_HW (current_cpu)->x)
 
 #endif /* CGEN_CPU_H */
index b9e0c06f39d1a2d25e1de8040e47f94914f5abd2..ff01705aef142b348ce3364188d4bb712625b429 100644 (file)
@@ -20,6 +20,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef CGEN_DEFS_H
 #define CGEN_DEFS_H
 
+#include "opcode/cgen.h"
+#include "cgen-types.h"
+
 /* Compute number of longs required to hold N bits.  */
 #define HOST_LONGS_FOR_BITS(n) \
   (((n) + sizeof (long) * 8 - 1) / sizeof (long) * 8)
index 104392032b0226cc318dc5c6b277fcea22e41d11..29e808323d51ba10185c2371b4b10e78e0f045fe 100644 (file)
@@ -20,6 +20,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef CGEN_SCACHE_H
 #define CGEN_SCACHE_H
 
+#include "cgen-types.h"
+
 /* When caching bb's, instructions are extracted into "chains".
    SCACHE_MAP is a hash table into these chains.  */
 
index 90e294eb3c605dac479c90e526fa83e151f2d9b6..8994a19866dfac3e3cbaaa144575775b500b68cb 100644 (file)
@@ -28,9 +28,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 /* Type of function to return an insn name.  */
 typedef const char * (CPU_INSN_NAME_FN) (sim_cpu *, int);
 
-#ifdef CGEN_ARCH
-# include "cgen-cpu.h"
-#endif
+#include "cgen-cpu.h"
 
 /* Types for register access functions.
    These routines implement the sim_{fetch,store}_register interface.  */
@@ -123,11 +121,9 @@ struct _sim_cpu {
   PC_STORE_FN *pc_store;
 #define CPU_PC_STORE(c) ((c)->pc_store)
 
-#ifdef CGEN_ARCH
   /* Static parts of cgen.  */
   CGEN_CPU cgen_cpu;
 #define CPU_CGEN_CPU(cpu) ((cpu)->cgen_cpu)
-#endif
 
   /* Pointer for sim target to store arbitrary cpu data.  Normally the
      target should define a struct and use it here.  */