Fix SleighAsm reinit for changed IO handles

This commit is contained in:
pancake committed 2026-03-21 17:36:15 +01:00
1 parent a009034cb3
commit e358ae348b
2 files changed
+3 -1

No files matched your search

+2 -1
View File
@@ -22,7 +22,7 @@ void SleighAsm::init(const char *cpu, int bits, bool bigendian, RIO *io, RConfig
collectSpecfiles ();
}
std::string new_sleigh_id = SleighIdFromSleighAsmConfig (Gcore, cpu, bits, bigendian, description);
if (!sleigh_id.empty() && sleigh_id == new_sleigh_id) {
if (!sleigh_id.empty() && sleigh_id == new_sleigh_id && current_io == io) {
return;
}
initInner (io, new_sleigh_id);
@@ -51,6 +51,7 @@ void SleighAsm::initInner(RIO *io, std::string sleigh_id) {
trans.clearCache ();
initRegMapping ();
this->sleigh_id = sleigh_id;
current_io = io;
}
static void parseProto(const Element *el, std::vector<std::string> &arg_names, std::vector<std::string> &ret_names) {
+1
View File
@@ -190,6 +190,7 @@ class R2Sleigh;
class SleighAsm {
private:
AsmLoadImage loader;
RIO *current_io = nullptr;
ContextInternal context;
DocumentStorage docstorage;
FileManage specpaths;