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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [opcodes/] [tilepro-opc.c] - Diff between revs 148 and 158

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

Rev 148 Rev 158
Line 10101... Line 10101...
 
 
const struct tilepro_opcode *
const struct tilepro_opcode *
find_opcode (tilepro_bundle_bits bits, tilepro_pipeline pipe)
find_opcode (tilepro_bundle_bits bits, tilepro_pipeline pipe)
{
{
  const unsigned short *table = tilepro_bundle_decoder_fsms[pipe];
  const unsigned short *table = tilepro_bundle_decoder_fsms[pipe];
  int index = 0;
  int i = 0;
 
 
  while (1)
  while (1)
    {
    {
      unsigned short bitspec = table[index];
      unsigned short bitspec = table[i];
      unsigned int bitfield =
      unsigned int bitfield =
        ((unsigned int) (bits >> (bitspec & 63))) & (bitspec >> 6);
        ((unsigned int) (bits >> (bitspec & 63))) & (bitspec >> 6);
      unsigned short next = table[index + 1 + bitfield];
      unsigned short next = table[i + 1 + bitfield];
 
 
      if (next <= TILEPRO_OPC_NONE)
      if (next <= TILEPRO_OPC_NONE)
        return &tilepro_opcodes[next];
        return &tilepro_opcodes[next];
 
 
      index = next - TILEPRO_OPC_NONE;
      i = next - TILEPRO_OPC_NONE;
    }
    }
}
}
 
 
 
 
int
int

powered by: WebSVN 2.1.0

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