2
Copyright 1997, 1999, 2000, 2003, 2005, 2006, 2007
3
Free Software Foundation, Inc.
5
This file is part of GAS, the GNU Assembler.
7
GAS is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 3, or (at your option)
12
GAS is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with GAS; see the file COPYING. If not, write to the Free
19
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
22
/* External functions, constants and defines for itbl support */
28
/* Defaults for definitions required by generic code */
29
#ifndef ITBL_NUMBER_OF_PROCESSORS
30
#define ITBL_NUMBER_OF_PROCESSORS 1
33
#ifndef ITBL_MAX_BITPOS
34
#define ITBL_MAX_BITPOS 31
38
#define ITBL_TYPE unsigned long
42
#define ITBL_IS_INSN(insn) 1
45
#ifndef ITBL_DECODE_PNUM
46
#define ITBL_DECODE_PNUM(insn) 0
49
#ifndef ITBL_ENCODE_PNUM
50
#define ITBL_ENCODE_PNUM(pnum) 0
53
typedef ITBL_TYPE t_insn;
55
/* types of entries */
64
e_nregtypes = e_greg + 1,
67
e_invtype /* invalid type */
73
e_nprocs = ITBL_NUMBER_OF_PROCESSORS,
74
e_invproc /* invalid processor */
77
/* 0 means an instruction table was not specified. */
78
extern int itbl_have_entries;
80
/* These routines are visible to the main part of the assembler */
82
int itbl_parse (char *insntbl);
83
void itbl_init (void);
84
char *itbl_get_field (char **s);
85
unsigned long itbl_assemble (char *name, char *operands);
86
int itbl_disassemble (char *str, unsigned long insn);
87
int itbl_parse (char *tbl); /* parses insn tbl */
88
int itbl_get_reg_val (char *name, unsigned long *pval);
89
int itbl_get_val (e_processor processor, e_type type, char *name,
91
char *itbl_get_name (e_processor processor, e_type type, unsigned long val);
93
/* These routines are called by the table parser used to build the
94
dynamic list of new processor instructions and registers. */
96
struct itbl_entry *itbl_add_reg (int yyproc, int yytype,
97
char *regname, int regnum);
98
struct itbl_entry *itbl_add_insn (int yyproc, char *name,
99
unsigned long value, int sbit, int ebit, unsigned long flags);
100
struct itbl_field *itbl_add_operand (struct itbl_entry * e, int yytype,
101
int sbit, int ebit, unsigned long flags);