fixed detection of M extension

This commit is contained in:
mariusmonton 2018-11-14 23:14:06 +01:00
parent 5b8862b251
commit adc30178ab
1 changed files with 2 additions and 1 deletions

View File

@ -157,7 +157,8 @@ opCodes Instruction::decode() {
extension_t Instruction::check_extension() { extension_t Instruction::check_extension() {
if (m_instr.range(6,0) == 0b0110011) { if ( (m_instr.range(6,0) == 0b0110011) &&
(m_instr.range(31,25) == 0b0000001) ){
return M_EXTENSION; return M_EXTENSION;
} else if (m_instr.range(1,0) == 0b11) { } else if (m_instr.range(1,0) == 0b11) {
return BASE_EXTENSION; return BASE_EXTENSION;