Search
lxdream.org :: lxdream/src/sh4/sh4stat.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4stat.h
changeset 736:a02d1475ccfd
prev673:44c579439d73
next905:4c17ebd9ef5e
author nkeynes
date Mon Aug 04 06:00:11 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Fix x86-64 bugs (only visible on OS X)
view annotate diff log raw
     1 /**
     2  * $Id$
     3  * 
     4  * Support module for collecting instruction stats
     5  *
     6  * Copyright (c) 2005 Nathan Keynes.
     7  *
     8  * This program is free software; you can redistribute it and/or modify
     9  * it under the terms of the GNU General Public License as published by
    10  * the Free Software Foundation; either version 2 of the License, or
    11  * (at your option) any later version.
    12  *
    13  * This program is distributed in the hope that it will be useful,
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  * GNU General Public License for more details.
    17  */
    19 #ifndef lxdream_sh4stat_H
    20 #define lxdream_sh4stat_H 1
    22 #include <stdio.h>
    23 #include <stdint.h>
    25 #ifdef __cplusplus
    26 extern "C" {
    27 #endif
    29 typedef enum {
    30     I_UNKNOWN,
    31     I_ADD, I_ADDI, I_ADDC, I_ADDV,
    32     I_AND, I_ANDI, I_ANDB, 
    33     I_BF, I_BFS, I_BRA, I_BRAF, I_BSR, I_BSRF, I_BT, I_BTS,
    34     I_CLRMAC, I_CLRS, I_CLRT, 
    35     I_CMPEQ, I_CMPEQI, I_CMPGE, I_CMPGT, I_CMPHI, I_CMPHS, I_CMPPL, I_CMPPZ, I_CMPSTR,
    36     I_DIV0S, I_DIV0U, I_DIV1,
    37     I_DMULS, I_DMULU, I_DT,   
    38     I_EXTSB, I_EXTSW, I_EXTUB, I_EXTUW, I_FABS, 
    39     I_FADD, I_FCMPEQ, I_FCMPGT, I_FCNVDS, I_FCNVSD, I_FDIV, I_FIPR, I_FLDS,
    40     I_FLDI0, I_FLDI1, I_FLOAT, I_FMAC, I_FMOV1, I_FMOV2, I_FMOV3, I_FMOV4, 
    41     I_FMOV5, I_FMOV6, I_FMOV7, I_FMUL, I_FNEG, I_FRCHG, I_FSCA, I_FSCHG, 
    42     I_FSQRT, I_FSRRA, I_FSTS, I_FSUB, I_FTRC, I_FTRV,  
    43     I_JMP, I_JSR,   
    44     I_LDCSR, I_LDC, I_LDCSRM, I_LDCM, I_LDSFPSCR, I_LDS, I_LDSFPSCRM, I_LDSM, I_LDTLB, 
    45     I_MACL, I_MACW,  
    46     I_MOV, I_MOVI, I_MOVB, I_MOVL, I_MOVLPC, I_MOVW, I_MOVA, I_MOVCA, I_MOVT,  
    47     I_MULL, I_MULSW, I_MULUW, 
    48     I_NEG, I_NEGC, I_NOP, I_NOT,  
    49     I_OCBI, I_OCBP, I_OCBWB, 
    50     I_OR, I_ORI, I_ORB,   
    51     I_PREF, 
    52     I_ROTCL, I_ROTCR, I_ROTL, I_ROTR, 
    53     I_RTE, I_RTS, 
    54     I_SETS, I_SETT,  
    55     I_SHAD, I_SHAL, I_SHAR, I_SHLD, I_SHLL, I_SHLR,  
    56     I_SLEEP, 
    57     I_STCSR, I_STC, I_STCSRM, I_STCM, I_STSFPSCR, I_STS, I_STSFPSCRM, I_STSM,  
    58     I_SUB, I_SUBC, I_SUBV,  
    59     I_SWAPB, I_SWAPW, I_TASB,  
    60     I_TRAPA,
    61     I_TST, I_TSTI, I_TSTB,  
    62     I_XOR, I_XORI, I_XORB,  
    63     I_XTRCT, 
    64     I_UNDEF } sh4_inst_id;
    66 #define SH4_INSTRUCTION_COUNT I_UNDEF
    68     void sh4_stats_reset( void );
    69     void sh4_stats_print( FILE *out );
    70     void sh4_stats_add( sh4_inst_id id );
    71     void sh4_stats_add_by_pc( uint32_t pc );
    73 #ifdef __cplusplus
    74 }
    75 #endif
    77 #endif /* !lxdream_sh4stat_H */
.