updates generated cores

This commit is contained in:
2024-09-27 20:04:58 +02:00
parent b45b3589fa
commit ad60449073
3 changed files with 97 additions and 59 deletions

View File

@ -1490,7 +1490,7 @@ private:
),
this->gen_const(8,1),
this->gen_const(8,0),
1), 32),
8), 32),
get_reg_ptr(rd + traits::X0), false);
}
}
@ -1543,7 +1543,7 @@ private:
),
this->gen_const(8,1),
this->gen_const(8,0),
1), 32),
8), 32),
get_reg_ptr(rd + traits::X0), false);
}
}
@ -2057,7 +2057,7 @@ private:
,
this->gen_const(8,1),
this->gen_const(8,0),
1), 32),
8), 32),
get_reg_ptr(rd + traits::X0), false);
}
}
@ -2110,7 +2110,7 @@ private:
,
this->gen_const(8,1),
this->gen_const(8,0),
1), 32),
8), 32),
get_reg_ptr(rd + traits::X0), false);
}
}
@ -2553,10 +2553,10 @@ private:
this->gen_instr_prologue();
/*generate behavior*/
std::vector<Value*> wait_args{
std::vector<Value*> wait_231_args{
this->gen_ext(this->gen_const(8,1), 32)
};
this->builder.CreateCall(this->mod->getFunction("wait"), wait_args);
this->builder.CreateCall(this->mod->getFunction("wait"), wait_231_args);
bb = BasicBlock::Create(this->mod->getContext(), "entry", this->func, this->leave_blk);
auto returnValue = std::make_tuple(CONT,bb);
@ -4897,7 +4897,7 @@ private:
};
this->builder.CreateCall(this->mod->getFunction("print_disass"), args);
}
this->gen_sync(iss::PRE_SYNC, instr_descr.size());
this->gen_sync(iss::PRE_SYNC, instr_descr.size());
this->builder.CreateStore(this->builder.CreateLoad(this->get_typeptr(traits::NEXT_PC), get_reg_ptr(traits::NEXT_PC), true),
get_reg_ptr(traits::PC), true);
this->builder.CreateStore(
@ -4972,6 +4972,7 @@ template <typename ARCH>
void vm_impl<ARCH>::gen_raise_trap(uint16_t trap_id, uint16_t cause) {
auto *TRAP_val = this->gen_const(32, 0x80 << 24 | (cause << 16) | trap_id);
this->builder.CreateStore(TRAP_val, get_reg_ptr(traits::TRAP_STATE), true);
this->builder.CreateBr(this->trap_blk);
}
template <typename ARCH>
@ -5074,4 +5075,4 @@ volatile std::array<bool, 2> dummy = {
};
}
}
// clang-format on
// clang-format on