#include <stdio.h>#include <stdarg.h>#include <errno.h>#include "ansidecl.h"#include "libiberty.h"#include "safe-ctype.h"#include "sysdep.h"#include "getopt.h"#include "ia64-opc.h"#include "ia64-opc-a.c"#include "ia64-opc-i.c"#include "ia64-opc-m.c"#include "ia64-opc-b.c"#include "ia64-opc-f.c"#include "ia64-opc-x.c"#include "ia64-opc-d.c"#include <libintl.h>

Go to the source code of this file.
| #define _ | ( | String | ) | gettext (String) |
Definition at line 59 of file ia64-gen.c.
| #define IS_ONLY_IFZERO | ( | ENT | ) |
| #define IS_SKIP | ( | ent | ) |
Value:
Referenced by compact_distree().
Definition at line 64 of file ia64-gen.c.
| #define OPTION_SRCDIR 200 |
Definition at line 65 of file ia64-gen.c.
Referenced by add_dis_table_ent(), add_opcode_entry(), fetch_insn_class(), insert_completer_entry(), insert_dependencies(), insert_deplist(), insert_resource(), insert_string(), make_bittree_entry(), and shrink().
| static void add_dep | ( | const char * | name, | |
| const char * | chk, | |||
| const char * | reg, | |||
| int | semantics, | |||
| int | mode, | |||
| char * | extra, | |||
| int | flag | |||
| ) | [static] |
Definition at line 794 of file ia64-gen.c.
References rdep::chknotes, rdep::chks, rdep::extra, insert_resource(), rdep::nchks, rdep::nregs, parse_resource_users(), rdep::regnotes, rdep::regs, rdep::semantics, and rdep::waw_special.
Referenced by load_depfile().
| static void add_dis_entry | ( | struct bittree * | first, | |
| ia64_insn | opcode, | |||
| ia64_insn | mask, | |||
| int | opcodenum, | |||
| struct completer_entry * | ent, | |||
| int | completer_index | |||
| ) | [static] |
Definition at line 1795 of file ia64-gen.c.
References abort, completer_entry::addl_entries, completer_entry::alternative, completer_entry::bits, insert_bit_table_ent(), completer_entry::is_terminal, NULL, opcode_count, and completer_entry::order.
Referenced by generate_disassembler().
| static struct disent * add_dis_table_ent | ( | struct disent * | which, | |
| int | insn, | |||
| int | order, | |||
| int | completer_index | |||
| ) | [static, read] |
Definition at line 1699 of file ia64-gen.c.
References ci, disent::completer_index, disinsntable, disent::insn, disent::next_ent, disent::nextcnt, disent::nexte, NULL, disent::priority, and tmalloc.
Referenced by insert_bit_table_ent().
| static void add_opcode_entry | ( | struct ia64_opcode * | opc | ) | [static] |
Definition at line 2640 of file ia64-gen.c.
References abort, main_entry::completers, get_prefix_len(), insert_completer_entry(), insert_string(), maintable, main_entry::name, main_entry::next, NULL, string_entry::num, main_entry::opcode, opcode_count, opcodes_eq(), ordered_table, otlen, ottotlen, prefix, strcpy, strlen(), tmalloc, and xrealloc().
Referenced by shrink().
Definition at line 2385 of file ia64-gen.c.
References abort, main_entry::completers, compute_completer_bits(), glistlen, insert_gclist(), maintable, main_entry::next, NULL, ptr, and x.
Referenced by main().
Definition at line 1825 of file ia64-gen.c.
References b, bittree::bits, bittree::disent, free(), i, IS_SKIP, next, NULL, and x.
Referenced by generate_disassembler().
| static int completer_entries_eq | ( | struct completer_entry * | ent1, | |
| struct completer_entry * | ent2 | |||
| ) | [static] |
| static void compute_completer_bits | ( | struct main_entry * | ment, | |
| struct completer_entry * | ent | |||
| ) | [static] |
Definition at line 2336 of file ia64-gen.c.
References completer_entry::addl_entries, completer_entry::alternative, completer_entry::bits, completer_entry::is_terminal, completer_entry::mask, NULL, p, completer_entry::parent, and x.
Referenced by collapse_redundant_completers().
Definition at line 340 of file ia64-gen.c.
References deplist::deps, i, and deplist::len.
Referenced by insert_deplist().
| static void fail | ( | const char * | message, | |
| ... | ||||
| ) | [static] |
Definition at line 296 of file ia64-gen.c.
References _, args, fprintf(), program_name, va_end, va_start, vfprintf(), and xexit().
| static int fetch_insn_class | ( | const char * | full_name, | |
| int | create | |||
| ) | [static] |
Definition at line 455 of file ia64-gen.c.
References _, atoi(), iclass::comment, comment(), free(), i, iclen, ics, ictotlen, iclass::is_class, memset, iclass::name, iclass::note, iclass::nsubs, NULL, iclass::nxsubs, iclass::orphan, strchr, strcmp(), strlen(), strncmp(), iclass::subs, tmalloc, warn(), xrealloc(), xstrdup(), and iclass::xsubs.
Referenced by load_insn_classes(), and parse_resource_users().
Definition at line 1740 of file ia64-gen.c.
References disinsntable, disent::next_ent, disent::nextcnt, NULL, disent::ournum, and prev.
Referenced by generate_disassembler().
Definition at line 1877 of file ia64-gen.c.
References abort, bittree::bits, debug, bittree::disent, i, insn_list, insn_list_len, IS_ONLY_IFZERO, memmove, memset, NULL, disent::ournum, printf(), start, tot_insn_list_len, x, and xrealloc().
Referenced by generate_disassembler().
Definition at line 2135 of file ia64-gen.c.
References add_dis_entry(), compact_distree(), main_entry::completers, finish_distable(), gen_dis_table(), i, IA64_TYPE_DYN, main_entry::main_index, make_bittree_entry(), ia64_opcode::mask, main_entry::opcode, ia64_opcode::opcode, ordered_table, otlen, print_dis_table(), ptr, and ia64_opcode::type.
Referenced by main().
| static int get_prefix_len | ( | char * | name | ) | const [static] |
| static int get_prefix_len | ( | const char * | ) | [static] |
Referenced by add_opcode_entry(), insert_completer_entry(), and opcodes_eq().
| static int in_iclass | ( | struct ia64_opcode * | idesc, | |
| struct iclass * | ic, | |||
| const char * | format, | |||
| const char * | field, | |||
| int * | notep | |||
| ) | [static] |
Definition at line 1024 of file ia64-gen.c.
References _, iclass::comment, debug, ia64_opcode::flags, i, IA64_OPCODE_POSTINC, IA64_OPND_B2, IA64_OPND_F1, IA64_OPND_F2, IA64_OPND_F3, IA64_OPND_IMM14, IA64_OPND_IMM22, IA64_OPND_IMM8, IA64_OPND_IMM9b, IA64_OPND_R1, IA64_OPND_R2, IA64_OPND_R3, IA64_OPND_TGT25c, ics, if(), in_iclass_mov_x(), len, iclass::name, ia64_opcode::name, iclass::note, iclass::nsubs, NULL, iclass::nxsubs, ia64_opcode::operands, printf(), strcmp(), strlen(), strncmp(), strstr(), iclass::subs, iclass::terminal_resolved, warn(), and iclass::xsubs.
Referenced by insert_opcode_dependencies().
| static int in_iclass_mov_x | ( | struct ia64_opcode * | idesc, | |
| struct iclass * | ic, | |||
| const char * | format, | |||
| const char * | field | |||
| ) | [static] |
Definition at line 910 of file ia64-gen.c.
References abort, i, IA64_OPND_AR3, IA64_OPND_B1, IA64_OPND_B2, IA64_OPND_CR3, IA64_OPND_IP, IA64_OPND_PR, IA64_OPND_PR_ROT, IA64_OPND_PSR, IA64_OPND_PSR_L, IA64_OPND_PSR_UM, irf_operand(), ia64_opcode::name, iclass::name, NULL, ia64_opcode::operands, strcmp(), and strstr().
Referenced by in_iclass().
| static void insert_bit_table_ent | ( | struct bittree * | curr_ent, | |
| int | bit, | |||
| ia64_insn | opcode, | |||
| ia64_insn | mask, | |||
| int | opcodenum, | |||
| int | order, | |||
| int | completer_index | |||
| ) | [static] |
Definition at line 1754 of file ia64-gen.c.
References add_dis_table_ent(), b, bittree::bits, make_bittree_entry(), next, and NULL.
Referenced by add_dis_entry().
| static void insert_completer_entry | ( | struct ia64_opcode * | opc, | |
| struct main_entry * | tabent, | |||
| int | order | |||
| ) | [static] |
Definition at line 2498 of file ia64-gen.c.
References abort, completer_entry::addl_entries, completer_entry::alternative, main_entry::completers, completer_entry::dependencies, get_prefix_len(), insert_opcode_dependencies(), insert_string(), completer_entry::is_terminal, completer_entry::name, NULL, string_entry::num, completer_entry::parent, prefix, ptr, strcpy, strlen(), and tmalloc.
Referenced by add_opcode_entry().
| static short insert_dependencies | ( | int | nchks, | |
| unsigned short * | chks, | |||
| int | nregs, | |||
| unsigned short * | regs | |||
| ) | [static] |
Definition at line 403 of file ia64-gen.c.
References opdep::chk, i, insert_deplist(), opdeplen, opdeps, opdeptotlen, opdep::reg, tmalloc, and xrealloc().
Referenced by insert_opcode_dependencies().
| static short insert_deplist | ( | int | count, | |
| unsigned short * | deps | |||
| ) | [static] |
Definition at line 356 of file ia64-gen.c.
References deplist_equals(), deplist::deps, dlistlen, dlists, dlisttotlen, free(), i, int, deplist::len, malloc, memset, tmalloc, and xrealloc().
Referenced by insert_dependencies().
| static struct completer_entry * insert_gclist | ( | struct completer_entry * | ent | ) | [static, read] |
Definition at line 2229 of file ia64-gen.c.
References completer_entry::addl_entries, completer_entry::alternative, c, completer_entries_eq(), end, glistlen, glisttotlen, i, completer_entry::name, NULL, string_entry::num, start, x, and xrealloc().
Referenced by collapse_redundant_completers().
| static int insert_opcode_dependencies | ( | struct ia64_opcode * | opc, | |
| cmp | ||||
| ) | [static] |
Definition at line 2411 of file ia64-gen.c.
References _, rdep::chknotes, rdep::chks, i, ics, in_iclass(), insert_dependencies(), rdep::mode, iclass::name, rdep::name, rdep::nchks, rdep::nregs, nregs, NULL, RDEP, rdeps, rdepslen, rdep::regnotes, regs, rdep::regs, strcmp(), strncmp(), rdep::total_chks, rdep::total_regs, and warn().
| static int insert_opcode_dependencies | ( | struct ia64_opcode * | , | |
| struct completer_entry * | ||||
| ) | [static] |
Referenced by insert_completer_entry().
| static struct rdep * insert_resource | ( | const char * | name, | |
| enum ia64_dependency_mode | type | |||
| ) | [static, read] |
Definition at line 321 of file ia64-gen.c.
References memset, rdep::mode, rdep::name, rdeps, rdepslen, rdepstotlen, tmalloc, rdep::waw_special, xrealloc(), and xstrdup().
Referenced by add_dep().
| static struct string_entry * insert_string | ( | char * | str | ) | [static, read] |
Definition at line 1614 of file ia64-gen.c.
References c, end, i, s, start, strcmp(), string_table, strtablen, strtabtotlen, tmalloc, x, xrealloc(), and xstrdup().
Referenced by add_opcode_entry(), and insert_completer_entry().
| static int irf_operand | ( | int | op, | |
| const char * | field | |||
| ) | [static] |
Definition at line 885 of file ia64-gen.c.
References IA64_OPND_CPUID_R3, IA64_OPND_DBR_R3, IA64_OPND_IBR_R3, IA64_OPND_MSR_R3, IA64_OPND_PKR_R3, IA64_OPND_PMC_R3, IA64_OPND_PMD_R3, IA64_OPND_RR_R3, and strstr().
Referenced by in_iclass_mov_x().
Definition at line 873 of file ia64-gen.c.
References debug, IA64_DV_RAW, IA64_DV_WAR, IA64_DV_WAW, load_depfile(), printf(), and rdepslen.
Referenced by main().
| static void load_depfile | ( | const char * | filename, | |
| enum ia64_dependency_mode | mode | |||
| ) | [static] |
Definition at line 810 of file ia64-gen.c.
References _, abort, add_dep(), buf, rdep::extra, fail, fclose(), feof(), fgets(), fopen, fp, IA64_DV_WAW, IA64_DVS_OTHER, ISSPACE, NULL, parse_semantics(), rdep::semantics, strchr, strcmp(), strlen(), tmp, and xstrdup().
Referenced by load_dependencies().
Definition at line 605 of file ia64-gen.c.
References _, abort, buf, debug, fail, fclose(), feof(), fetch_insn_class(), fgets(), fopen, fp, iclen, ics, int, iclass::is_class, ISSPACE, iclass::nsubs, NULL, printf(), qsort(), strcmp(), strlen(), sub, sub_compare(), iclass::subs, iclass::terminal_resolved, tmp, and xrealloc().
Referenced by main().
| static int lookup_regindex | ( | const char * | name, | |
| int | specifier | |||
| ) | [static] |
Definition at line 1260 of file ia64-gen.c.
References abort, IA64_RS_ARX, IA64_RS_CRX, IA64_RS_PSR, REG_NONE, and strstr().
Referenced by print_dependency_table().
| static int lookup_specifier | ( | const char * | name | ) | [static] |
Definition at line 1416 of file ia64-gen.c.
References _, IA64_RS_ANY, IA64_RS_AR, IA64_RS_AR_FPSR, IA64_RS_AR_K, IA64_RS_AR_UNAT, IA64_RS_ARb, IA64_RS_ARX, IA64_RS_BR, IA64_RS_CFM, IA64_RS_CPUID, IA64_RS_CR, IA64_RS_CR_IRR, IA64_RS_CR_LRR, IA64_RS_CRX, IA64_RS_DBR, IA64_RS_FR, IA64_RS_FRb, IA64_RS_GR, IA64_RS_GR0, IA64_RS_IBR, IA64_RS_INSERVICE, IA64_RS_MSR, IA64_RS_PKR, IA64_RS_PMC, IA64_RS_PMD, IA64_RS_PR, IA64_RS_PR63, IA64_RS_PRr, IA64_RS_PSR, IA64_RS_RR, IA64_RS_RSE, NULL, strchr, strcmp(), strncmp(), strstr(), and warn().
Referenced by print_dependency_table().
| int main | ( | int argc | , | |
| char ** | argv | |||
| ) |
Definition at line 2785 of file ia64-gen.c.
References _, c, chdir(), collapse_redundant_completers(), debug, EOF, errno, exit(), fail, generate_disassembler(), getopt_long(), ia64_opcodes_a, ia64_opcodes_b, ia64_opcodes_d, ia64_opcodes_f, ia64_opcodes_i, ia64_opcodes_m, ia64_opcodes_x, load_dependencies(), load_insn_classes(), NULL, optarg, optind, OPTION_SRCDIR, print_completer_table(), print_dependency_table(), print_main_table(), print_string_table(), print_version(), printf(), program_name, shrink(), srcdir, strerror(), usage(), and xmalloc_set_program_name().
Definition at line 1684 of file ia64-gen.c.
References bittree::bits, bittree::bits_to_skip, bittree::disent, NULL, bittree::skip_flag, and tmalloc.
Referenced by generate_disassembler(), and insert_bit_table_ent().
Definition at line 437 of file ia64-gen.c.
References i, ics, iclass::nsubs, iclass::nxsubs, iclass::orphan, iclass::subs, iclass::terminal_resolved, and iclass::xsubs.
Referenced by bot_manip(), build_builtin_delete_call(), build_call(), build_class_member_access_expr(), build_cleanup(), build_dynamic_cast_1(), build_eh_type_type(), build_function_call(), build_function_call_real(), build_offset_ref(), build_op_delete_call(), build_over_call(), build_throw(), build_unary_op(), constant_value_1(), do_scoped_id(), emit_tinfo_decl(), finish_eh_spec_block(), finish_handler_parms(), finish_id_expression(), finish_qualified_id_expr(), get_atexit_node(), get_tinfo_ptr(), hack_identifier(), integral_constant_value(), mark_vtable_entries(), parse_resource_users(), print_dependency_table(), register_dtor_fn(), resolve_address_of_overloaded_function(), tinfo_base_init(), tsubst_baselink(), tsubst_copy(), tsubst_copy_and_build(), tsubst_qualified_id(), and use_thunk().
| static int opcodes_eq | ( | struct ia64_opcode * | opc1, | |
| struct ia64_opcode * | opc2 | |||
| ) | [static] |
Definition at line 2614 of file ia64-gen.c.
References ia64_opcode::flags, get_prefix_len(), ia64_opcode::mask, memcmp, ia64_opcode::name, ia64_opcode::num_outputs, ia64_opcode::operands, ia64_opcode::type, and x.
Referenced by add_opcode_entry().
| static void parse_resource_users | ( | char * | ref, | |
| int ** | usersp, | |||
| int * | nusersp, | |||
| int ** | notesp | |||
| ) | const [static] |
| static void parse_resource_users | ( | const char * | , | |
| int ** | , | |||
| int * | , | |||
| int ** | ||||
| ) | [static] |
Referenced by add_dep().
| static int parse_semantics | ( | char * | sem | ) | [static] |
Definition at line 773 of file ia64-gen.c.
References IA64_DVS_DATA, IA64_DVS_IMPLIED, IA64_DVS_IMPLIEDF, IA64_DVS_INSTR, IA64_DVS_NONE, IA64_DVS_OTHER, IA64_DVS_SPECIFIC, IA64_DVS_STOP, and strcmp().
Referenced by load_depfile().
| static void print_completer_entry | ( | struct completer_entry * | ent | ) | [static] |
Definition at line 2572 of file ia64-gen.c.
References abort, completer_entry::bits, completer_entry::mask, NULL, and printf().
Referenced by print_completer_table().
Definition at line 2603 of file ia64-gen.c.
References glistlen, print_completer_entry(), printf(), and x.
Referenced by main().
Definition at line 1495 of file ia64-gen.c.
References _, comment(), debug, dlistlen, dlists, rdep::extra, i, IA64_DVS_OTHER, iclen, ics, len, deplist::len, lookup_regindex(), lookup_specifier(), mark_used(), mode, opdeplen, opdeps, printf(), rdeps, rdepslen, rdep::semantics, rdep::total_chks, rdep::total_regs, and warn().
Referenced by main().
Definition at line 2102 of file ia64-gen.c.
References disent::completer_index, disinsntable, disent::insn, insn_list, insn_list_len, disent::next_ent, disent::nexte, NULL, printf(), disent::priority, and x.
Referenced by generate_disassembler().
Definition at line 2696 of file ia64-gen.c.
References main_entry::completers, ia64_opcode::flags, fprintf_vma, index(), main_entry::main_index, maintable, ia64_opcode::mask, main_entry::name, main_entry::next, NULL, completer_entry::num, string_entry::num, ia64_opcode::num_outputs, main_entry::opcode, ia64_opcode::opcode, ia64_opcode::operands, printf(), ptr, and ia64_opcode::type.
Referenced by main().
Definition at line 2770 of file ia64-gen.c.
References printf(), program_name, and xexit().
Referenced by common_handle_option(), independent_decode_option(), init_asm_output(), main(), process_args(), and process_options().
| static void shrink | ( | struct ia64_opcode * | table | ) | [static] |
Definition at line 2728 of file ia64-gen.c.
References add_opcode_entry(), alias, ia64_opcode::flags, i, IA64_OPND_NIL, IA64_OPND_P1, IA64_OPND_P2, NELEMS, NULL, ia64_opcode::num_outputs, ia64_opcode::operands, operands, PSEUDO, and tmalloc.
Referenced by b_out_bfd_relax_section(), bfd_coff_reloc16_relax_section(), main(), and perform_relocations().
Definition at line 588 of file ia64-gen.c.
References ics, iclass::is_class, iclass::name, and strcmp().
Referenced by load_insn_classes().
| static void warn | ( | const char * | message, | |
| ... | ||||
| ) | [static] |
Definition at line 308 of file ia64-gen.c.
References _, args, fprintf(), program_name, va_end, va_start, and vfprintf().
Referenced by check_return_expr(), do_friend(), fetch_insn_class(), ffeglobal_proc_def_arg(), ffeglobal_proc_ref_arg(), find_and_get_str(), handle_deprecated_attribute(), in_iclass(), insert_opcode_dependencies(), lang_finish(), lookup_specifier(), parse_resource_users(), print_dependency_table(), and warn_if_unused_value().
| int debug = 0 |
Definition at line 62 of file ia64-gen.c.
Referenced by add_dis_table_ent(), finish_distable(), and print_dis_table().
int dlistlen = 0 [static] |
Definition at line 242 of file ia64-gen.c.
Referenced by insert_deplist(), and print_dependency_table().
Referenced by insert_deplist(), and print_dependency_table().
int dlisttotlen = 0 [static] |
struct completer_entry** glist [static] |
Definition at line 2195 of file ia64-gen.c.
Referenced by c_begin_stmt_expr(), c_begin_vm_scope(), c_end_vm_scope(), c_finish_stmt_expr(), and RINIT::Process_region().
int glistlen = 0 [static] |
Definition at line 2196 of file ia64-gen.c.
Referenced by collapse_redundant_completers(), insert_gclist(), and print_completer_table().
int glisttotlen = 0 [static] |
int iclen = 0 [static] |
Definition at line 222 of file ia64-gen.c.
Referenced by fetch_insn_class(), load_insn_classes(), and print_dependency_table().
int ictotlen = 0 [static] |
unsigned char* insn_list [static] |
Definition at line 1870 of file ia64-gen.c.
Referenced by cgen_lookup_insn(), fixup_var_refs_insns_with_hash(), gen_dis_table(), print_dis_table(), and print_insn().
int insn_list_len = 0 [static] |
Initial value:
{
{"srcdir", required_argument, NULL, OPTION_SRCDIR},
{"debug", no_argument, NULL, 'd'},
{"version", no_argument, NULL, 'V'},
{"help", no_argument, NULL, 'h'},
{0, no_argument, NULL, 0}
}
Definition at line 2760 of file ia64-gen.c.
| int opcode_count = 0 |
int opdeplen = 0 [static] |
Definition at line 232 of file ia64-gen.c.
Referenced by insert_dependencies(), and print_dependency_table().
Referenced by insert_dependencies(), and print_dependency_table().
int opdeptotlen = 0 [static] |
Referenced by add_opcode_entry(), and generate_disassembler().
| int otlen = 0 |
Definition at line 86 of file ia64-gen.c.
Referenced by add_opcode_entry(), and generate_disassembler().
| int ottotlen = 0 |
| const char* program_name = NULL |
Definition at line 61 of file ia64-gen.c.
Referenced by insert_opcode_dependencies(), insert_resource(), and print_dependency_table().
int rdepslen = 0 [static] |
Definition at line 204 of file ia64-gen.c.
Referenced by insert_opcode_dependencies(), insert_resource(), load_dependencies(), and print_dependency_table().
int rdepstotlen = 0 [static] |
| int strtablen = 0 |
| int strtabtotlen = 0 |
int tot_insn_list_len = 0 [static] |
1.5.6