diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-08 19:34:29 +0100 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-02-08 19:34:29 +0100 |
commit | 89afab40d3e7c3d2ec0830b0cce897954c202d14 (patch) | |
tree | 20843f731298cd4f54103d25ebe4ddee7dd7a7b6 | |
parent | 5a4b106f98545c1593fa7104fc526c3bf6123698 (diff) | |
download | qtmips-89afab40d3e7c3d2ec0830b0cce897954c202d14.tar.gz qtmips-89afab40d3e7c3d2ec0830b0cce897954c202d14.tar.bz2 qtmips-89afab40d3e7c3d2ec0830b0cce897954c202d14.zip |
Implement SYNCI as complete cache flush.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
-rw-r--r-- | qtmips_machine/core.cpp | 2 | ||||
-rw-r--r-- | qtmips_machine/instruction.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/qtmips_machine/core.cpp b/qtmips_machine/core.cpp index 75b6eb6..20353be 100644 --- a/qtmips_machine/core.cpp +++ b/qtmips_machine/core.cpp @@ -584,7 +584,7 @@ void CorePipelined::do_step() { dt_e.regwrite, dt_e.inst.type(), dt_e.rwrite, dt_m.regwrite, dt_m.inst.type(), dt_m.rwrite); #endif -#if 1 +#if 0 printf("PC 0x%08lx\n", (unsigned long)dt_f.inst_addr); #endif diff --git a/qtmips_machine/instruction.cpp b/qtmips_machine/instruction.cpp index ad4ded3..030b79f 100644 --- a/qtmips_machine/instruction.cpp +++ b/qtmips_machine/instruction.cpp @@ -112,7 +112,7 @@ static const struct InstructionMap alu_instruction_map[] = { .flags = IMF_SUPPORTED | IMF_EXCEPTION}, IM_UNKNOWN, {"SYNC", IT_I, NOALU, NOMEM, nullptr, // SYNC - .flags = IMF_SUPPORTE}, + .flags = IMF_SUPPORTED}, {"MFHI", IT_R, ALU_OP_MFHI, NOMEM, nullptr, .flags = FLAGS_ALU_T_R_D | IMF_READ_HILO}, {"MTHI", IT_R, ALU_OP_MTHI, NOMEM, nullptr, @@ -276,8 +276,8 @@ static const struct InstructionMap regimm_instruction_map[] = { IM_UNKNOWN, IM_UNKNOWN, IM_UNKNOWN, - {"SYNCI", IT_I, NOALU, NOMEM, nullptr, // SYNCI - .flags = IMF_SUPPORTE}, + {"SYNCI", IT_I, ALU_OP_ADDU, AC_CACHE_OP, nullptr, // SYNCI + .flags = IMF_SUPPORTED | IMF_BJR_REQ_RS}, }; const std::int32_t instruction_map_opcode_field = IMF_SUB_ENCODE(6, 26); |