Lines Matching refs:symbol
87 static void initialize_symbol(symbol_t *symbol);
97 static void test_readable_symbol(symbol_t *symbol);
98 static void test_writable_symbol(symbol_t *symbol);
101 static void add_conditional(symbol_t *symbol);
104 static int is_location_address(symbol_t *symbol);
449 symbol_t *symbol; variable
451 symbol = $1;
452 if (symbol->type != CONST) {
457 if (symbol->info.cinfo->value > 4) {
462 $$ = (0x1 << symbol->info.cinfo->value);
548 if (accumulator.symbol != NULL) {
553 accumulator.symbol = cur_symbol;
560 if (mode_ptr.symbol != NULL) {
565 mode_ptr.symbol = cur_symbol;
572 if (allones.symbol != NULL) {
577 allones.symbol = cur_symbol;
584 if (allzeros.symbol != NULL) {
589 allzeros.symbol = cur_symbol;
596 if (none.symbol != NULL) {
601 none.symbol = cur_symbol;
608 if (sindex.symbol != NULL) {
613 sindex.symbol = cur_symbol;
695 symbol_t *symbol; variable
697 symbol = $1;
698 switch (symbol->type) {
700 symbol = $1->info.ainfo->parent;
704 $$.value = symbol->info.rinfo->address;
710 $$.value = symbol->info.finfo->value;
714 $$.value = symbol->info.cinfo->value;
721 symbol->name);
728 symlist_add(&$$.referenced_syms, symbol, SYMLIST_INSERT_HEAD);
885 $$.symbol = $1;
900 $$.symbol = $1;
911 $$.symbol = $1;
916 if (accumulator.symbol == NULL) {
920 $$.symbol = accumulator.symbol;
928 test_writable_symbol($1.symbol);
954 symlist_add(&$$.referenced_syms, accumulator.symbol,
963 test_readable_symbol($1.symbol);
970 $$.symbol = NULL;
1051 $$.symbol = $1;
1056 $$.symbol = $1;
1061 $$.symbol = $1;
1066 $$.symbol = NULL;
1071 $$.symbol = NULL;
1076 $$.symbol = NULL;
1468 initialize_symbol(symbol_t *symbol) in initialize_symbol() argument
1470 switch (symbol->type) { in initialize_symbol()
1479 symbol->info.rinfo = in initialize_symbol()
1481 if (symbol->info.rinfo == NULL) { in initialize_symbol()
1485 memset(symbol->info.rinfo, 0, in initialize_symbol()
1487 SLIST_INIT(&(symbol->info.rinfo->fields)); in initialize_symbol()
1494 symbol->info.rinfo->modes = in initialize_symbol()
1497 symbol->info.rinfo->modes = ~0; in initialize_symbol()
1500 symbol->info.ainfo = in initialize_symbol()
1502 if (symbol->info.ainfo == NULL) { in initialize_symbol()
1506 memset(symbol->info.ainfo, 0, in initialize_symbol()
1513 symbol->info.finfo = in initialize_symbol()
1515 if (symbol->info.finfo == NULL) { in initialize_symbol()
1519 memset(symbol->info.finfo, 0, sizeof(struct field_info)); in initialize_symbol()
1520 SLIST_INIT(&(symbol->info.finfo->symrefs)); in initialize_symbol()
1524 symbol->info.cinfo = in initialize_symbol()
1526 if (symbol->info.cinfo == NULL) { in initialize_symbol()
1530 memset(symbol->info.cinfo, 0, in initialize_symbol()
1534 symbol->info.linfo = in initialize_symbol()
1536 if (symbol->info.linfo == NULL) { in initialize_symbol()
1540 memset(symbol->info.linfo, 0, in initialize_symbol()
1544 symbol->info.condinfo = in initialize_symbol()
1546 if (symbol->info.condinfo == NULL) { in initialize_symbol()
1550 memset(symbol->info.condinfo, 0, in initialize_symbol()
1554 symbol->info.macroinfo = in initialize_symbol()
1556 if (symbol->info.macroinfo == NULL) { in initialize_symbol()
1560 memset(symbol->info.macroinfo, 0, in initialize_symbol()
1562 STAILQ_INIT(&symbol->info.macroinfo->args); in initialize_symbol()
1625 symbol_t *symbol = *p_symbol; in process_register() local
1627 if (symbol->type == UNINITIALIZED) { in process_register()
1629 symbol->name); in process_register()
1632 } else if (symbol->type == ALIAS) { in process_register()
1633 *p_symbol = symbol->info.ainfo->parent; in process_register()
1634 } else if ((symbol->type != REGISTER) in process_register()
1635 && (symbol->type != SCBLOC) in process_register()
1636 && (symbol->type != SRAMLOC)) { in process_register()
1639 symbol->name); in process_register()
1651 if (src->symbol == NULL) in format_1_instr()
1655 test_writable_symbol(dest->symbol); in format_1_instr()
1656 test_readable_symbol(src->symbol); in format_1_instr()
1658 if (!is_location_address(dest->symbol)) { in format_1_instr()
1668 f1_instr->destination = dest->symbol->info.rinfo->address in format_1_instr()
1670 f1_instr->source = src->symbol->info.rinfo->address in format_1_instr()
1676 else if (dest->symbol == mode_ptr.symbol) { in format_1_instr()
1684 if (src->symbol == allones.symbol) in format_1_instr()
1686 else if (src->symbol == allzeros.symbol) in format_1_instr()
1688 else if (src->symbol == mode_ptr.symbol) in format_1_instr()
1729 if (src->symbol == NULL) in format_2_instr()
1733 test_writable_symbol(dest->symbol); in format_2_instr()
1734 test_readable_symbol(src->symbol); in format_2_instr()
1741 f2_instr->destination = dest->symbol->info.rinfo->address in format_2_instr()
1743 f2_instr->source = src->symbol->info.rinfo->address in format_2_instr()
1791 test_readable_symbol(src->symbol); in format_3_instr()
1796 if (address->symbol == NULL) { in format_3_instr()
1799 } else if (address->symbol->type == UNINITIALIZED) { in format_3_instr()
1802 instr->patch_label = address->symbol; in format_3_instr()
1804 addr = address->symbol->info.linfo->address + address->offset; in format_3_instr()
1807 f3_instr->source = src->symbol->info.rinfo->address in format_3_instr()
1819 test_readable_symbol(symbol_t *symbol) in test_readable_symbol() argument
1821 if ((symbol->info.rinfo->modes & (0x1 << src_mode)) == 0) { in test_readable_symbol()
1824 symbol->name, src_mode); in test_readable_symbol()
1828 if (symbol->info.rinfo->mode == WO) { in test_readable_symbol()
1836 test_writable_symbol(symbol_t *symbol) in test_writable_symbol() argument
1838 if ((symbol->info.rinfo->modes & (0x1 << dst_mode)) == 0) { in test_writable_symbol()
1841 symbol->name, dst_mode); in test_writable_symbol()
1845 if (symbol->info.rinfo->mode == RO) { in test_writable_symbol()
1855 symbol_t *symbol = sym->symbol; in type_check() local
1874 mask = (int8_t)~symbol->info.rinfo->valid_bitmask; in type_check()
1881 symbol->name); in type_check()
1890 if (symbol->info.rinfo->typecheck_masks != FALSE) { in type_check()
1894 if ((node->symbol->type == MASK in type_check()
1895 || node->symbol->type == FIELD in type_check()
1896 || node->symbol->type == ENUM in type_check()
1897 || node->symbol->type == ENUM_ENTRY) in type_check()
1898 && symlist_search(&node->symbol->info.finfo->symrefs, in type_check()
1899 symbol->name) == NULL) { in type_check()
1903 node->symbol->name, symbol->name); in type_check()
1919 add_conditional(symbol_t *symbol) in add_conditional() argument
1940 if (symbol->type == CONDITIONAL) in add_conditional()
1943 if (symbol->type != UNINITIALIZED) { in add_conditional()
1949 symbol->type = CONDITIONAL; in add_conditional()
1950 initialize_symbol(symbol); in add_conditional()
1951 symbol->info.condinfo->func_num = numfuncs++; in add_conditional()
1952 symlist_add(&patch_functions, symbol, SYMLIST_INSERT_HEAD); in add_conditional()
1985 && (immed->referenced_syms.slh_first->symbol->type == DOWNLOAD_CONST)) in is_download_const()