diff options
author | obrien <obrien@FreeBSD.org> | 2002-01-27 12:00:11 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-01-27 12:00:11 +0000 |
commit | fc89183cdc6be5afa8deb7250fd15a20832ab528 (patch) | |
tree | 5c493199a70976c54e1b9c6a7804a3de85b43e84 /contrib/binutils/include/opcode/cgen.h | |
parent | 94820fd8060f6f43089d1a3ddb8a482402e7e494 (diff) | |
download | FreeBSD-src-fc89183cdc6be5afa8deb7250fd15a20832ab528.zip FreeBSD-src-fc89183cdc6be5afa8deb7250fd15a20832ab528.tar.gz |
Enlist the FreeBSD-CURRENT users as testers of what is to become Binutils
version 2.12.0. These bits are taken from the FSF anoncvs repo on
27-January-2002 03:41 PST.
Diffstat (limited to 'contrib/binutils/include/opcode/cgen.h')
-rw-r--r-- | contrib/binutils/include/opcode/cgen.h | 57 |
1 files changed, 48 insertions, 9 deletions
diff --git a/contrib/binutils/include/opcode/cgen.h b/contrib/binutils/include/opcode/cgen.h index 8cf3123..e603b55 100644 --- a/contrib/binutils/include/opcode/cgen.h +++ b/contrib/binutils/include/opcode/cgen.h @@ -199,6 +199,8 @@ typedef struct { const char *bfd_name; /* one of enum mach_attr */ int num; + /* parameter from mach->cpu */ + unsigned int insn_chunk_bitsize; } CGEN_MACH; /* Parse result (also extraction result). @@ -513,6 +515,11 @@ typedef struct cgen_keyword /* Pointer to null keyword "" entry if present. */ const CGEN_KEYWORD_ENTRY *null_entry; + + /* String containing non-alphanumeric characters used + in keywords. + At present, the highest number of entries used is 1. */ + char nonalpha_chars[8]; } CGEN_KEYWORD; /* Structure used for searching. */ @@ -602,6 +609,23 @@ enum cgen_operand_type { CGEN_OPERAND_MAX }; /* "nil" indicator for the operand instance table */ #define CGEN_OPERAND_NIL CGEN_OPERAND_MAX +/* A tree of these structs represents the multi-ifield + structure of an operand's hw-index value, if it exists. */ + +struct cgen_ifld; + +typedef struct cgen_maybe_multi_ifield +{ + int count; /* 0: indexed by single cgen_ifld (possibly null: dead entry); + n: indexed by array of more cgen_maybe_multi_ifields. */ + union + { + struct cgen_maybe_multi_ifield * multi; + struct cgen_ifld * leaf; + } val; +} +CGEN_MAYBE_MULTI_IFLD; + /* This struct defines each entry in the operand table. */ typedef struct @@ -630,6 +654,11 @@ typedef struct May be unused for a modifier. */ unsigned char length; + /* The (possibly-multi) ifield used as an index for this operand, if it + is indexed by a field at all. This substitutes / extends the start and + length fields above, but unsure at this time whether they are used + anywhere. */ + CGEN_MAYBE_MULTI_IFLD index_fields; #if 0 /* ??? Interesting idea but relocs tend to get too complicated, and ABI dependent, for simple table lookups to work. */ /* Ideally this would be the internal (external?) reloc type. */ @@ -736,25 +765,21 @@ typedef struct the data is recorded in the parse/insert/extract/print switch statements. */ /* This should be at least as large as necessary for any target. */ -#define CGEN_MAX_SYNTAX_BYTES 40 +#define CGEN_MAX_SYNTAX_ELEMENTS 48 /* A target may know its own precise maximum. Assert that it falls below the above limit. */ -#ifdef CGEN_ACTUAL_MAX_SYNTAX_BYTES -#if CGEN_ACTUAL_MAX_SYNTAX_BYTES > CGEN_MAX_SYNTAX_BYTES -#error "CGEN_ACTUAL_MAX_SYNTAX_BYTES too high - enlarge CGEN_MAX_SYNTAX_BYTES" +#ifdef CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS +#if CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS > CGEN_MAX_SYNTAX_ELEMENTS +#error "CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS too high - enlarge CGEN_MAX_SYNTAX_ELEMENTS" #endif #endif -#if !defined(MAX_OPERANDS) || MAX_OPERANDS <= 127 -typedef unsigned char CGEN_SYNTAX_CHAR_TYPE; -#else typedef unsigned short CGEN_SYNTAX_CHAR_TYPE; -#endif typedef struct { - CGEN_SYNTAX_CHAR_TYPE syntax[CGEN_MAX_SYNTAX_BYTES]; + CGEN_SYNTAX_CHAR_TYPE syntax[CGEN_MAX_SYNTAX_ELEMENTS]; } CGEN_SYNTAX; #define CGEN_SYNTAX_STRING(syn) (syn->syntax) @@ -1006,6 +1031,11 @@ struct cgen_insn const CGEN_IBASE *base; const CGEN_OPCODE *opcode; const CGEN_OPINST *opinst; + + /* Regex to disambiguate overloaded opcodes */ + void *rx; +#define CGEN_INSN_RX(insn) ((insn)->rx) +#define CGEN_MAX_RX_ELEMENTS (CGEN_MAX_SYNTAX_ELEMENTS * 5) }; /* Instruction lists. @@ -1165,6 +1195,10 @@ typedef struct cgen_cpu_desc lazily fetch the data from there. */ unsigned int word_bitsize; + /* Instruction chunk size (in bits), for purposes of endianness + conversion. */ + unsigned int insn_chunk_bitsize; + /* Indicator if sizes are unknown. This is used by default_insn_bitsize,base_insn_bitsize if there is a difference between the selected isa's. */ @@ -1357,6 +1391,11 @@ extern void CGEN_SYM (cpu_close) PARAMS ((CGEN_CPU_DESC)); extern void CGEN_SYM (init_opcode_table) PARAMS ((CGEN_CPU_DESC cd_)); +/* build the insn selection regex. + called by init_opcode_table */ + +extern char * CGEN_SYM(build_insn_regex) PARAMS ((CGEN_INSN *insn_)); + /* Initialize the ibld table for use. Called by init_asm/init_dis. */ |