[Testing] Get tests running (dirty hack for linux)

This commit is contained in:
Herman S.
2025-10-14 14:19:12 +09:00
parent 14c2814654
commit 09a15fbedc
13 changed files with 209 additions and 46 deletions

View File

@@ -85,8 +85,13 @@ Symbol::Status TestModule::DeclareFunction(uint32_t address,
// Reset() all caching when we leave.
xe::make_reset_scope(compiler_);
xe::make_reset_scope(assembler_);
xe::make_reset_scope(builder_);
// Set the HIRBuilder as current for this thread
builder_->MakeCurrent();
if (!generate_(*builder_.get())) {
builder_->RemoveCurrent();
function->set_status(Symbol::Status::kFailed);
return Symbol::Status::kFailed;
}
@@ -97,6 +102,9 @@ Symbol::Status TestModule::DeclareFunction(uint32_t address,
// Assemble the function.
assembler_->Assemble(function, builder_.get(), 0, nullptr);
// Remove the HIRBuilder as current for this thread
builder_->RemoveCurrent();
status = Symbol::Status::kDefined;
function->set_status(status);
}