Do not the 'z' modifier in format string (another win32 fix)
authorClifford Wolf <clifford@clifford.at>
Sat, 11 Oct 2014 09:42:08 +0000 (11:42 +0200)
committerClifford Wolf <clifford@clifford.at>
Sat, 11 Oct 2014 09:42:08 +0000 (11:42 +0200)
frontends/ast/ast.cc
passes/fsm/fsm_expand.cc
passes/fsm/fsm_recode.cc
passes/hierarchy/hierarchy.cc
passes/opt/opt_muxtree.cc

index 1e43875ae5aea73f9aa04d20fc5d0ad965e9b2c4..87b073ff36606cf29ae40ff871486497a4d903f8 100644 (file)
@@ -267,7 +267,7 @@ void AstNode::dumpAst(FILE *f, std::string indent)
                                        bits[i-1] == RTLIL::S1 ? '1' :
                                        bits[i-1] == RTLIL::Sx ? 'x' :
                                        bits[i-1] == RTLIL::Sz ? 'z' : '?');
-               fprintf(f, "'(%zd)", bits.size());
+               fprintf(f, "'(%d)", GetSize(bits));
        }
        if (is_input)
                fprintf(f, " input");
@@ -471,7 +471,7 @@ void AstNode::dumpVlog(FILE *f, std::string indent)
                else if (bits.size() == 32)
                        fprintf(f, "%d", RTLIL::Const(bits).as_int());
                else
-                       fprintf(f, "%zd'b %s", bits.size(), RTLIL::Const(bits).as_string().c_str());
+                       fprintf(f, "%d'b %s", GetSize(bits), RTLIL::Const(bits).as_string().c_str());
                break;
 
        case AST_REALVALUE:
index ecd4bf762d15da5412dd7176e994c1d5d534422d..a261eb22b2e6b5e4403679418288428f6750781f 100644 (file)
@@ -239,7 +239,7 @@ struct FsmExpand
                if (merged_set.size() > 0 && !already_optimized)
                        FsmData::optimize_fsm(fsm_cell, module);
 
-               log("  merged %zd cells into FSM.\n", merged_set.size());
+               log("  merged %d cells into FSM.\n", GetSize(merged_set));
        }
 };
 
index 2b9a26d44e5d4c4f116848b7807dd375de5d2f38..06ac58f0fb879daa64fa0703177968c3ca24c9a5 100644 (file)
@@ -41,9 +41,9 @@ static void fm_set_fsm_print(RTLIL::Cell *cell, RTLIL::Module *module, FsmData &
                        prefix, RTLIL::unescape_id(module->name).c_str());
 
        fprintf(f, "set_fsm_encoding {");
-       for (size_t i = 0; i < fsm_data.state_table.size(); i++) {
-               fprintf(f, " s%zd=2#", i);
-               for (int j = int(fsm_data.state_table[i].bits.size())-1; j >= 0; j--)
+       for (int i = 0; i < GetSize(fsm_data.state_table); i++) {
+               fprintf(f, " s%d=2#", i);
+               for (int j = GetSize(fsm_data.state_table[i].bits)-1; j >= 0; j--)
                        fprintf(f, "%c", fsm_data.state_table[i].bits[j] == RTLIL::State::S1 ? '1' : '0');
        }
        fprintf(f, " } -name {%s_%s} {%s:/WORK/%s}\n",
index 87d1150279f9f163ba1870d938c01adb1195c0e7..4b414d3cb682f4faa8b4e7364b8b901a5b4a961d 100644 (file)
@@ -281,7 +281,7 @@ void hierarchy(RTLIL::Design *design, RTLIL::Module *top, bool purge_lib, bool f
                delete mod;
        }
 
-       log("Removed %zd unused modules.\n", del_modules.size());
+       log("Removed %d unused modules.\n", GetSize(del_modules));
 }
 
 bool set_keep_assert(std::map<RTLIL::Module*, bool> &cache, RTLIL::Module *mod)
index 88ae43f0e606ff3bb1ec4cabda5bb733e2c0eae2..7bdc54afa0c63a1b79b5186142b6d1423e1616c5 100644 (file)
@@ -174,12 +174,12 @@ struct OptMuxtreeWorker
                for (auto &mi : mux2info)
                {
                        std::vector<int> live_ports;
-                       for (size_t port_idx = 0; port_idx < mi.ports.size(); port_idx++) {
+                       for (int port_idx = 0; port_idx < GetSize(mi.ports); port_idx++) {
                                portinfo_t &pi = mi.ports[port_idx];
                                if (pi.enabled) {
                                        live_ports.push_back(port_idx);
                                } else {
-                                       log("    dead port %zd/%zd on %s %s.\n", port_idx+1, mi.ports.size(),
+                                       log("    dead port %d/%d on %s %s.\n", port_idx+1, GetSize(mi.ports),
                                                        mi.cell->type.c_str(), mi.cell->name.c_str());
                                        removed_count++;
                                }