Commit graph

12 commits

Author SHA1 Message Date
Doug Evans
86dc452e25 * cgen-dis.c (hash_insn_array): CGEN_INSN_VALUE ->
CGEN_INSN_BASE_VALUE.
	* cgen-asm.in (insert_normal): Change start,length to unsigned int.
	New args word_offset, word_length.  Rewrite.
	(FLD): Define.
	(insert_1): Fix lsb0 case.
	* cgen-dis.in (extract_normal): Change start,length to unsigned int.
	New args word_offset, word_length.  Rewrite.
	(FLD): Define.
	(extract_1): Fix lsb0 case.
	* cgen-opc.in (FLD): Define.
	* m32r-opc.c,m32r-opc.h,m32r-asm.c,m32r-dis.c: Regenerate.
	* fr30-opc.c,fr30-opc.h,fr30-asm.c,fr30-dis.c: Regenerate.
1998-11-30 23:41:55 +00:00
Doug Evans
95b03313e0 * cgen-asm.in (insert_1): Replace calls to bfd_getb8/putb8.
(insert_normal, !CGEN_INT_INSN_P case): Only fetch enough bytes
	to hold value.
	(insert_insn_normal): Fix typo.
	* cgen-dis.c (cgen_dis_lookup_insn): Update type of `value' arg.
	* cgen-dis.in (extract_normal): Ditto.  New arg `pc'.
	Rewrite ! CGEN_INT_INSN_P case.
	(extract_insn_normal): Ditto.
	(extract_1): New arg `pc'.  All callers updated.
	Replace calls to bfd_getb8.
	(fill_cache): New fn.
	* cgen-opc.c (cgen_{get,put}_insn_value): Move here ...
	* cgen-opc.in: ... from here.
	(@arch@_cgen_lookup_insn): Rewrite ! CGEN_INT_INSN_P case.
	* m32r-asm.c,m32r-dis.c,m32r-opc.c: Rebuild.
	* fr30-asm.c,fr30-dis.c,fr30-opc.c: Rebuild.
1998-11-18 23:25:45 +00:00
Doug Evans
fcea6f2092 * cgen-asm.in (insert_1): New function.
(insert_normal): Progress on handling ! CGEN_INT_INSN_P.
	(insert_insn_normal): Update handling of CGEN_INT_INSN_P.
	(@arch@_cgen_assemble_insn): Update type of `buf' arg.
	* cgen-dis.in (extract_1): New function.
	(extract_normal): buf_ctrl renamed to ex_info, update type.
	Progress on handling of CGEN_INT_INSN_P.
	(extract_insn_normal): buf_ctrl renamed to ex_info, update type.
	Update handling of CGEN_INT_INSN_P.  Handle errors from
	@arch@_cgen_extract_operand.
	(print_insn): Renamed from print_int_insn.  Handle ! CGEN_INT_INSN_P.
	(default_print_insn): Renamed from print_insn.
	Handle ! CGEN_INT_INSN_P.
	(print_insn_@arch@): Handle error returns from print_insn.
	* cgen-opc.in (cgen_get_insn_value, cgen_put_insn_value): New fns.
	(@arch@_cgen_lookup_insn): Update handling of CGEN_INT_INSN_P.
	(@arch@_cgen_lookup_get_insn_operands): Ditto.
	* m32r-opc.c,m32r-opc.h,m32r-asm.c,m32r-dis.c: Regenerate.
1998-10-19 20:15:24 +00:00
Doug Evans
c2009f4a31 Move all global state data into opcode table struct, and treat
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.
1998-08-03 19:56:43 +00:00
Doug Evans
fbc8134df6 * cgen-opc.in (@arch@_cgen_lookup_insn): Update call to
CGEN_EXTRACT_FN.
	(@arch@_cgen_get_insn_operands): @arch@_cgen_get_operand renamed to
	@arch_cgen_get_int_operand.
	* cgen-asm.in (insert_insn_normal): New arg `pc', callers updated.
	Update call to @arch@_cgen_insert_operand.
	(@arch@_cgen_assemble_insn): Update call to CGEN_INSERT_FN.
	* cgen-dis.in (print_normal): Delete use of CGEN_PCREL_OFFSET.
	(extract_insn_normal): New arg `pc', callers updated.
	Update call to @arch@_cgen_extract_operand.
	(print_insn): Update call to CGEN_EXTRACT_FN.
	* m32r-opc.h,m32r-opc.c,m32r-asm.c,m32r-dis.c: Regenerate.
1998-07-21 20:59:23 +00:00
Doug Evans
0499462e76 * Makefile.am (CGENDIR): Set via configure.
(CGEN): New variable.
	(CGENFILES): object.scm renamed to cos.scm.
	(run-cgen): Renamed from cgen.  stamp file renamed to stamp-$prefix.
	(stamp-m32r): Pass prefix to run-cgen.
	* Makefile.in: Regenerate.
	* cgen-asm.in: @arch@-opc.h renamed to @prefix@-opc.h.
	* cgen-dis.in: Ditto.
	* cgen-opc.in: Ditto.
	* cgen.sh: New args cgen,prefix.  Delete args scheme,schemeflags.
	* configure.in: AC_SUBST cgen,cgendir.  No longer look for guile.
	* configure: Regenerate.
	* m32r-asm.c,m32r-dis.c,m32r-opc.c,m32r-opc.h: Regenerate.
1998-07-01 23:31:27 +00:00
Nick Clifton
1e74d15c9f Internationalised these files. 1998-04-29 01:06:56 +00:00
Doug Evans
2613b5e63d * cgen-asm.c (cgen_current_opcode_table): Renamed from ..._data.
(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.
1998-04-27 17:48:05 +00:00
Doug Evans
bed9a23ccd Fix comment. 1998-02-13 22:36:22 +00:00
Doug Evans
b2f1861292 * cgen-opc.in (@arch@_cgen_get_insn_operands): Handle empty
operand instance list.
	* m32r-opc.c: Regenerate.
1998-02-13 22:35:43 +00:00
Doug Evans
390bd87dba * cgen-opc.in (@arch@_cgen_lookup_insn): New argument alias_p.
Ignore ALIAS insns if asked to.
	(@arch@_cgen_get_insn_operands): Pass 0 for alias_p, NULL for insn.
	* m32r-opc.c: Regenerate.
1998-02-13 02:31:10 +00:00
Doug Evans
ab0bd0493a * cgen-opc.in: New file.
* cgen.sh: Translate @ARCH@.  Cat cgen-opc.in into @arch@-opc.c.
	* Makefile.am (CGENFILES): Add cgen-opc.in.
	* Makefile.in: Regenerate.

	* cgen-opc.c (cgen_set_cpu): Delete init of hw list `next' chain.
	(cgen_hw_lookup): Make result const.

	* cgen-dis.in (*): Use PTR instead of void *.
	(print_insn): Delete unused vars `i', `syntax'.

	* m32r-opc.h, m32r-opc.c, m32r-asm.c, m32r-dis.c: Regenerate.
1998-02-12 03:13:21 +00:00