* sim/cris/asm/movmp8.ms, sim/cris/asm/pcplus.ms: New tests.
[deliverable/binutils-gdb.git] / sim / cris / sim-main.h
index 52640684054029eaba9b59d7499b60cf303ce37c..b35b927278ef4e9af65dd11ee4ba53f4affab672 100644 (file)
@@ -56,9 +56,6 @@ do { \
 #include "sim-base.h"
 #include "cgen-sim.h"
 #include "cris-sim.h"
-
-/* For occurrences of ANDIF in decodev32.c.  */
-#include "cgen-ops.h"
 \f
 struct cris_sim_mmapped_page {
   USI addr;
@@ -169,6 +166,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.025769 seconds and 4 git commands to generate.