2 /* External functions, constants and defines for itbl support */
6 /* Defaults for definitions required by generic code */
7 #ifndef ITBL_NUMBER_OF_PROCESSORS
8 #define ITBL_NUMBER_OF_PROCESSORS 1
11 #ifndef ITBL_MAX_BITPOS
12 #define ITBL_MAX_BITPOS 31
16 #define ITBL_TYPE unsigned long
20 #define ITBL_IS_INSN(insn) 1
23 #ifndef ITBL_DECODE_PNUM
24 #define ITBL_DECODE_PNUM(insn) 0
27 #ifndef ITBL_ENCODE_PNUM
28 #define ITBL_ENCODE_PNUM(pnum) 0
31 typedef ITBL_TYPE t_insn;
33 /* types of entries */
42 e_nregtypes = e_greg+1,
45 e_invtype /* invalid type */
51 e_nprocs=NUMBER_OF_PROCESSORS,
52 e_invproc /* invalid processor */
55 /* These routines are visible to the main part of the assembler */
57 int itbl_parse(char* insntbl);
59 char *itbl_get_field(char **s);
60 unsigned long itbl_assemble(char *name, char *operands);
61 int itbl_disassemble(char *str, unsigned long insn);
62 int itbl_parse(char *tbl); /* parses insn tbl */
63 unsigned long itbl_get_reg_val(char *name);
64 unsigned long itbl_get_val(e_processor processor, e_type type, char *name);
65 char *itbl_get_name(e_processor processor, e_type type, unsigned long val);
67 /* These routines are called by the table parser used to build the
68 * dynamic list of new processor instructions and registers. */
70 struct itbl_entry *itbl_add_reg(int yyproc, int yytype, char *regname, int regnum);
71 struct itbl_entry *itbl_add_insn(int yyproc, char *name, unsigned long value,
72 int sbit, int ebit, unsigned long flags);
73 struct itbl_field *itbl_add_operand(struct itbl_entry *e, int yytype,
74 int sbit, int ebit, unsigned long flags);