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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_69/] [gdb-5.0/] [include/] [opcode/] [or32.h] - Diff between revs 133 and 138

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

Rev 133 Rev 138
Line 22... Line 22...
   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
#define OR32_H_ISA
#define OR32_H_ISA
 
 
#define NUM_UNSIGNED 0
#define NUM_UNSIGNED (0)
#define NUM_SIGNED 1
#define NUM_SIGNED (1)
 
 
#ifndef PARAMS
#ifndef PARAMS
#define PARAMS(x) x
#define PARAMS(x) x
#endif
#endif
 
 
#ifndef CONST
#ifndef CONST
#define CONST const
#define CONST const
#endif
#endif
 
 
 
#define MAX_GPRS 32
 
#define PAGE_SIZE 4096
 
#undef __HALF_WORD_INSN__
 
 
 
#define OPERAND_DELIM (',')
 
 
 
#define OR32_IF_DELAY (1)
 
#define OR32_W_FLAG   (2)
 
#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.  */
#define OR32_IF_DELAY 1
 
 
 
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.
Line 67... Line 75...
  char *encoding;
  char *encoding;
  void (*exec)();
  void (*exec)();
  unsigned int flags;
  unsigned int flags;
};
};
 
 
 
#define OPTYPE_LAST (0x80000000)
 
#define OPTYPE_OP   (0x40000000)
 
#define OPTYPE_REG  (0x20000000)
 
#define OPTYPE_SIG  (0x10000000)
 
#define OPTYPE_DIS  (0x08000000)
 
#define OPTYPE_DST  (0x04000000)
 
#define OPTYPE_SBIT (0x00001F00)
 
#define OPTYPE_SHR  (0x0000001F)
 
#define OPTYPE_SBIT_SHR (8)
 
 
 
/* MM: Data how to decode operands.  */
 
extern struct insn_op_struct {
 
  unsigned long type;
 
  unsigned long data;
 
} **op_start;
 
 
#ifdef HAS_EXECUTION
#ifdef HAS_EXECUTION
extern void l_invalid PARAMS((void));
extern void l_invalid PARAMS((void));
extern void l_sfne PARAMS((void));
extern void l_sfne PARAMS((void));
extern void l_bf PARAMS((void));
extern void l_bf PARAMS((void));
extern void l_add PARAMS((void));
extern void l_add PARAMS((void));
Line 134... Line 158...
 
 
/* Number of letters in the individual lettered operand. */
/* Number of letters in the individual lettered operand. */
extern int letter_range PARAMS((char l));
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 (char *insn);
extern int insn_index PARAMS((char *insn));
 
 
 
/* MM: Returns instruction name from index.  */
 
extern CONST char *insn_name PARAMS ((int index));
 
 
 
/* MM: Constructs new FSM, based on or32_opcodes.  */
 
extern void build_automata PARAMS ((void));
 
 
 
/* MM: Destructs FSM.  */
 
extern void destruct_automata PARAMS ((void));
 
 
 
/* MM: Decodes instruction using FSM.  Call build_automata first.  */
 
extern int insn_decode PARAMS((unsigned int insn));
 
 
extern CONST char *insn_name (int index);
 
#endif
#endif
 
 
 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.