From e02a407d1f968deab753b24e63a9dc00a2959c43 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 10 Oct 2005 16:49:01 +0000 Subject: [PATCH] Convert some native types to our types. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4899 --- cachegrind/cg_main.c | 12 ++++++------ cachegrind/cg_sim.c | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/cachegrind/cg_main.c b/cachegrind/cg_main.c index 40940e3171..d98c7e3e21 100644 --- a/cachegrind/cg_main.c +++ b/cachegrind/cg_main.c @@ -192,8 +192,8 @@ static void get_debug_info(Addr instr_addr, Char file[FILE_LEN], 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; @@ -963,7 +963,7 @@ static UInt ULong_width(ULong n) 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, @@ -1053,7 +1053,7 @@ static void cg_fini(Int exitcode) // 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, ""); @@ -1100,9 +1100,9 @@ static void cg_discard_basic_block_info ( Addr a, SizeT size ) /*--- 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 diff --git a/cachegrind/cg_sim.c b/cachegrind/cg_sim.c index a5c65df824..7cab553cb2 100644 --- a/cachegrind/cg_sim.c +++ b/cachegrind/cg_sim.c @@ -39,22 +39,22 @@ */ 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; @@ -114,7 +114,7 @@ void cachesim_##L##_doref(Addr a, UChar size, ULong* m1, ULong *m2) \ 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; \ \ -- 2.47.3