This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Sim patch] New tracing macros


The following patch adds two new tracing macros: TRACE_BRANCH_INPUT{1,2}.

These macros can be used by a simulator to trace the input operands of
one and two operand branch instructions (for example: BLTZ and BEQ,
respectively).  The traces are registered under the "branch"
classification which I think makes the most sense.

Okay to commit?

2001-02-21  Ben Elliston  <bje@redhat.com>

	* sim-trace.h (TRACE_BRANCH_INPUT1): New macro.
	(TRACE_BRANCH_INPUT2): Likewise.

Index: sim-trace.h
===================================================================
RCS file: /cvs/src/src/sim/common/sim-trace.h,v
retrieving revision 1.2
diff -u -c -r1.2 sim-trace.h
*** sim-trace.h	2000/06/24 14:47:54	1.2
--- sim-trace.h	2001/02/21 03:28:55
***************
*** 383,389 ****
  /* Other trace_result{_<type><nr-results>} */
  
  
! /* Macro's for tracing ALU instructions */
  
  #define TRACE_ALU_INPUT0() \
  do { \
--- 383,389 ----
  /* Other trace_result{_<type><nr-results>} */
  
  
! /* Macros for tracing ALU instructions */
  
  #define TRACE_ALU_INPUT0() \
  do { \
***************
*** 441,448 ****
      trace_result_word4 (SD, CPU, TRACE_ALU_IDX, (R0), (R1), (R2), (R3)); \
  } while (0)
  
  
! /* Macro's for tracing FPU instructions */
  
  #define TRACE_FP_INPUT0() \
  do { \
--- 441,461 ----
      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)
! 
! /* Macros for tracing FPU instructions */
  
  #define TRACE_FP_INPUT0() \
  do { \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]