opcode table as something that is "opened/closed".
* cgen-asm.c (all fns): New first arg of opcode table descriptor.
(cgen_asm_init): Delete.
(cgen_set_parse_operand_fn): New function.
* cgen-dis.c (all fns): New first arg of opcode table descriptor.
(cgen_dis_init): Delete.
* cgen-opc.c (all fns): New first arg of opcode table descriptor.
(cgen_current_{opcode_table_mach,endian}): Delete.
* cgen-asm.in (all fns): New first arg of opcode table descriptor.
* cgen-dis.in (all fns): Ditto.
* cgen-opc.in (all fns): Ditto.
* m32r-asm.c,m32r-dis.c,m32r-opc.c,m32r-opc.h: Regenerate.
* cgen-asm.in (parse_insn_normal): Ignore case in mnemonics.
* cgen-dis.in (print_normal): Split into two.
(print_address): New function.
(extract_insn_normal): Clarify insn_value arg.
(print_int_insn): Renamed from print_insn.
(print_insn): New arg.
(print_insn_@arch@): Open opcode table if not already done so.
Move reading of insn into print_insn.
(asm_hash_table_entries): New variable.
(cgen_asm_init): Free asm_hash_table_entries.
(hash_insn_array,hash_insn_list): New functions.
(build_asm_hash_table): Use them. Hash macro insns as well.
(cgen_asm_lookup_insn): Update.
* cgen_dis.c (cgen_current_opcode_table): Renamed from ..._data.
(dis_hash_table_entries): New variable.
(cgen_dis_init): Free dis_hash_table_entries.
(hash_insn_array,hash_insn_list): New functions.
(build_dis_hash_table): Use them. Hash macro insns as well.
(cgen_dis_lookup_insn): Update.
* cgen-opc.c (cgen_current_opcode_table): Renamed from ..._data.
(cgen_set_cpu,cgen_hw_lookup,cgen_insn_count): Update.
(cgen_macro_insn_count): New function.
* cgen-opc.in (@arch@_cgen_lookup_insn): New arg alias_p.
All callers updated. Sanity check result of extract fn.
(@arch@_cgen_get_insn_operands): Change result type to void.
Delete args insn_value, length. New arg fields. All callers updated.
(@arch@_cgen_lookup_get_insn_operands): New function.