/* cpu.h --- declarations for the RX core.
-Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+Copyright (C) 2005, 2007-2012 Free Software Foundation, Inc.
Contributed by Red Hat, Inc.
This file is part of the GNU simulators.
SI r_temp;
DI r_acc;
+
+#ifdef CYCLE_ACCURATE
+ /* If set, RTS/RTSD take 2 fewer cycles. */
+ char fast_return;
+ SI link_register;
+
+ unsigned long long cycle_count;
+ /* Bits saying what kind of memory operands the previous insn had. */
+ int m2m;
+ /* Target register for load. */
+ int rt;
+#endif
} regs_type;
+#define M2M_SRC 0x01
+#define M2M_DST 0x02
+#define M2M_BOTH 0x03
+
#define sp 0
#define psw 16
#define pc 17
- RX_MAKE_HIT_BREAK is the return code for hitting a breakpoint.
- RX_MAKE_EXITED (C) is the return code for exiting with status C.
- RX_MAKE_STOPPED (S) is the return code for stopping on signal S. */
-#define RX_MAKE_STEPPED() (0)
-#define RX_MAKE_HIT_BREAK() (1)
-#define RX_MAKE_EXITED(c) (((int) (c) << 8) + 2)
-#define RX_MAKE_STOPPED(s) (((int) (s) << 8) + 3)
+#define RX_MAKE_STEPPED() (1)
+#define RX_MAKE_HIT_BREAK() (2)
+#define RX_MAKE_EXITED(c) (((int) (c) << 8) + 3)
+#define RX_MAKE_STOPPED(s) (((int) (s) << 8) + 4)
#define RX_STEPPED(r) ((r) == RX_MAKE_STEPPED ())
#define RX_HIT_BREAK(r) ((r) == RX_MAKE_HIT_BREAK ())
-#define RX_EXITED(r) (((r) & 0xff) == 2)
+#define RX_EXITED(r) (((r) & 0xff) == 3)
#define RX_EXIT_STATUS(r) ((r) >> 8)
-#define RX_STOPPED(r) (((r) & 0xff) == 3)
+#define RX_STOPPED(r) (((r) & 0xff) == 4)
#define RX_STOP_SIG(r) ((r) >> 8)
/* The step result for the current step. Global to allow
extern unsigned int heapbottom;
extern int decode_opcode (void);
+extern void reset_decoder (void);
+extern void reset_pipeline_stats (void);
+extern void halt_pipeline_stats (void);
+extern void pipeline_stats (void);
extern void trace_register_changes ();
extern void generate_access_exception (void);