static UInt hash(Char *s, UInt table_size)
{
- const int hash_constant = 256;
- int hash_value = 0;
+ const Int hash_constant = 256;
+ Int hash_value = 0;
for ( ; *s; s++)
hash_value = (hash_constant * hash_value + *s) % table_size;
return hash_value;
static void cg_fini(Int exitcode)
{
- static char buf1[128], buf2[128], buf3[128], fmt [128];
+ static Char buf1[128], buf2[128], buf3[128], fmt [128];
CC D_total;
ULong L2_total_m, L2_total_mr, L2_total_mw,
// Various stats
if (VG_(clo_verbosity) > 1) {
- int BB_lookups = full_debug_BBs + fn_debug_BBs +
+ Int BB_lookups = full_debug_BBs + fn_debug_BBs +
file_line_debug_BBs + no_debug_BBs;
VG_(message)(Vg_DebugMsg, "");
/*--- Command line processing ---*/
/*--------------------------------------------------------------------*/
-static void parse_cache_opt ( cache_t* cache, char* opt )
+static void parse_cache_opt ( cache_t* cache, Char* opt )
{
- int i = 0, i2, i3;
+ Int i = 0, i2, i3;
// Option argument looks like "65536,2,64".
// Find commas, replace with NULs to make three independent
*/
typedef struct {
- int size; /* bytes */
- int assoc;
- int line_size; /* bytes */
- int sets;
- int sets_min_1;
- int assoc_bits;
- int line_size_bits;
- int tag_shift;
- char desc_line[128];
+ Int size; /* bytes */
+ Int assoc;
+ Int line_size; /* bytes */
+ Int sets;
+ Int sets_min_1;
+ Int assoc_bits;
+ Int line_size_bits;
+ Int tag_shift;
+ Char desc_line[128];
UWord* tags;
} cache_t2;
/* By this point, the size/assoc/line_size has been checked. */
static void cachesim_initcache(cache_t config, cache_t2* c)
{
- int i;
+ Int i;
c->size = config.size;
c->assoc = config.assoc;
register UInt set1 = ( a >> L.line_size_bits) & (L.sets_min_1); \
register UInt set2 = ((a+size-1) >> L.line_size_bits) & (L.sets_min_1); \
register UWord tag = a >> L.tag_shift; \
- int i, j; \
+ Int i, j; \
Bool is_miss = False; \
UWord* set; \
\