Skip to content

Commit

Permalink
Minor fix to decoding extended opcode 30 on PPC
Browse files Browse the repository at this point in the history
On PPC, the extended opcode of table 30 is decoded based on the following criterion:

If bit 27 = 1. Extended opcode is at range 27-30. Otherwise the extended opcode range is 27-29.
  • Loading branch information
bwelton committed Nov 2, 2018
1 parent 7a62f5b commit d5f19ec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion instructionAPI/src/InstructionDecoder-power.C
Expand Up @@ -829,7 +829,12 @@ using namespace boost::assign;
}
const power_entry& InstructionDecoder_power::extended_op_30()
{
const power_table::const_iterator entry_it = power_entry::extended_op_30.find(field<27, 29>(insn));

power_table::const_iterator entry_it;
if (field<27,27>(insn) == 0)
entry_it = power_entry::extended_op_30.find(field<27, 29>(insn));
else
entry_it = power_entry::extended_op_30.find(field<27, 30>(insn));
if (entry_it == power_entry::extended_op_30.end())
return invalid_entry;
return entry_it->second;
Expand Down

0 comments on commit d5f19ec

Please sign in to comment.