filename | src/sh4/sh4stat.h |
changeset | 905:4c17ebd9ef5e |
prev | 736:a02d1475ccfd |
author | nkeynes |
date | Sat Dec 27 02:59:35 2008 +0000 (15 years ago) |
branch | lxdream-mem |
permissions | -rw-r--r-- |
last change | Replace fpscr_mask/fpscr flags in xlat_cache_block with a single xlat_sh4_mode, which tracks the field of the same name in sh4r - actually a little faster this way. Now depends on SR.MD, FPSCR.PR and FPSCR.SZ (although it doesn't benefit from the SR flag yet). Also fixed the failure to check the flags in the common case (code address returned by previous block) which took away the performance benefits, but oh well. |
file | annotate | diff | log | raw |
nkeynes@387 | 1 | /** |
nkeynes@561 | 2 | * $Id$ |
nkeynes@387 | 3 | * |
nkeynes@387 | 4 | * Support module for collecting instruction stats |
nkeynes@387 | 5 | * |
nkeynes@387 | 6 | * Copyright (c) 2005 Nathan Keynes. |
nkeynes@387 | 7 | * |
nkeynes@387 | 8 | * This program is free software; you can redistribute it and/or modify |
nkeynes@387 | 9 | * it under the terms of the GNU General Public License as published by |
nkeynes@387 | 10 | * the Free Software Foundation; either version 2 of the License, or |
nkeynes@387 | 11 | * (at your option) any later version. |
nkeynes@387 | 12 | * |
nkeynes@387 | 13 | * This program is distributed in the hope that it will be useful, |
nkeynes@387 | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
nkeynes@387 | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
nkeynes@387 | 16 | * GNU General Public License for more details. |
nkeynes@387 | 17 | */ |
nkeynes@387 | 18 | |
nkeynes@671 | 19 | #ifndef lxdream_sh4stat_H |
nkeynes@736 | 20 | #define lxdream_sh4stat_H 1 |
nkeynes@671 | 21 | |
nkeynes@671 | 22 | #include <stdio.h> |
nkeynes@671 | 23 | #include <stdint.h> |
nkeynes@905 | 24 | #include "lxdream.h" |
nkeynes@671 | 25 | |
nkeynes@736 | 26 | #ifdef __cplusplus |
nkeynes@736 | 27 | extern "C" { |
nkeynes@736 | 28 | #endif |
nkeynes@736 | 29 | |
nkeynes@671 | 30 | typedef enum { |
nkeynes@387 | 31 | I_UNKNOWN, |
nkeynes@387 | 32 | I_ADD, I_ADDI, I_ADDC, I_ADDV, |
nkeynes@387 | 33 | I_AND, I_ANDI, I_ANDB, |
nkeynes@387 | 34 | I_BF, I_BFS, I_BRA, I_BRAF, I_BSR, I_BSRF, I_BT, I_BTS, |
nkeynes@387 | 35 | I_CLRMAC, I_CLRS, I_CLRT, |
nkeynes@387 | 36 | I_CMPEQ, I_CMPEQI, I_CMPGE, I_CMPGT, I_CMPHI, I_CMPHS, I_CMPPL, I_CMPPZ, I_CMPSTR, |
nkeynes@387 | 37 | I_DIV0S, I_DIV0U, I_DIV1, |
nkeynes@387 | 38 | I_DMULS, I_DMULU, I_DT, |
nkeynes@387 | 39 | I_EXTSB, I_EXTSW, I_EXTUB, I_EXTUW, I_FABS, |
nkeynes@387 | 40 | I_FADD, I_FCMPEQ, I_FCMPGT, I_FCNVDS, I_FCNVSD, I_FDIV, I_FIPR, I_FLDS, |
nkeynes@387 | 41 | I_FLDI0, I_FLDI1, I_FLOAT, I_FMAC, I_FMOV1, I_FMOV2, I_FMOV3, I_FMOV4, |
nkeynes@387 | 42 | I_FMOV5, I_FMOV6, I_FMOV7, I_FMUL, I_FNEG, I_FRCHG, I_FSCA, I_FSCHG, |
nkeynes@387 | 43 | I_FSQRT, I_FSRRA, I_FSTS, I_FSUB, I_FTRC, I_FTRV, |
nkeynes@387 | 44 | I_JMP, I_JSR, |
nkeynes@673 | 45 | I_LDCSR, I_LDC, I_LDCSRM, I_LDCM, I_LDSFPSCR, I_LDS, I_LDSFPSCRM, I_LDSM, I_LDTLB, |
nkeynes@387 | 46 | I_MACL, I_MACW, |
nkeynes@387 | 47 | I_MOV, I_MOVI, I_MOVB, I_MOVL, I_MOVLPC, I_MOVW, I_MOVA, I_MOVCA, I_MOVT, |
nkeynes@387 | 48 | I_MULL, I_MULSW, I_MULUW, |
nkeynes@387 | 49 | I_NEG, I_NEGC, I_NOP, I_NOT, |
nkeynes@387 | 50 | I_OCBI, I_OCBP, I_OCBWB, |
nkeynes@387 | 51 | I_OR, I_ORI, I_ORB, |
nkeynes@387 | 52 | I_PREF, |
nkeynes@387 | 53 | I_ROTCL, I_ROTCR, I_ROTL, I_ROTR, |
nkeynes@387 | 54 | I_RTE, I_RTS, |
nkeynes@387 | 55 | I_SETS, I_SETT, |
nkeynes@387 | 56 | I_SHAD, I_SHAL, I_SHAR, I_SHLD, I_SHLL, I_SHLR, |
nkeynes@387 | 57 | I_SLEEP, |
nkeynes@673 | 58 | I_STCSR, I_STC, I_STCSRM, I_STCM, I_STSFPSCR, I_STS, I_STSFPSCRM, I_STSM, |
nkeynes@387 | 59 | I_SUB, I_SUBC, I_SUBV, |
nkeynes@387 | 60 | I_SWAPB, I_SWAPW, I_TASB, |
nkeynes@387 | 61 | I_TRAPA, |
nkeynes@387 | 62 | I_TST, I_TSTI, I_TSTB, |
nkeynes@387 | 63 | I_XOR, I_XORI, I_XORB, |
nkeynes@387 | 64 | I_XTRCT, |
nkeynes@671 | 65 | I_UNDEF } sh4_inst_id; |
nkeynes@387 | 66 | |
nkeynes@387 | 67 | #define SH4_INSTRUCTION_COUNT I_UNDEF |
nkeynes@422 | 68 | |
nkeynes@736 | 69 | void sh4_stats_reset( void ); |
nkeynes@736 | 70 | void sh4_stats_print( FILE *out ); |
nkeynes@905 | 71 | void FASTCALL sh4_stats_add( sh4_inst_id id ); |
nkeynes@736 | 72 | void sh4_stats_add_by_pc( uint32_t pc ); |
nkeynes@671 | 73 | |
nkeynes@736 | 74 | #ifdef __cplusplus |
nkeynes@736 | 75 | } |
nkeynes@736 | 76 | #endif |
nkeynes@671 | 77 | |
nkeynes@671 | 78 | #endif /* !lxdream_sh4stat_H */ |
.