Commit 494fac7e authored by Alexander Shabarshin's avatar Alexander Shabarshin

fixed CSRRS/CSRRC in case of rs1=0

parent 9a74f2aa
......@@ -1419,7 +1419,7 @@ void execute_instruction()
return;
}
val2 = (int32_t)val2;
if (rs1 != 0) {
/* if (rs1 != 0) { */
if (funct3 == 2)
{
#ifdef DEBUG_EXTRA
......@@ -1441,9 +1441,12 @@ void execute_instruction()
raise_exception(CAUSE_ILLEGAL_INSTRUCTION, insn);
return;
}
} else {
/* }
else
{
err = 0;
}
*/
if (rd != 0)
reg[rd] = val2;
break;
......@@ -1812,6 +1815,9 @@ int main(int argc, char** argv)
GElf_Sym sym;
gelf_getsym(data, i, &sym);
char* name = elf_strptr(elf, shdr.sh_link, sym.st_name);
#if 0
if(*name) printf("sym '%s' %lx\n",name,sym.st_value);
#endif
if (strcmp(name, "begin_signature") == 0) {
begin_signature = sym.st_value;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment