* cris/dv-cris.c, cris/dv-rv.c, cris/rvdummy.c: New files.
[deliverable/binutils-gdb.git] / sim / cris / sim-main.h
index b67153300651a41bf789def7ec041e0720d564b8..483046d90ee18749b1bd7d9ba8734785b3525d23 100644 (file)
@@ -1,5 +1,5 @@
 /* Main header for the CRIS simulator, based on the m32r header.
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
    Contributed by Axis Communications.
 
 This file is part of the GNU simulators.
@@ -117,6 +117,10 @@ struct cris_thread_info {
   char sigsuspended;
 };
 
+typedef int (*cris_interrupt_delivery_fn) (SIM_CPU *,
+                                          enum cris_interrupt_type,
+                                          unsigned int);
+
 struct _sim_cpu {
   /* sim/common cpu base.  */
   sim_cpu_base base;
@@ -132,6 +136,11 @@ struct _sim_cpu {
   CRIS_MISC_PROFILE cris_prev_misc_profile;
 #define CPU_CRIS_PREV_MISC_PROFILE(cpu) (& (cpu)->cris_prev_misc_profile)
 
+#if WITH_HW
+  cris_interrupt_delivery_fn deliver_interrupt;
+#define CPU_CRIS_DELIVER_INTERRUPT(cpu) (cpu->deliver_interrupt)
+#endif
+
   /* Simulator environment data.  */
   USI endmem;
   USI endbrk;
@@ -166,6 +175,17 @@ struct _sim_cpu {
      for sigmasks and sigpendings. */
   USI sighandler[64];
 
+  /* This is a hack to implement just the parts of fcntl F_GETFL that
+     are used in open+fdopen calls for the standard scenario: for such
+     a call we check that the last syscall was open, we check that the
+     passed fd is the same returned then, and so we return the same
+     flags passed to open.  This way, we avoid complicating the
+     generic sim callback machinery by introducing fcntl
+     mechanisms.  */
+  USI last_syscall;
+  USI last_open_fd;
+  USI last_open_flags;
+
   /* Function for initializing CPU thread context, which varies in size
      with each CPU model.  They should be in some constant parts or
      initialized in *_init_cpu, but we can't modify that for now.  */
This page took 0.024876 seconds and 4 git commands to generate.