Lines Matching refs:i
94 size_t i; in check_symbol_range() local
97 for (i = 0; i < entries; ++i) { in check_symbol_range()
98 ar = &ranges[i]; in check_symbol_range()
186 size_t i; in symbol_in_range() local
189 for (i = 0; i < entries; ++i) { in symbol_in_range()
190 ar = &ranges[i]; in symbol_in_range()
223 int i; in symbol_valid() local
257 for (i = 0; special_symbols[i]; i++) in symbol_valid()
258 if (strcmp(sym_name, special_symbols[i]) == 0) in symbol_valid()
261 for (i = 0; special_suffixes[i]; i++) { in symbol_valid()
262 int l = strlen(sym_name) - strlen(special_suffixes[i]); in symbol_valid()
264 if (l >= 0 && strcmp(sym_name + l, special_suffixes[i]) == 0) in symbol_valid()
336 unsigned int i, k, off; in write_src() local
360 for (i = 0; i < table_cnt; i++) { in write_src()
361 if (!symbol_absolute(&table[i])) { in write_src()
362 if (_text <= table[i].addr) in write_src()
364 table[i].addr - _text); in write_src()
367 _text - table[i].addr); in write_src()
369 printf("\tPTR\t%#llx\n", table[i].addr); in write_src()
389 for (i = 0; i < table_cnt; i++) { in write_src()
390 if ((i & 0xFF) == 0) in write_src()
391 markers[i >> 8] = off; in write_src()
393 printf("\t.byte 0x%02x", table[i].len); in write_src()
394 for (k = 0; k < table[i].len; k++) in write_src()
395 printf(", 0x%02x", table[i].sym[k]); in write_src()
398 off += table[i].len + 1; in write_src()
403 for (i = 0; i < ((table_cnt + 255) >> 8); i++) in write_src()
404 printf("\tPTR\t%d\n", markers[i]); in write_src()
411 for (i = 0; i < 256; i++) { in write_src()
412 best_idx[i] = off; in write_src()
413 expand_symbol(best_table[i], best_table_len[i], buf); in write_src()
420 for (i = 0; i < 256; i++) in write_src()
421 printf("\t.short\t%d\n", best_idx[i]); in write_src()
431 int i; in learn_symbol() local
433 for (i = 0; i < len - 1; i++) in learn_symbol()
434 token_profit[ symbol[i] + (symbol[i + 1] << 8) ]++; in learn_symbol()
440 int i; in forget_symbol() local
442 for (i = 0; i < len - 1; i++) in forget_symbol()
443 token_profit[ symbol[i] + (symbol[i + 1] << 8) ]--; in forget_symbol()
449 unsigned int i, pos; in build_initial_tok_table() local
452 for (i = 0; i < table_cnt; i++) { in build_initial_tok_table()
453 if ( symbol_valid(&table[i]) ) { in build_initial_tok_table()
454 if (pos != i) in build_initial_tok_table()
455 table[pos] = table[i]; in build_initial_tok_table()
459 free(table[i].sym); in build_initial_tok_table()
467 int i; in find_token() local
469 for (i = 0; i < len - 1; i++) { in find_token()
470 if (str[i] == token[0] && str[i+1] == token[1]) in find_token()
471 return &str[i]; in find_token()
480 unsigned int i, len, size; in compress_symbols() local
483 for (i = 0; i < table_cnt; i++) { in compress_symbols()
485 len = table[i].len; in compress_symbols()
486 p1 = table[i].sym; in compress_symbols()
493 forget_symbol(table[i].sym, len); in compress_symbols()
512 table[i].len = len; in compress_symbols()
515 learn_symbol(table[i].sym, len); in compress_symbols()
522 int i, best, bestprofit; in find_best_token() local
527 for (i = 0; i < 0x10000; i++) { in find_best_token()
528 if (token_profit[i] > bestprofit) { in find_best_token()
529 best = i; in find_best_token()
530 bestprofit = token_profit[i]; in find_best_token()
539 int i, best; in optimize_result() local
543 for (i = 255; i >= 0; i--) { in optimize_result()
547 if (!best_table_len[i]) { in optimize_result()
555 best_table_len[i] = 2; in optimize_result()
556 best_table[i][0] = best & 0xFF; in optimize_result()
557 best_table[i][1] = (best >> 8) & 0xFF; in optimize_result()
560 compress_symbols(best_table[i], i); in optimize_result()
568 unsigned int i, j, c; in insert_real_symbols_in_table() local
573 for (i = 0; i < table_cnt; i++) { in insert_real_symbols_in_table()
574 for (j = 0; j < table[i].len; j++) { in insert_real_symbols_in_table()
575 c = table[i].sym[j]; in insert_real_symbols_in_table()
686 unsigned int i; in make_percpus_absolute() local
688 for (i = 0; i < table_cnt; i++) in make_percpus_absolute()
689 if (symbol_in_range(&table[i], &percpu_range, 1)) in make_percpus_absolute()
690 table[i].sym[0] = 'A'; in make_percpus_absolute()
696 int i; in main() local
697 for (i = 1; i < argc; i++) { in main()
698 if(strcmp(argv[i], "--all-symbols") == 0) in main()
700 else if (strcmp(argv[i], "--absolute-percpu") == 0) in main()
702 else if (strncmp(argv[i], "--symbol-prefix=", 16) == 0) { in main()
703 char *p = &argv[i][16]; in main()
708 } else if (strncmp(argv[i], "--page-offset=", 14) == 0) { in main()
709 const char *p = &argv[i][14]; in main()