32bit zebin support

This commit adds support for 32 bit zebinary in NEO runtime and in
ocloc validate.

Resolves: NEO-7288

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit is contained in:
Krystian Chmielewski
2022-09-22 11:03:51 +00:00
committed by Compute-Runtime-Automation
parent b5b9c3500f
commit 596e9f815c
16 changed files with 147 additions and 61 deletions

View File

@ -64,6 +64,17 @@ TEST(OclocValidate, WhenInputIsValidZebinThenReturnSucceed) {
EXPECT_EQ(0, res) << oclocStdout;
}
TEST(OclocValidate, WhenInputIsValid32BitZebinThenReturnSucceed) {
ZebinTestData::ValidEmptyProgram<NEO::Elf::EI_CLASS_32> zebin;
MockOclocArgHelper::FilesMap files{{"src.gen", MockOclocArgHelper::FileData(reinterpret_cast<const char *>(zebin.storage.data()),
reinterpret_cast<const char *>(zebin.storage.data()) + zebin.storage.size())}};
MockOclocArgHelper argHelper{files};
argHelper.getPrinterRef() = MessagePrinter(true);
int res = NEO::Ocloc::validate({"-file", "src.gen"}, &argHelper);
std::string oclocStdout = argHelper.getPrinterRef().getLog().str();
EXPECT_EQ(0, res) << oclocStdout;
}
TEST(OclocValidate, WhenWarningsEmitedThenRedirectsThemToStdout) {
ZebinTestData::ValidEmptyProgram zebin;
zebin.removeSection(NEO::Elf::SHT_ZEBIN_ZEINFO, NEO::Elf::SectionsNamesZebin::zeInfo);