• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 /*--------------------------------------------------------------------*/
3 /*--- MIPS-specific definitions.                       cg-mips32.c ---*/
4 /*--------------------------------------------------------------------*/
5 
6 /*
7    This file is part of Cachegrind, a Valgrind tool for cache
8    profiling programs.
9 
10    Copyright (C) 2010-2012 RT-RK
11       mips-valgrind@rt-rk.com
12 
13    This program is free software; you can redistribute it and/or
14    modify it under the terms of the GNU General Public License as
15    published by the Free Software Foundation; either version 2 of the
16    License, or (at your option) any later version.
17 
18    This program is distributed in the hope that it will be useful, but
19    WITHOUT ANY WARRANTY; without even the implied warranty of
20    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21    General Public License for more details.
22 
23    You should have received a copy of the GNU General Public License
24    along with this program; if not, write to the Free Software
25    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
26    02111-1307, USA.
27 
28    The GNU General Public License is contained in the file COPYING.
29 */
30 
31 #if defined(VGA_mips32)
32 
33 #include "pub_tool_basics.h"
34 #include "pub_tool_libcbase.h"
35 #include "pub_tool_libcassert.h"
36 #include "pub_tool_libcprint.h"
37 
38 #include "cg_arch.h"
39 
VG_(configure_caches)40 void VG_(configure_caches)(cache_t* I1c, cache_t* D1c, cache_t* L2c,
41                            Bool all_caches_clo_defined)
42 {
43    // Set caches to default (for MIPS32-r2(mips 74kc))
44    *I1c = (cache_t) {  32768, 4, 32 };
45    *D1c = (cache_t) {  32768, 4, 32 };
46    *L2c = (cache_t) { 524288, 8, 32 };
47 
48    if (!all_caches_clo_defined) {
49       VG_(message)(Vg_DebugMsg,
50                    "Warning: Cannot auto-detect cache config on MIPS32, using one "
51                    "or more defaults\n");
52    }
53 }
54 
55 #endif // #if defined(VGA_mips32)
56 
57 /*--------------------------------------------------------------------*/
58 /*--- end                                              cg-mips32.c ---*/
59 /*--------------------------------------------------------------------*/
60