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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_36/] [insight/] [opcodes/] [or32.c] - Diff between revs 1341 and 1342

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

Rev 1341 Rev 1342
Line 18... Line 18...
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 
/*
/*
 * $Log: not supported by cvs2svn $
 * $Log: not supported by cvs2svn $
 
 * Revision 1.38  2005/01/27 13:15:50  nogj
 
 * Mark wich operand is the destination operand in the architechture definition
 
 *
 * Revision 1.37  2005/01/11 15:41:58  andreje
 * Revision 1.37  2005/01/11 15:41:58  andreje
 * l.ff1 instruction added
 * l.ff1 instruction added
 *
 *
 * Revision 1.36  2004/07/22 20:17:23  phoenix
 * Revision 1.36  2004/07/22 20:17:23  phoenix
 * removed includes
 * removed includes
Line 41... Line 44...
 * Revision 1.30  2003/01/28 03:49:24  lampret
 * Revision 1.30  2003/01/28 03:49:24  lampret
 * Added cvs log keywords
 * Added cvs log keywords
 *
 *
 */
 */
 
 
/* We treat all letters the same in encode/decode routines so
 
   we need to assign some characteristics to them like signess etc.*/
 
#include <string.h>
#include <string.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <ctype.h>
#include <ctype.h>
 
 
 
 
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include "config.h"
# include "config.h"
#endif
#endif
 
#ifdef HAS_EXECUTION
 
# include "abstract.h" /* To get struct iqueue_entry */
 
#endif
#include "opcode/or32.h"
#include "opcode/or32.h"
 
 
/* **INDENT-OFF** */
/* **INDENT-OFF** */
 
 
 
/* We treat all letters the same in encode/decode routines so
 
   we need to assign some characteristics to them like signess etc.*/
CONST struct or32_letter or32_letters[] =
CONST struct or32_letter or32_letters[] =
{
{
{ 'A', NUM_UNSIGNED },
{ 'A', NUM_UNSIGNED },
{ 'B', NUM_UNSIGNED },
{ 'B', NUM_UNSIGNED },
{ 'D', NUM_UNSIGNED },
{ 'D', NUM_UNSIGNED },
Line 448... Line 454...
    return or32_opcodes[index].name;
    return or32_opcodes[index].name;
  else
  else
    return "???";
    return "???";
}
}
 
 
 
#if defined(HAS_EXECUTION) && SIMPLE_EXECUTION
 
void
 
l_none(struct iqueue_entry *current)
 
{
 
}
 
#else
void
void
l_none()
l_none()
{
{
}
}
 
#endif
 
 
/*** Finite automata for instruction decoding building code ***/
/*** Finite automata for instruction decoding building code ***/
 
 
/* Find symbols in encoding.  */
/* Find symbols in encoding.  */
unsigned long
unsigned long
Line 492... Line 505...
  return ret;
  return ret;
}
}
 
 
#define MAX_AUTOMATA_SIZE (1200)
#define MAX_AUTOMATA_SIZE (1200)
#define MAX_OP_TABLE_SIZE (1200)
#define MAX_OP_TABLE_SIZE (1200)
#define LEAF_FLAG         (0x80000000)
 
#define MAX_LEN           (8)
#define MAX_LEN           (8)
 
 
#ifndef MIN
#ifndef MIN
# define MIN(x,y)          ((x) < (y) ? (x) : (y))
# define MIN(x,y)          ((x) < (y) ? (x) : (y))
#endif
#endif
Line 504... Line 516...
unsigned long *automata;
unsigned long *automata;
int nuncovered;
int nuncovered;
int curpass = 0;
int curpass = 0;
 
 
/* MM: Struct that holds runtime build information about instructions.  */
/* MM: Struct that holds runtime build information about instructions.  */
struct temp_insn_struct
struct temp_insn_struct *ti;
{
 
  unsigned long insn;
 
  unsigned long insn_mask;
 
  int in_pass;
 
} *ti;
 
 
 
struct insn_op_struct *op_data, **op_start;
struct insn_op_struct *op_data, **op_start;
 
 
/* Recursive utility function used to find best match and to build automata.  */
/* Recursive utility function used to find best match and to build automata.  */
 
 

powered by: WebSVN 2.1.0

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