* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: SS_RegCompare.h
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
* The above named program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation.
* The above named 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 work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
* ========== Copyright Header End ============================================
#ifndef __SS_RegCompare_h__
#define __SS_RegCompare_h__
#include "SS_PliSocket.h"
// make sure CTR_CMPR_MAX is larger than the registers in RegId
// (of bin/SS_RegCompare.h).
enum { CTR_G
=0, CTR_W
=1, CTR_F
=2, CTR_INSTR
=254, CTR_OPCODE
=255, CTR_CMPR_MAX
=256 };
SS_RegCompare( SS_Strand
* _strand
, SS_PliSocket
* _socket
);
void debug_output( FILE* _dbg_out
) { dbg_out
= _dbg_out
; }
bool is_initialise() { return inited
; }
void cmpr_on() { for (int i
=0; i
<CTR_CMPR_MAX
; i
++) cmpr_list
[i
]=true; }
void cmpr_on( int ii
) { assert(ii
<CTR_CMPR_MAX
); cmpr_list
[ii
]=true; }
void cmpr_off() { for (int i
=0; i
<CTR_CMPR_MAX
; i
++) cmpr_list
[i
]=false; }
void cmpr_off( int ii
) { assert(ii
<CTR_CMPR_MAX
); cmpr_list
[ii
]=false; }
bool is_cmpr( int ii
) { return cmpr_list
[ii
]; }
uint64_t grf
[(1 + SS_Strand::MAX_GL
) * 8];
uint64_t wrf
[(1 + SS_Strand::MAX_WP
) * 16];
// 'true' to one entry means its corresponding register will be included
// in delta generation and replay comparison.
bool cmpr_list
[CTR_CMPR_MAX
];
// 'true' mean an instruction has generate one or more register delta