/* Simulator tracing/debugging support.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2001, 2007, 2008, 2009, 2010
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GDB, the GNU debugger.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* This file is meant to be included by sim-basics.h. */
/* Trace fpu operations. */
TRACE_FPU_IDX,
+ /* Trace vpu operations. */
+ TRACE_VPU_IDX,
+
/* Trace branching. */
TRACE_BRANCH_IDX,
#define TRACE_core (1 << TRACE_CORE_IDX)
#define TRACE_events (1 << TRACE_EVENTS_IDX)
#define TRACE_fpu (1 << TRACE_FPU_IDX)
+#define TRACE_vpu (1 << TRACE_VPU_IDX)
#define TRACE_branch (1 << TRACE_BRANCH_IDX)
#define TRACE_debug (1 << TRACE_DEBUG_IDX)
#define WITH_TRACE_CORE_P (WITH_TRACE & TRACE_core)
#define WITH_TRACE_EVENTS_P (WITH_TRACE & TRACE_events)
#define WITH_TRACE_FPU_P (WITH_TRACE & TRACE_fpu)
+#define WITH_TRACE_VPU_P (WITH_TRACE & TRACE_vpu)
#define WITH_TRACE_BRANCH_P (WITH_TRACE & TRACE_branch)
#define WITH_TRACE_DEBUG_P (WITH_TRACE & TRACE_debug)
#define TRACE_CORE_P(cpu) TRACE_P (cpu, TRACE_CORE_IDX)
#define TRACE_EVENTS_P(cpu) TRACE_P (cpu, TRACE_EVENTS_IDX)
#define TRACE_FPU_P(cpu) TRACE_P (cpu, TRACE_FPU_IDX)
+#define TRACE_VPU_P(cpu) TRACE_P (cpu, TRACE_VPU_IDX)
#define TRACE_BRANCH_P(cpu) TRACE_P (cpu, TRACE_BRANCH_IDX)
#define TRACE_DEBUG_P(cpu) TRACE_P (cpu, TRACE_DEBUG_IDX)
\f
-/* Traceing functions.
-
- */
+/* Tracing functions. */
/* Prime the trace buffers ready for any trace output.
Must be called prior to any other trace operation */
/* Other trace_result{_<type><nr-results>} */
-/* Macro's for tracing ALU instructions */
+/* Macros for tracing ALU instructions */
#define TRACE_ALU_INPUT0() \
do { \
trace_result_word4 (SD, CPU, TRACE_ALU_IDX, (R0), (R1), (R2), (R3)); \
} while (0)
+/* Macros for tracing inputs to comparative branch instructions. */
+
+#define TRACE_BRANCH_INPUT1(V0) \
+do { \
+ if (TRACE_BRANCH_P (CPU)) \
+ trace_input_word1 (SD, CPU, TRACE_BRANCH_IDX, (V0)); \
+} while (0)
+
+#define TRACE_BRANCH_INPUT2(V0,V1) \
+do { \
+ if (TRACE_BRANCH_P (CPU)) \
+ trace_input_word2 (SD, CPU, TRACE_BRANCH_IDX, (V0), (V1)); \
+} while (0)
-/* Macro's for tracing FPU instructions */
+/* Macros for tracing FPU instructions */
#define TRACE_FP_INPUT0() \
do { \