forked from Imagelibrary/binutils-gdb
* itbl-parse.y: Fix indentation mistakes from indent program.
* itbl-lex.l: Fix indentation mistakes from indent program.
* itbl-ops.h: Add include for ansidecl.h.
Add PARAMS around function arguments.
Add declaration for itbl_have_entries.
* itbl-ops.c: Add PARAMS around function arguments.
* Makefile.in: Add itbl build rules.
Add dependancies for itbl files to mips target.
* as.c: Add itbl support.
Add new option "--insttbl" for dynamically extending instruction set.
* as.h: Declare insttbl_file_name;
the name of file defining extensions to the basic instruction set
* configure.in, configure: Add itbl-parse.o, itbl-lex.o, and
itbl-ops.o to extra_objects for mips configuration.
Add include file link from itbl-cpu.h to
config/itbl-${target_cpu_type}.h.
* config/tc-mips.c: Allow copz instructions.
Add notes for future additions to the itbl support.
Add debug macros.
(macro): Call itbl_assemble to assemble itbl instructions.
See if an unknown register is specified in an itbl entry.
This commit is contained in:
@@ -1,18 +1,40 @@
|
||||
|
||||
/* itbl-ops.h
|
||||
|
||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
GAS 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 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GAS 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 GAS; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA. */
|
||||
|
||||
/* External functions, constants and defines for itbl support */
|
||||
|
||||
#include "ansidecl.h"
|
||||
#include "itbl-cpu.h"
|
||||
|
||||
/* Defaults for definitions required by generic code */
|
||||
/* Defaults for definitions required by generic code */
|
||||
#ifndef ITBL_NUMBER_OF_PROCESSORS
|
||||
#define ITBL_NUMBER_OF_PROCESSORS 1
|
||||
#endif
|
||||
|
||||
#ifndef ITBL_MAX_BITPOS
|
||||
#ifndef ITBL_MAX_BITPOS
|
||||
#define ITBL_MAX_BITPOS 31
|
||||
#endif
|
||||
|
||||
#ifndef ITBL_TYPE
|
||||
#ifndef ITBL_TYPE
|
||||
#define ITBL_TYPE unsigned long
|
||||
#endif
|
||||
|
||||
@@ -31,45 +53,50 @@
|
||||
typedef ITBL_TYPE t_insn;
|
||||
|
||||
/* types of entries */
|
||||
typedef enum
|
||||
{
|
||||
typedef enum
|
||||
{
|
||||
e_insn,
|
||||
e_dreg,
|
||||
e_regtype0 = e_dreg,
|
||||
e_regtype0 = e_dreg,
|
||||
e_creg,
|
||||
e_greg,
|
||||
e_addr,
|
||||
e_nregtypes = e_greg+1,
|
||||
e_nregtypes = e_greg + 1,
|
||||
e_immed,
|
||||
e_ntypes,
|
||||
e_invtype /* invalid type */
|
||||
} e_type;
|
||||
e_invtype /* invalid type */
|
||||
} e_type;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
typedef enum
|
||||
{
|
||||
e_p0,
|
||||
e_nprocs=NUMBER_OF_PROCESSORS,
|
||||
e_invproc /* invalid processor */
|
||||
} e_processor;
|
||||
e_nprocs = NUMBER_OF_PROCESSORS,
|
||||
e_invproc /* invalid processor */
|
||||
} e_processor;
|
||||
|
||||
/* 0 means an instruction table was not specified. */
|
||||
extern int itbl_have_entries;
|
||||
|
||||
/* These routines are visible to the main part of the assembler */
|
||||
|
||||
int itbl_parse(char* insntbl);
|
||||
void itbl_init(void);
|
||||
char *itbl_get_field(char **s);
|
||||
unsigned long itbl_assemble(char *name, char *operands);
|
||||
int itbl_disassemble(char *str, unsigned long insn);
|
||||
int itbl_parse(char *tbl); /* parses insn tbl */
|
||||
unsigned long itbl_get_reg_val(char *name);
|
||||
unsigned long itbl_get_val(e_processor processor, e_type type, char *name);
|
||||
char *itbl_get_name(e_processor processor, e_type type, unsigned long val);
|
||||
int itbl_parse PARAMS ((char *insntbl));
|
||||
void itbl_init PARAMS ((void));
|
||||
char *itbl_get_field PARAMS ((char **s));
|
||||
unsigned long itbl_assemble PARAMS ((char *name, char *operands));
|
||||
int itbl_disassemble PARAMS ((char *str, unsigned long insn));
|
||||
int itbl_parse PARAMS ((char *tbl)); /* parses insn tbl */
|
||||
unsigned long itbl_get_reg_val PARAMS ((char *name));
|
||||
unsigned long itbl_get_val PARAMS ((e_processor processor, e_type type,
|
||||
char *name));
|
||||
char *itbl_get_name PARAMS ((e_processor processor, e_type type,
|
||||
unsigned long val));
|
||||
|
||||
/* These routines are called by the table parser used to build the
|
||||
* dynamic list of new processor instructions and registers. */
|
||||
|
||||
struct itbl_entry *itbl_add_reg(int yyproc, int yytype, char *regname, int regnum);
|
||||
struct itbl_entry *itbl_add_insn(int yyproc, char *name, unsigned long value,
|
||||
int sbit, int ebit, unsigned long flags);
|
||||
struct itbl_field *itbl_add_operand(struct itbl_entry *e, int yytype,
|
||||
int sbit, int ebit, unsigned long flags);
|
||||
/* These routines are called by the table parser used to build the
|
||||
dynamic list of new processor instructions and registers. */
|
||||
|
||||
struct itbl_entry *itbl_add_reg PARAMS ((int yyproc, int yytype,
|
||||
char *regname, int regnum));
|
||||
struct itbl_entry *itbl_add_insn PARAMS ((int yyproc, char *name,
|
||||
unsigned long value, int sbit, int ebit, unsigned long flags));
|
||||
struct itbl_field *itbl_add_operand PARAMS ((struct itbl_entry * e, int yytype,
|
||||
int sbit, int ebit, unsigned long flags));
|
||||
|
||||
Reference in New Issue
Block a user