Lines Matching refs:size_t
201 static size_t ninstructions;
206 size_t nmnemonics;
211 static size_t best_mnemonic_bits;
1248 size_t cnt = 0;
1252 size_t totalbits = 0;
1253 size_t zerobits = 0;
1255 size_t leadingbits = 0;
1278 size_t nbytes = (totalbits - zerobits + 7) / 8;
1280 size_t leadingbytes = leadingbits / 8;
1346 static size_t mnemonic_maxlen;
1347 static size_t mnemonic_minlen;
1348 static size_t
1349 which_chars (const char *str[], size_t nstr)
1355 for (size_t cnt = 0; cnt < nstr; ++cnt)
1364 size_t nused_char = 0;
1365 for (size_t cnt = 0; cnt < 256; ++cnt)
1373 static size_t nmnemonic_strs;
1406 static size_t
1407 compute_pfxfreq (const char *str[], size_t nstr)
1411 for (size_t i = 0; i < nstr; ++i)
1414 for (size_t i = 0; i < nstr; ++i)
1419 size_t n = 0;
1429 size_t len;
1432 static size_t
1433 compute_sfxfreq (size_t nstr, struct strsnlen *strsnlen)
1437 for (size_t i = 0; i < nstr; ++i)
1440 for (size_t i = 0; i < nstr; ++i)
1445 size_t n = 0;
1461 size_t best_so_far = 100000000;
1465 size_t best_table_size = 0;
1466 size_t best_table_bits = 0;
1467 size_t best_prefix_bits = 0;
1470 size_t npfx_char = compute_pfxfreq (mnemonic_strs, nmnemonic_strs);
1473 for (size_t pfxbits = 0; (1u << pfxbits) < 2 * npfx_char; ++pfxbits)
1476 size_t i;
1493 size_t nstrsnlen = 1;
1496 size_t j;
1516 size_t nsfx_char = compute_sfxfreq (nstrsnlen, strsnlen);
1518 for (size_t sfxbits = 0; (1u << sfxbits) < 2 * nsfx_char; ++sfxbits)
1526 size_t newlen[nstrsnlen];
1536 size_t ncharused = 0;
1539 size_t ntablestr = 1;
1541 size_t table = newlen[0] + 1;
1544 size_t j;
1571 for (size_t x = 0; x < newlen[j]; ++x)
1576 size_t ncharused_bits = 0;
1584 size_t table_bits = 0;
1592 size_t mnemonic_bits = table_bits + pfxbits + sfxbits;
1593 size_t new_total = (((table + 7) / 8) * ncharused_bits + ncharused
1626 for (size_t i = 0; i < best_table_size; ++i)
1651 for (size_t i = 0; i < nmnemonic_strs; ++i)
1655 size_t pfxval = 0;
1663 size_t l = strlen (mne);
1665 size_t sfxval = 0;