URL
https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk
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
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.