X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fopcode%2Ftic80.h;h=c27c006f21cb0cd03a156002fb35ee67faf24a88;hb=b90efa5b79ac1524ec260f8eb89d1be37e0219a7;hp=0a8392832b5d51edf0217ced58cc9027a4ffc09b;hpb=e98fe4f7b54cbdf29aef9287bbb1bea8801dd05a;p=deliverable%2Fbinutils-gdb.git diff --git a/include/opcode/tic80.h b/include/opcode/tic80.h index 0a8392832b..c27c006f21 100644 --- a/include/opcode/tic80.h +++ b/include/opcode/tic80.h @@ -1,22 +1,23 @@ /* tic80.h -- Header file for TI TMS320C80 (MV) opcode table - Copyright 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996-2015 Free Software Foundation, Inc. Written by Fred Fish (fnf@cygnus.com), Cygnus Support -This file is part of GDB, GAS, and the GNU binutils. + This file is part of GDB, GAS, and the GNU binutils. -GDB, GAS, and the GNU binutils are free software; you can redistribute -them and/or modify them under the terms of the GNU General Public -License as published by the Free Software Foundation; either version -1, or (at your option) any later version. + GDB, GAS, and the GNU binutils are free software; you can redistribute + them and/or modify them under the terms of the GNU General Public + License as published by the Free Software Foundation; either version 3, + or (at your option) any later version. -GDB, GAS, and the GNU binutils are distributed in the hope that they -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. + GDB, GAS, and the GNU binutils are distributed in the hope that they + 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 file; see the file COPYING. If not, write to the Free -Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with this file; see the file COPYING3. If not, write to the Free + Software Foundation, 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ #ifndef TIC80_H #define TIC80_H @@ -90,8 +91,8 @@ struct tic80_operand operand value is legal, *ERRMSG will be unchanged (most operands can accept any value). */ - unsigned long (*insert) PARAMS ((unsigned long instruction, long op, - const char **errmsg)); + unsigned long (*insert) + (unsigned long instruction, long op, const char **errmsg); /* Extraction function. This is used by the disassembler. To extract this operand type from an instruction, check this field. @@ -111,7 +112,7 @@ struct tic80_operand this operand (i.e., the instruction does not match). If the operand is valid, *INVALID will not be changed. */ - long (*extract) PARAMS ((unsigned long instruction, int *invalid)); + long (*extract) (unsigned long instruction, int *invalid); /* One bit syntax flags. */ @@ -233,7 +234,9 @@ extern const struct tic80_operand tic80_operands[]; /* This operand is a bit number, either numeric or symbolic (like "eq.b", "or.f", etc). - The disassembler prints these symbolically. */ + The disassembler prints these symbolically. + Note that they appear in the instruction in 1's complement relative + to the values given in the manual. */ #define TIC80_OPERAND_BITNUM (1 << 31) @@ -260,10 +263,21 @@ struct predefined_symbol int value; }; -extern const struct predefined_symbol tic80_predefined_symbols[]; /* Translation array */ -extern const int tic80_num_predefined_symbols; /* How many members in the array */ +#define PDS_NAME(pdsp) ((pdsp) -> name) +#define PDS_VALUE(pdsp) ((pdsp) -> value) + +/* Translation array. */ +extern const struct predefined_symbol tic80_predefined_symbols[]; +/* How many members in the array. */ +extern const int tic80_num_predefined_symbols; + +/* Translate value to symbolic name. */ +const char *tic80_value_to_symbol (int val, int class); + +/* Translate symbolic name to value. */ +int tic80_symbol_to_value (char *name, int class); -const char *tic80_value_to_symbol PARAMS ((int val, int class)); /* Translate value to symbolic name */ -int tic80_symbol_to_value PARAMS ((char *name, int class)); /* Translate symbolic name to value */ +const struct predefined_symbol *tic80_next_predefined_symbol + (const struct predefined_symbol *); #endif /* TIC80_H */