OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable_0_2_0_rc1/] [gdb-5.0/] [opcodes/] [or32.h] - Diff between revs 662 and 676

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 662 Rev 676
Line 1... Line 1...
/* Table of opcodes for the OpenRISC 1000 ISA.
/* Table of opcodes for the OpenRISC 1000 ISA.
   Copyright 2002 Free Software Foundation, Inc.
   Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
   Contributed by Damjan Lampret (lampret@opencores.org).
   Contributed by Damjan Lampret (lampret@opencores.org).
 
 
   This file is part of or1k_gen_isa, or1ksim, 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
   This program is free software; you can redistribute it and/or modify
Line 43... Line 43...
 
 
#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)
 
 
struct or32_letter
struct or32_letter {
{
 
  char letter;
  char letter;
  int  sign;
  int  sign;
  /* int  reloc; relocation per letter ??  */
  /* int  reloc; relocation per letter ??  */
};
};
 
 
/* Main instruction specification array.  */
/* Main instruction specification array.  */
struct or32_opcode
struct or32_opcode {
{
 
  /* Name of the instruction.  */
  /* Name of the instruction.  */
  char *name;
  char *name;
 
 
  /* A string of characters which describe the operands.
  /* A string of characters which describe the operands.
     Valid characters are:
     Valid characters are:
Line 68... Line 66...
     J   An immediate operand, range . (unused)
     J   An immediate operand, range . (unused)
     K   An immediate operand, range 0 to 65535.
     K   An immediate operand, range 0 to 65535.
     L   An immediate operand, range 0 to 63.
     L   An immediate operand, range 0 to 63.
     M   An immediate operand, range . (unused)
     M   An immediate operand, range . (unused)
     N   An immediate operand, range -33554432 to 33554431.
     N   An immediate operand, range -33554432 to 33554431.
     O   An immediate operand, range . (unused).  */
     O   An immediate operand, range . (unused) */
  char *args;
  char *args;
 
 
  /* Opcode and operand encoding.  */
  /* Opcode and operand encoding.  */
  char *encoding;
  char *encoding;
  void (*exec) PARAMS ((void));
  void (*exec)();
  unsigned int flags;
  unsigned int flags;
};
};
 
 
#define OPTYPE_LAST (0x80000000)
#define OPTYPE_LAST (0x80000000)
#define OPTYPE_OP   (0x40000000)
#define OPTYPE_OP   (0x40000000)
Line 88... Line 86...
#define OPTYPE_SBIT (0x00001F00)
#define OPTYPE_SBIT (0x00001F00)
#define OPTYPE_SHR  (0x0000001F)
#define OPTYPE_SHR  (0x0000001F)
#define OPTYPE_SBIT_SHR (8)
#define OPTYPE_SBIT_SHR (8)
 
 
/* MM: Data how to decode operands.  */
/* MM: Data how to decode operands.  */
extern struct insn_op_struct
extern struct insn_op_struct {
{
 
  unsigned long type;
  unsigned long type;
  unsigned long data;
  unsigned long data;
} **op_start;
} **op_start;
 
 
#ifdef HAS_EXECUTION
#ifdef HAS_EXECUTION
Line 134... Line 131...
extern void l_sfles   PARAMS ((void));
extern void l_sfles   PARAMS ((void));
extern void l_sfgtu   PARAMS ((void));
extern void l_sfgtu   PARAMS ((void));
extern void l_sfgeu   PARAMS ((void));
extern void l_sfgeu   PARAMS ((void));
extern void l_sfltu   PARAMS ((void));
extern void l_sfltu   PARAMS ((void));
extern void l_sfleu   PARAMS ((void));
extern void l_sfleu   PARAMS ((void));
 
extern void l_extbs PARAMS((void));
 
extern void l_extbz PARAMS((void));
 
extern void l_exths PARAMS((void));
 
extern void l_exthz PARAMS((void));
 
extern void l_extws PARAMS((void));
 
extern void l_extwz PARAMS((void));
extern void l_mtspr   PARAMS ((void));
extern void l_mtspr   PARAMS ((void));
extern void l_mfspr   PARAMS ((void));
extern void l_mfspr   PARAMS ((void));
extern void l_sys     PARAMS ((void));
extern void l_sys     PARAMS ((void));
extern void l_trap    PARAMS ((void)); /* CZ 21/06/01.  */
extern void l_trap PARAMS((void)); /* CZ 21/06/01 */
extern void l_macrc   PARAMS ((void));
extern void l_macrc   PARAMS ((void));
extern void l_mac     PARAMS ((void));
extern void l_mac     PARAMS ((void));
extern void l_msb     PARAMS ((void));
extern void l_msb     PARAMS ((void));
extern void l_invalid PARAMS ((void));
extern void l_invalid PARAMS ((void));
 
extern void l_cmov PARAMS ((void));
extern void l_cust1   PARAMS ((void));
extern void l_cust1   PARAMS ((void));
extern void l_cust2   PARAMS ((void));
extern void l_cust2   PARAMS ((void));
extern void l_cust3   PARAMS ((void));
extern void l_cust3   PARAMS ((void));
extern void l_cust4   PARAMS ((void));
extern void l_cust4   PARAMS ((void));
#endif
#endif
extern void l_none    PARAMS ((void));
extern void l_none    PARAMS ((void));
 
 
extern const struct or32_letter or32_letters[];
extern CONST struct or32_letter or32_letters[];
 
 
extern const struct  or32_opcode or32_opcodes[];
extern CONST struct  or32_opcode or32_opcodes[];
 
 
extern const unsigned int or32_num_opcodes;
extern CONST int num_opcodes;
 
 
/* Calculates instruction length in bytes.  Always 4 for OR32.  */
/* Calculates instruction length in bytes.  Always 4 for OR32.  */
extern int insn_len PARAMS ((int));
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));
extern int letter_signed PARAMS((char l));
 
 
/* Number of letters in the individual lettered operand.  */
/* Number of letters in the individual lettered operand.  */
extern int letter_range PARAMS ((char));
extern int letter_range PARAMS((char l));
 
 
/* MM: Returns index of given instruction name.  */
/* MM: Returns index of given instruction name.  */
extern int insn_index PARAMS ((char *));
extern int insn_index PARAMS((char *insn));
 
 
/* MM: Returns instruction name from index.  */
/* MM: Returns instruction name from index.  */
extern const char *insn_name PARAMS ((int));
extern CONST char *insn_name PARAMS ((int index));
 
 
/* MM: Constructs new FSM, based on or32_opcodes.  */
/* MM: Constructs new FSM, based on or32_opcodes.  */
extern void build_automata PARAMS ((void));
extern void build_automata PARAMS ((void));
 
 
/* MM: Destructs FSM.  */
/* MM: Destructs FSM.  */
extern void destruct_automata PARAMS ((void));
extern void destruct_automata PARAMS ((void));
 
 
/* MM: Decodes instruction using FSM.  Call build_automata first.  */
/* MM: Decodes instruction using FSM.  Call build_automata first.  */
extern int insn_decode PARAMS ((unsigned int));
extern int insn_decode PARAMS((unsigned int insn));
 
 
/* Disassemble one instruction from insn to disassemble.
/* Disassemble one instruction from insn to disassemble.
   Return the size of the instruction.  */
   Return the size of the instruction.  */
int disassemble_insn PARAMS ((unsigned long));
int disassemble_insn (unsigned long insn);
 
 
#endif
#endif
 
 
 No newline at end of file
 No newline at end of file
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.