sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 1 | |
| 2 | /*--------------------------------------------------------------------*/ |
njn | 9a0cba4 | 2007-04-15 22:15:57 +0000 | [diff] [blame] | 3 | /*--- PPC64-specific definitions. cg-ppc64.c ---*/ |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 4 | /*--------------------------------------------------------------------*/ |
| 5 | |
| 6 | /* |
| 7 | This file is part of Cachegrind, a Valgrind tool for cache |
| 8 | profiling programs. |
| 9 | |
sewardj | 9eecbbb | 2010-05-03 21:37:12 +0000 | [diff] [blame] | 10 | Copyright (C) 2005-2010 Nicholas Nethercote |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 11 | njn@valgrind.org |
| 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 | |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 31 | #if defined(VGA_ppc64) |
| 32 | |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 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 | |
njn | 2d853a1 | 2010-10-06 22:46:31 +0000 | [diff] [blame] | 40 | void VG_(configure_caches)(cache_t* I1c, cache_t* D1c, cache_t* LLc, |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 41 | Bool all_caches_clo_defined) |
| 42 | { |
| 43 | // Set caches to default. |
| 44 | *I1c = (cache_t) { 65536, 2, 64 }; |
| 45 | *D1c = (cache_t) { 65536, 2, 64 }; |
njn | 2d853a1 | 2010-10-06 22:46:31 +0000 | [diff] [blame] | 46 | *LLc = (cache_t) { 262144, 8, 64 }; |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 47 | |
| 48 | // Warn if config not completely specified from cmd line. Note that |
| 49 | // this message is slightly different from the one we give on x86/AMD64 |
| 50 | // when auto-detection fails; this lets us filter out this one (which is |
| 51 | // not important) in the regression test suite without filtering the |
| 52 | // x86/AMD64 one (which we want to see if it ever occurs in the |
| 53 | // regression test suite). |
njn | 42c8355 | 2005-12-05 20:45:59 +0000 | [diff] [blame] | 54 | // |
| 55 | // If you change this message, please update |
| 56 | // cachegrind/tests/filter_stderr! |
| 57 | // |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 58 | if (!all_caches_clo_defined) { |
sewardj | b2c985b | 2009-07-15 14:51:17 +0000 | [diff] [blame] | 59 | VG_(dmsg)("Warning: Cannot auto-detect cache config on PPC64, using one " |
sewardj | 62622f4 | 2010-10-12 10:14:43 +0000 | [diff] [blame] | 60 | "or more defaults\n"); |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 61 | } |
| 62 | } |
| 63 | |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 64 | #endif |
| 65 | |
sewardj | 2c48c7b | 2005-11-29 13:05:56 +0000 | [diff] [blame] | 66 | /*--------------------------------------------------------------------*/ |
| 67 | /*--- end ---*/ |
| 68 | /*--------------------------------------------------------------------*/ |