diff options
author | cvs2svn <> | 2011-12-08 20:47:29 +0000 |
---|---|---|
committer | cvs2svn <> | 2011-12-08 20:47:29 +0000 |
commit | 043beeed5375bcc7982af475b1d599e475f0467a (patch) | |
tree | e4a3f7b6abc9819aaf88a8bb5ff54698f7d15200 /include/opcode/tic6x.h | |
parent | ad0835bc5e9652f42535584b12137a955ac68789 (diff) | |
download | cygnal-cgen-snapshot-20111201.tar.gz cygnal-cgen-snapshot-20111201.tar.bz2 cygnal-cgen-snapshot-20111201.zip |
This commit was manufactured by cvs2svn to create tag 'cgen-cgen-snapshot-20111201
snapshot-20111201'.
Sprout from gdb_7_4-branch 2011-12-08 20:47:28 UTC cvs2svn 'This commit was manufactured by cvs2svn to create branch 'gdb_7_4-branch'.'
Delete:
djunpack.bat
include/COPYING
include/COPYING3
include/ChangeLog
include/ChangeLog-9103
include/MAINTAINERS
include/alloca-conf.h
include/ansidecl.h
include/aout/ChangeLog
include/aout/adobe.h
include/aout/aout64.h
include/aout/ar.h
include/aout/dynix3.h
include/aout/encap.h
include/aout/host.h
include/aout/hp.h
include/aout/hp300hpux.h
include/aout/hppa.h
include/aout/ranlib.h
include/aout/reloc.h
include/aout/stab.def
include/aout/stab_gnu.h
include/aout/sun4.h
include/bfdlink.h
include/binary-io.h
include/bout.h
include/cgen/ChangeLog
include/cgen/basic-modes.h
include/cgen/basic-ops.h
include/cgen/bitset.h
include/coff/ChangeLog
include/coff/ChangeLog-9103
include/coff/alpha.h
include/coff/apollo.h
include/coff/arm.h
include/coff/aux-coff.h
include/coff/ecoff.h
include/coff/external.h
include/coff/go32exe.h
include/coff/h8300.h
include/coff/h8500.h
include/coff/i386.h
include/coff/i860.h
include/coff/i960.h
include/coff/ia64.h
include/coff/internal.h
include/coff/m68k.h
include/coff/m88k.h
include/coff/mcore.h
include/coff/mips.h
include/coff/mipspe.h
include/coff/or32.h
include/coff/pe.h
include/coff/powerpc.h
include/coff/rs6000.h
include/coff/rs6k64.h
include/coff/sh.h
include/coff/sparc.h
include/coff/sym.h
include/coff/symconst.h
include/coff/ti.h
include/coff/tic30.h
include/coff/tic4x.h
include/coff/tic54x.h
include/coff/tic80.h
include/coff/w65.h
include/coff/we32k.h
include/coff/x86_64.h
include/coff/xcoff.h
include/coff/z80.h
include/coff/z8k.h
include/demangle.h
include/dis-asm.h
include/dwarf2.h
include/dyn-string.h
include/elf/ChangeLog
include/elf/ChangeLog-9103
include/elf/alpha.h
include/elf/arc.h
include/elf/arm.h
include/elf/avr.h
include/elf/bfin.h
include/elf/common.h
include/elf/cr16.h
include/elf/cr16c.h
include/elf/cris.h
include/elf/crx.h
include/elf/d10v.h
include/elf/d30v.h
include/elf/dlx.h
include/elf/dwarf.h
include/elf/epiphany.h
include/elf/external.h
include/elf/fr30.h
include/elf/frv.h
include/elf/h8.h
include/elf/hppa.h
include/elf/i370.h
include/elf/i386.h
include/elf/i860.h
include/elf/i960.h
include/elf/ia64.h
include/elf/internal.h
include/elf/ip2k.h
include/elf/iq2000.h
include/elf/lm32.h
include/elf/m32c.h
include/elf/m32r.h
include/elf/m68hc11.h
include/elf/m68k.h
include/elf/mcore.h
include/elf/mep.h
include/elf/microblaze.h
include/elf/mips.h
include/elf/mmix.h
include/elf/mn10200.h
include/elf/mn10300.h
include/elf/moxie.h
include/elf/msp430.h
include/elf/mt.h
include/elf/openrisc.h
include/elf/or32.h
include/elf/pj.h
include/elf/ppc.h
include/elf/ppc64.h
include/elf/reloc-macros.h
include/elf/rl78.h
include/elf/rx.h
include/elf/s390.h
include/elf/score.h
include/elf/sh.h
include/elf/sparc.h
include/elf/spu.h
include/elf/tic6x-attrs.h
include/elf/tic6x.h
include/elf/tilegx.h
include/elf/tilepro.h
include/elf/v850.h
include/elf/vax.h
include/elf/vxworks.h
include/elf/x86-64.h
include/elf/xc16x.h
include/elf/xstormy16.h
include/elf/xtensa.h
include/fibheap.h
include/filenames.h
include/floatformat.h
include/fnmatch.h
include/fopen-bin.h
include/fopen-same.h
include/fopen-vms.h
include/gdb/ChangeLog
include/gdb/callback.h
include/gdb/fileio.h
include/gdb/remote-sim.h
include/gdb/signals.def
include/gdb/signals.h
include/gdb/sim-arm.h
include/gdb/sim-bfin.h
include/gdb/sim-cr16.h
include/gdb/sim-d10v.h
include/gdb/sim-frv.h
include/gdb/sim-h8300.h
include/gdb/sim-lm32.h
include/gdb/sim-m32c.h
include/gdb/sim-ppc.h
include/gdb/sim-rx.h
include/gdb/sim-sh.h
include/gdbm.h
include/getopt.h
include/hashtab.h
include/hp-symtab.h
include/ieee.h
include/libiberty.h
include/lto-symtab.h
include/mach-o/ChangeLog
include/mach-o/external.h
include/mach-o/loader.h
include/mach-o/reloc.h
include/mach-o/x86-64.h
include/md5.h
include/nlm/ChangeLog
include/nlm/alpha-ext.h
include/nlm/common.h
include/nlm/external.h
include/nlm/i386-ext.h
include/nlm/internal.h
include/nlm/ppc-ext.h
include/nlm/sparc32-ext.h
include/oasys.h
include/objalloc.h
include/obstack.h
include/opcode/ChangeLog
include/opcode/ChangeLog-9103
include/opcode/alpha.h
include/opcode/arc.h
include/opcode/arm.h
include/opcode/avr.h
include/opcode/bfin.h
include/opcode/cgen.h
include/opcode/convex.h
include/opcode/cr16.h
include/opcode/cris.h
include/opcode/crx.h
include/opcode/d10v.h
include/opcode/d30v.h
include/opcode/dlx.h
include/opcode/h8300.h
include/opcode/hppa.h
include/opcode/i370.h
include/opcode/i386.h
include/opcode/i860.h
include/opcode/i960.h
include/opcode/ia64.h
include/opcode/m68hc11.h
include/opcode/m68k.h
include/opcode/m88k.h
include/opcode/mips.h
include/opcode/mmix.h
include/opcode/mn10200.h
include/opcode/mn10300.h
include/opcode/moxie.h
include/opcode/msp430.h
include/opcode/np1.h
include/opcode/ns32k.h
include/opcode/or32.h
include/opcode/pdp11.h
include/opcode/pj.h
include/opcode/pn.h
include/opcode/ppc.h
include/opcode/pyr.h
include/opcode/rl78.h
include/opcode/rx.h
include/opcode/s390.h
include/opcode/score-datadep.h
include/opcode/score-inst.h
include/opcode/sparc.h
include/opcode/spu-insns.h
include/opcode/spu.h
include/opcode/tahoe.h
include/opcode/tic30.h
include/opcode/tic4x.h
include/opcode/tic54x.h
include/opcode/tic6x-control-registers.h
include/opcode/tic6x-insn-formats.h
include/opcode/tic6x-opcode-table.h
include/opcode/tic6x.h
include/opcode/tic80.h
include/opcode/tilegx.h
include/opcode/tilepro.h
include/opcode/v850.h
include/opcode/vax.h
include/os9k.h
include/partition.h
include/plugin-api.h
include/progress.h
include/safe-ctype.h
include/sha1.h
include/simple-object.h
include/som/ChangeLog
include/som/aout.h
include/som/clock.h
include/som/internal.h
include/som/lst.h
include/som/reloc.h
include/sort.h
include/splay-tree.h
include/symcat.h
include/timeval-utils.h
include/vms/ChangeLog
include/vms/dcx.h
include/vms/dmt.h
include/vms/dsc.h
include/vms/dst.h
include/vms/eeom.h
include/vms/egps.h
include/vms/egsd.h
include/vms/egst.h
include/vms/egsy.h
include/vms/eiaf.h
include/vms/eicp.h
include/vms/eidc.h
include/vms/eiha.h
include/vms/eihd.h
include/vms/eihi.h
include/vms/eihs.h
include/vms/eihvn.h
include/vms/eisd.h
include/vms/emh.h
include/vms/eobjrec.h
include/vms/esdf.h
include/vms/esdfm.h
include/vms/esdfv.h
include/vms/esgps.h
include/vms/esrf.h
include/vms/etir.h
include/vms/internal.h
include/vms/lbr.h
include/vms/prt.h
include/vms/shl.h
include/xregex.h
include/xregex2.h
include/xtensa-config.h
include/xtensa-isa-internal.h
include/xtensa-isa.h
texinfo/texinfo.tex
Diffstat (limited to 'include/opcode/tic6x.h')
-rw-r--r-- | include/opcode/tic6x.h | 613 |
1 files changed, 0 insertions, 613 deletions
diff --git a/include/opcode/tic6x.h b/include/opcode/tic6x.h deleted file mode 100644 index 2a7a2463d..000000000 --- a/include/opcode/tic6x.h +++ /dev/null @@ -1,613 +0,0 @@ -/* TI C6X opcode information. - Copyright 2010, 2011 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, - MA 02110-1301, USA. */ - -#ifndef OPCODE_TIC6X_H -#define OPCODE_TIC6X_H - -#include "bfd.h" -#include "symcat.h" - -/* A field in an instruction format. The names are based on those - used in the architecture manuals. */ -typedef enum - { - tic6x_field_baseR, - tic6x_field_creg, - tic6x_field_cst, - tic6x_field_csta, - tic6x_field_cstb, - tic6x_field_dst, - tic6x_field_fstgfcyc, - tic6x_field_h, - tic6x_field_mask, - tic6x_field_mode, - tic6x_field_offsetR, - tic6x_field_op, - tic6x_field_p, - tic6x_field_r, - tic6x_field_s, - tic6x_field_sc, - tic6x_field_src, - tic6x_field_src1, - tic6x_field_src2, - tic6x_field_srcdst, - tic6x_field_x, - tic6x_field_y, - tic6x_field_z - } tic6x_insn_field_id; - -typedef struct -{ - /* The name used to reference the field. */ - tic6x_insn_field_id field_id; - - /* The least-significant bit position in the field. */ - unsigned short low_pos; - - /* The number of bits in the field. */ - unsigned short width; -} tic6x_insn_field; - -/* Maximum number of variable fields in an instruction format. */ -#define TIC6X_MAX_INSN_FIELDS 11 - -/* A particular instruction format. */ -typedef struct -{ - /* How many bits in the instruction. */ - unsigned int num_bits; - - /* Constant bits in the instruction. */ - unsigned int cst_bits; - - /* Mask matching those bits. */ - unsigned int mask; - - /* The number of instruction fields. */ - unsigned int num_fields; - - /* Descriptions of instruction fields. */ - tic6x_insn_field fields[TIC6X_MAX_INSN_FIELDS]; -} tic6x_insn_format; - -/* An index into the table of instruction formats. */ -typedef enum - { -#define FMT(name, num_bits, cst_bits, mask, fields) \ - CONCAT2(tic6x_insn_format_, name), -#include "tic6x-insn-formats.h" -#undef FMT - tic6x_insn_format_max - } tic6x_insn_format_id; - -/* The table itself. */ -extern const tic6x_insn_format tic6x_insn_format_table[tic6x_insn_format_max]; - -/* If instruction format FMT has a field FIELD, return a pointer to - the description of that field; otherwise return NULL. */ - -const tic6x_insn_field *tic6x_field_from_fmt (const tic6x_insn_format *fmt, - tic6x_insn_field_id field); - -/* Description of a field (in an instruction format) whose value is - fixed, or constrained to be in a particular range, in a particular - opcode. */ -typedef struct -{ - /* The name of the field. */ - tic6x_insn_field_id field_id; - - /* The least value of the field in this instruction. */ - unsigned int min_val; - - /* The greatest value of the field in this instruction. */ - unsigned int max_val; -} tic6x_fixed_field; - -/* Bit-masks for defining instructions present on some subset of - processors; each indicates an instruction present on that processor - and those that are supersets of it. The options passed to the - assembler determine a bit-mask ANDed with the bit-mask indicating - when the instruction was added to determine whether the instruction - is enabled. */ -#define TIC6X_INSN_C62X 0x0001 -#define TIC6X_INSN_C64X 0x0002 -#define TIC6X_INSN_C64XP 0x0004 -#define TIC6X_INSN_C67X 0x0008 -#define TIC6X_INSN_C67XP 0x0010 -#define TIC6X_INSN_C674X 0x0020 - -/* Flags with further information about an opcode table entry. */ - -/* Only used by the assembler, not the disassembler. */ -#define TIC6X_FLAG_MACRO 0x0001 - -/* Must be first in its execute packet. */ -#define TIC6X_FLAG_FIRST 0x0002 - -/* Multi-cycle NOP (not used for the NOP n instruction itself, which - is only a multicycle NOP if n > 1). */ -#define TIC6X_FLAG_MCNOP 0x0004 - -/* Cannot be in parallel with a multi-cycle NOP. */ -#define TIC6X_FLAG_NO_MCNOP 0x0008 - -/* Load instruction. */ -#define TIC6X_FLAG_LOAD 0x0010 - -/* Store instruction. */ -#define TIC6X_FLAG_STORE 0x0020 - -/* Unaligned memory operation. */ -#define TIC6X_FLAG_UNALIGNED 0x0040 - -/* Only on side B. */ -#define TIC6X_FLAG_SIDE_B_ONLY 0x0080 - -/* Only on data path T2. */ -#define TIC6X_FLAG_SIDE_T2_ONLY 0x0100 - -/* Does not support cross paths. */ -#define TIC6X_FLAG_NO_CROSS 0x0200 - -/* Annotate this branch instruction as a call. */ -#define TIC6X_FLAG_CALL 0x0400 - -/* Annotate this branch instruction as a return. */ -#define TIC6X_FLAG_RETURN 0x0800 - -/* This instruction starts a software pipelined loop. */ -#define TIC6X_FLAG_SPLOOP 0x1000 - -/* This instruction ends a software pipelined loop. */ -#define TIC6X_FLAG_SPKERNEL 0x2000 - -/* This instruction takes a list of functional units as parameters; - although described as having one parameter, the number may be 0 to - 8. */ -#define TIC6X_FLAG_SPMASK 0x4000 - -/* When more than one opcode matches the assembly source, prefer the - one with the highest value for this bit-field. If two opcode table - entries can match the same syntactic form, they must have different - values here. */ -#define TIC6X_PREFER_VAL(n) (((n) & 0x8000) >> 15) -#define TIC6X_FLAG_PREFER(n) ((n) << 15) -#define TIC6X_NUM_PREFER 2 - -/* Maximum number of fixed fields for a particular opcode. */ -#define TIC6X_MAX_FIXED_FIELDS 4 - -/* Maximum number of operands in the opcode table for a particular - opcode. */ -#define TIC6X_MAX_OPERANDS 4 - -/* Maximum number of operands in the source code for a particular - opcode (different from the number in the opcode table for SPMASK - and SPMASKR). */ -#define TIC6X_MAX_SOURCE_OPERANDS 8 - -/* Maximum number of variable fields for a particular opcode. */ -#define TIC6X_MAX_VAR_FIELDS 7 - -/* Which functional units an opcode uses. This only describes the - basic choice of D, L, M, S or no functional unit; other fields are - used to describe further restrictions (instructions only operating - on one side), use of cross paths and load/store instructions using - one side for the address and the other side for the source or - destination register. */ -typedef enum - { - tic6x_func_unit_d, - tic6x_func_unit_l, - tic6x_func_unit_m, - tic6x_func_unit_s, - tic6x_func_unit_nfu - } tic6x_func_unit_base; - -/* Possible forms of source operand. */ -typedef enum - { - /* An assembly-time constant. */ - tic6x_operand_asm_const, - /* A link-time constant. */ - tic6x_operand_link_const, - /* A register, from the same side as the functional unit - selected. */ - tic6x_operand_reg, - /* A register, that is from the other side if a cross path is - used. */ - tic6x_operand_xreg, - /* A register, that is from the side of the data path - selected. */ - tic6x_operand_dreg, - /* An address register usable with 15-bit offsets (B14 or B15). - This is from the same side as the functional unit if a cross - path is not used, and the other side if a cross path is - used. */ - tic6x_operand_areg, - /* A return address register (A3 or B3), from the same side as the - functional unit selected. */ - tic6x_operand_retreg, - /* A register pair, from the same side as the functional unit - selected. */ - tic6x_operand_regpair, - /* A register pair, that is from the other side if a cross path is - used. */ - tic6x_operand_xregpair, - /* A register pair, from the side of the data path selected. */ - tic6x_operand_dregpair, - /* The literal string "irp" (case-insensitive). */ - tic6x_operand_irp, - /* The literal string "nrp" (case-insensitive). */ - tic6x_operand_nrp, - /* A control register. */ - tic6x_operand_ctrl, - /* A memory reference (base and offset registers from the side of - the functional unit selected), using either unsigned 5-bit - constant or register offset, if any offset; register offsets - cannot use unscaled () syntax. */ - tic6x_operand_mem_short, - /* A memory reference (base and offset registers from the side of - the functional unit selected), using either unsigned 5-bit - constant or register offset, if any offset; register offsets - can use unscaled () syntax (for LDNDW and STNDW). */ - tic6x_operand_mem_ndw, - /* A memory reference using 15-bit link-time constant offset - relative to B14 or B15. */ - tic6x_operand_mem_long, - /* A memory reference that only dereferences a register with no - further adjustments (*REG), that register being from the side - of the functional unit selected. */ - tic6x_operand_mem_deref, - /* A functional unit name or a list thereof (for SPMASK and - SPMASKR). */ - tic6x_operand_func_unit - } tic6x_operand_form; - -/* Whether something is, or can be, read or written. */ -typedef enum - { - tic6x_rw_none, - tic6x_rw_read, - tic6x_rw_write, - tic6x_rw_read_write - } tic6x_rw; - -/* Description of a source operand and how it is used. */ -typedef struct -{ - /* The syntactic form of the operand. */ - tic6x_operand_form form; - - /* For non-constant operands, the size in bytes (1, 2, 4, 5 or - 8). Ignored for constant operands. */ - unsigned int size; - - /* Whether the operand is read, written or both. In addition to the - operations described here, address registers are read on cycle 1 - regardless of when the memory operand is read or written, and may - be modified as described by the addressing mode, and control - registers may be implicitly read by some instructions. There are - also some special cases not fully described by this - structure. - - - For mpydp, the low part of src2 is read on cycles 1 and 3 but - not 2, and the high part on cycles 2 and 4 but not 3. - - - The swap2 pseudo-operation maps to packlh2, reading the first - operand of swap2 twice. */ - tic6x_rw rw; - - /* The first and last cycles (1 for E1, etc.) at which the operand, - or the low part for two-register operands, is read or - written. */ - unsigned short low_first; - unsigned short low_last; - - /* Likewise, for the high part. */ - unsigned short high_first; - unsigned short high_last; -} tic6x_operand_info; - -/* Ways of converting an operand or functional unit specifier to a - field value. */ -typedef enum - { - /* Store an unsigned assembly-time constant (which must fit) in - the field. */ - tic6x_coding_ucst, - /* Store a signed constant (which must fit) in the field. This - may be used both for assembly-time constants and for link-time - constants. */ - tic6x_coding_scst, - /* Subtract one from an unsigned assembly-time constant (which - must be strictly positive before the subtraction) and store the - value (which must fit) in the field. */ - tic6x_coding_ucst_minus_one, - /* Negate a signed assembly-time constant, and store the result of - negation (which must fit) in the field. Used only for - pseudo-operations. */ - tic6x_coding_scst_negate, - /* Store an unsigned link-time constant, implicitly DP-relative - and counting in bytes, in the field. For expression operands, - assembly-time constants are encoded as-is. For memory - reference operands, the offset is encoded as-is if [] syntax is - used and shifted if () is used. */ - tic6x_coding_ulcst_dpr_byte, - /* Store an unsigned link-time constant, implicitly DP-relative - and counting in half-words, in the field. For expression - operands, assembly-time constants are encoded as-is. For - memory reference operands, the offset is encoded as-is if [] - syntax is used and shifted if () is used. */ - tic6x_coding_ulcst_dpr_half, - /* Store an unsigned link-time constant, implicitly DP-relative - and counting in words, in the field. For expression operands, - assembly-time constants are encoded as-is. For memory - reference operands, the offset is encoded as-is if [] syntax is - used and shifted if () is used. */ - tic6x_coding_ulcst_dpr_word, - /* Store the low 16 bits of a link-time constant in the field; - considered unsigned for disassembly. */ - tic6x_coding_lcst_low16, - /* Store the high 16 bits of a link-time constant in the field; - considered unsigned for disassembly. */ - tic6x_coding_lcst_high16, - /* Store a signed PC-relative value (address of label minus - address of fetch packet containing the current instruction, - counted in words) in the field. */ - tic6x_coding_pcrel, - /* Likewise, but counting in half-words if in a header-based fetch - packet. */ - tic6x_coding_pcrel_half, - /* Encode the register number (even number for a register pair) in - the field. When applied to a memory reference, encode the base - register. */ - tic6x_coding_reg, - /* Store 0 for register B14, 1 for register B15. When applied to - a memory reference, encode the base register. */ - tic6x_coding_areg, - /* Store the low part of a control register address. */ - tic6x_coding_crlo, - /* Store the high part of a control register address. */ - tic6x_coding_crhi, - /* Encode the even register number for a register pair, shifted - right by one bit. */ - tic6x_coding_reg_shift, - /* Store either the offset register or the 5-bit unsigned offset - for a memory reference. If an offset uses the unscaled () - form, which is only permitted with constants, it is scaled - according to the access size of the operand before being - stored. */ - tic6x_coding_mem_offset, - /* Store either the offset register or the 5-bit unsigned offset - for a memory reference, but with no scaling applied to the - offset (for nonaligned doubleword operations). */ - tic6x_coding_mem_offset_noscale, - /* Store the addressing mode for a memory reference. */ - tic6x_coding_mem_mode, - /* Store whether a memory reference is scaled. */ - tic6x_coding_scaled, - /* Store the stage in an SPKERNEL instruction in the upper part of - the field. */ - tic6x_coding_fstg, - /* Store the cycle in an SPKERNEL instruction in the lower part of - the field. */ - tic6x_coding_fcyc, - /* Store the mask bits for functional units in the field in an - SPMASK or SPMASKR instruction. */ - tic6x_coding_spmask, - /* Store the number of a register that is unused, or minimally - used, in this execute packet. The number must be the same for - all uses of this coding in a single instruction, but may be - different for different instructions in the execute packet. - This is for the "zero" pseudo-operation. This is not safe when - reads may occur from instructions in previous execute packets; - in such cases the programmer or compiler should use explicit - "sub" instructions for those cases of "zero" that cannot be - implemented as "mvk" for the processor specified. */ - tic6x_coding_reg_unused, - /* Store 1 if the functional unit used is on side B, 0 for side - A. */ - tic6x_coding_fu, - /* Store 1 if the data path used (source register for store, - destination for load) is on side B, 0 for side A. */ - tic6x_coding_data_fu, - /* Store 1 if the cross path is being used, 0 otherwise. */ - tic6x_coding_xpath - } tic6x_coding_method; - -/* How to generate the value of a particular field. */ -typedef struct -{ - /* The name of the field. */ - tic6x_insn_field_id field_id; - - /* How it is encoded. */ - tic6x_coding_method coding_method; - - /* Source operand number, if any. */ - unsigned int operand_num; -} tic6x_coding_field; - -/* Types of instruction for pipeline purposes. The type determines - functional unit and cross path latency (when the same functional - unit can be used by other instructions, when the same cross path - can be used by other instructions). */ -typedef enum - { - tic6x_pipeline_nop, - tic6x_pipeline_1cycle, - tic6x_pipeline_1616_m, - tic6x_pipeline_store, - tic6x_pipeline_mul_ext, - tic6x_pipeline_load, - tic6x_pipeline_branch, - tic6x_pipeline_2cycle_dp, - tic6x_pipeline_4cycle, - tic6x_pipeline_intdp, - tic6x_pipeline_dpcmp, - tic6x_pipeline_addsubdp, - tic6x_pipeline_mpyi, - tic6x_pipeline_mpyid, - tic6x_pipeline_mpydp, - tic6x_pipeline_mpyspdp, - tic6x_pipeline_mpysp2dp - } tic6x_pipeline_type; - -/* Description of a control register. */ -typedef struct -{ - /* The name of the register. */ - const char *name; - - /* Which ISA variants include this control register. */ - unsigned short isa_variants; - - /* Whether it can be read, written or both (in supervisor mode). - Some registers use the same address, but different names, for - reading and writing. */ - tic6x_rw rw; - - /* crlo value for this register. */ - unsigned int crlo; - - /* Mask that, ANDed with the crhi value in the instruction, must be - 0. 0 is always generated when generating code. */ - unsigned int crhi_mask; -} tic6x_ctrl; - -/* An index into the table of control registers. */ -typedef enum - { -#define CTRL(name, isa, rw, crlo, crhi_mask) \ - CONCAT2(tic6x_ctrl_,name), -#include "tic6x-control-registers.h" -#undef CTRL - tic6x_ctrl_max - } tic6x_ctrl_id; - -/* The table itself. */ -extern const tic6x_ctrl tic6x_ctrl_table[tic6x_ctrl_max]; - -/* An entry in the opcode table. */ -typedef struct -{ - /* The name of the instruction. */ - const char *name; - - /* Functional unit used by this instruction (basic information). */ - tic6x_func_unit_base func_unit; - - /* The format of this instruction. */ - tic6x_insn_format_id format; - - /* The pipeline type of this instruction. */ - tic6x_pipeline_type type; - - /* Which ISA variants include this instruction. */ - unsigned short isa_variants; - - /* Flags for this instruction. */ - unsigned short flags; - - /* Number of fixed fields, or fields with restricted value ranges, - for this instruction. */ - unsigned int num_fixed_fields; - - /* Values of fields fixed for this instruction. */ - tic6x_fixed_field fixed_fields[TIC6X_MAX_FIXED_FIELDS]; - - /* The number of operands in the source form of this - instruction. */ - unsigned int num_operands; - - /* Information about individual operands. */ - tic6x_operand_info operand_info[TIC6X_MAX_OPERANDS]; - - /* The number of variable fields for this instruction with encoding - instructions explicitly given. */ - unsigned int num_variable_fields; - - /* How fields (other than ones with fixed value) are computed from - the source operands and functional unit specifiers. In addition - to fields specified here: - - - creg, if present, is set from the predicate, along with z which - must be present if creg is present. - - - p, if present (on all non-compact instructions), is set from - the parallel bars. - */ - tic6x_coding_field variable_fields[TIC6X_MAX_VAR_FIELDS]; -} tic6x_opcode; - -/* An index into the table of opcodes. */ -typedef enum - { -#define INSN(name, func_unit, format, type, isa, flags, fixed, ops, var) \ - CONCAT6(tic6x_opcode_,name,_,func_unit,_,format), -#define INSNE(name, e, func_unit, format, type, isa, flags, fixed, ops, var) \ - CONCAT4(tic6x_opcode_,name,_,e), -#include "tic6x-opcode-table.h" -#undef INSN -#undef INSNE - tic6x_opcode_max - } tic6x_opcode_id; - -/* The table itself. */ -extern const tic6x_opcode tic6x_opcode_table[tic6x_opcode_max]; - -/* A linked list of opcodes. */ -typedef struct tic6x_opcode_list_tag -{ - tic6x_opcode_id id; - struct tic6x_opcode_list_tag *next; -} tic6x_opcode_list; - -/* The information from a fetch packet header. */ -typedef struct -{ - /* The header itself. */ - unsigned int header; - - /* Whether each word uses compact instructions. */ - bfd_boolean word_compact[7]; - - /* Whether loads are protected. */ - bfd_boolean prot; - - /* Whether instructions use the high register set. */ - bfd_boolean rs; - - /* Data size. */ - unsigned int dsz; - - /* Whether compact instructions in the S unit are decoded as - branches. */ - bfd_boolean br; - - /* Whether compact instructions saturate. */ - bfd_boolean sat; - - /* P-bits. */ - bfd_boolean p_bits[14]; -} tic6x_fetch_packet_header; - -#endif /* OPCODE_TIC6X_H */ |