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

Subversion Repositories or1k

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

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

Rev 1295 Rev 1308
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.34  2004/06/27 22:56:48  lampret
 
 * Updated instruction set descriptions. Changed FP instructions encoding.
 
 *
 * Revision 1.33  2004/05/09 19:52:31  lampret
 * Revision 1.33  2004/05/09 19:52:31  lampret
 * Changed desciption of the l.cust5 insns
 * Changed desciption of the l.cust5 insns
 *
 *
 * Revision 1.31  2003/07/01 19:34:49  csanchez
 * Revision 1.31  2003/07/01 19:34:49  csanchez
 * Added support for l.addc instruction.
 * Added support for l.addc instruction.
Line 40... Line 43...
 
 
 
 
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include "config.h"
# include "config.h"
#endif
#endif
 
#include "abstract.h"
#include "opcode/or32.h"
#include "opcode/or32.h"
 
#include "debug.h"
 
 
/* **INDENT-OFF** */
/* **INDENT-OFF** */
 
 
CONST struct or32_letter or32_letters[] =
CONST struct or32_letter or32_letters[] =
{
{
Line 399... Line 404...
  CONST struct or32_opcode *pinsn;
  CONST struct or32_opcode *pinsn;
  char *enc;
  char *enc;
  int range = 0;
  int range = 0;
 
 
  /* Is value cached? */
  /* Is value cached? */
  if (range = range_cache[(unsigned char)l]) return range;
  if ((range = range_cache[(unsigned char)l])) return range;
 
 
  for(pinsn = or32_opcodes; strlen(pinsn->name); pinsn++)
  for(pinsn = or32_opcodes; strlen(pinsn->name); pinsn++)
    {
    {
      if (strchr(pinsn->encoding,l))
      if (strchr(pinsn->encoding,l))
        {
        {
Line 981... Line 986...
 
 
int
int
disassemble_insn (insn)
disassemble_insn (insn)
     unsigned long insn;
     unsigned long insn;
{
{
  int index;
 
  return disassemble_index (insn, insn_decode (insn));
  return disassemble_index (insn, insn_decode (insn));
}
}
 
 
/* Disassemble one instruction from insn index.
/* Disassemble one instruction from insn index.
   Return the size of the instruction.  */
   Return the size of the instruction.  */
Line 1028... Line 1032...
        }
        }
    }
    }
  else
  else
    {
    {
      /* This used to be %8x for binutils.  */
      /* This used to be %8x for binutils.  */
      sprintf(dest, ".word 0x%08x", insn);
      sprintf(dest, ".word 0x%08lx", insn);
      while (*dest) dest++;
      while (*dest) dest++;
    }
    }
  return insn_len (insn);
  return insn_len (insn);
}
}
 
 
 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.