Line 1... |
Line 1... |
/* Table of opcodes for the OpenRISC 1000 ISA.
|
/* Table of opcodes for the OpenRISC 1000 ISA.
|
|
|
Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
|
Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
|
|
Copyright (C) 2008 Embecosm Limited
|
|
|
Contributed by Damjan Lampret (lampret@opencores.org).
|
Contributed by Damjan Lampret (lampret@opencores.org).
|
|
Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
|
|
|
|
This file is part of Or1ksim, the OpenRISC 1000 Architectural Simulator.
|
|
This file is also part of or1k_gen_isa, GDB and GAS.
|
|
|
This file is part of or1k_gen_isa, or1ksim, GDB and GAS.
|
This program 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 3 of the License, or (at your option)
|
|
any later version.
|
|
|
|
This program 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.
|
|
|
This program is free software; you can redistribute it and/or modify
|
You should have received a copy of the GNU General Public License along
|
it under the terms of the GNU General Public License as published by
|
with this program. If not, see <http://www.gnu.org/licenses/>. */
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
/* This program is commented throughout in a fashion suitable for processing
|
|
with Doxygen. */
|
This program 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 this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|
|
|
/* We treat all letters the same in encode/decode routines so
|
/* We treat all letters the same in encode/decode routines so
|
we need to assign some characteristics to them like signess etc.*/
|
we need to assign some characteristics to them like signess etc.*/
|
|
|
#ifndef OR32_H_ISA
|
#ifndef OR32_H_ISA
|
Line 43... |
Line 50... |
|
|
#define OR32_IF_DELAY (1)
|
#define OR32_IF_DELAY (1)
|
#define OR32_W_FLAG (2)
|
#define OR32_W_FLAG (2)
|
#define OR32_R_FLAG (4)
|
#define OR32_R_FLAG (4)
|
|
|
#if defined(HAS_EXECUTION)
|
#if defined(HAVE_EXECUTION)
|
# if SIMPLE_EXECUTION
|
# if SIMPLE_EXECUTION
|
# include "simpl32_defs.h"
|
# include "simpl32_defs.h"
|
# elif DYNAMIC_EXECUTION
|
# elif DYNAMIC_EXECUTION
|
# include "dyn32_defs.h"
|
# include "dyn32_defs.h"
|
# else
|
# else
|
Line 102... |
Line 109... |
char *args;
|
char *args;
|
|
|
/* Opcode and operand encoding. */
|
/* Opcode and operand encoding. */
|
char *encoding;
|
char *encoding;
|
|
|
#ifdef HAS_EXECUTION
|
#ifdef HAVE_EXECUTION
|
# if COMPLEX_EXECUTION
|
# if COMPLEX_EXECUTION
|
char *function_name;
|
char *function_name;
|
# elif SIMPLE_EXECUTION
|
# elif SIMPLE_EXECUTION
|
void (*exec)(struct iqueue_entry *);
|
void (*exec)(struct iqueue_entry *);
|
# else /* DYNAMIC_EXECUTION */
|
# else /* DYNAMIC_EXECUTION */
|
void (*exec)(struct op_queue *opq, int param_t[3], int);
|
void (*exec)(struct op_queue *opq, int param_t[3], int);
|
# endif
|
# endif
|
#else /* HAS_EXECUTION */
|
#else /* HAVE_EXECUTION */
|
void (*exec)(void);
|
void (*exec)(void);
|
#endif
|
#endif
|
|
|
unsigned int flags;
|
unsigned int flags;
|
enum insn_type func_unit;
|
enum insn_type func_unit;
|
Line 161... |
Line 168... |
|
|
extern CONST struct or32_opcode or32_opcodes[];
|
extern CONST struct or32_opcode or32_opcodes[];
|
|
|
extern CONST int num_opcodes;
|
extern CONST int num_opcodes;
|
|
|
|
extern char *disassembled;
|
|
|
/* Calculates instruction length in bytes. Always 4 for OR32. */
|
/* Calculates instruction length in bytes. Always 4 for OR32. */
|
extern int insn_len PARAMS((int insn_index));
|
extern int insn_len PARAMS((int insn_index));
|
|
|
/* Is individual insn's operand signed or unsigned? */
|
/* Is individual insn's operand signed or unsigned? */
|
extern int letter_signed PARAMS((char l));
|
extern int letter_signed PARAMS((char l));
|