Zebin - Improving binding table generation

Allowing N:1 kernel_arg:bti mappings

Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
This commit is contained in:
Jaroslaw Chodor
2021-01-07 11:30:05 +01:00
committed by Compute-Runtime-Automation
parent 6a54bde164
commit 4c50a9e147
4 changed files with 22 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -486,9 +486,20 @@ TEST(PatchPointer, GivenUnhandledPointerSizeThenAborts) {
NEO::ArgDescPointer ptrArg;
uintptr_t ptrValue = reinterpret_cast<uintptr_t>(&ptrArg);
ptrArg.pointerSize = 5;
ptrArg.stateless = 0U;
EXPECT_THROW(patchPointer(buffer, ptrArg, ptrValue), std::exception);
}
TEST(PatchPointer, GivenUnhandledPointerSizeWhenStatelessOffsetIsUndefinedThenIgnoresPointerSize) {
alignas(8) uint8_t buffer[64];
memset(buffer, 3, sizeof(buffer));
NEO::ArgDescPointer ptrArg;
uintptr_t ptrValue = reinterpret_cast<uintptr_t>(&ptrArg);
ptrArg.pointerSize = 5;
ptrArg.stateless = NEO::undefined<NEO::CrossThreadDataOffset>;
EXPECT_NO_THROW(patchPointer(buffer, ptrArg, ptrValue));
}
TEST(PatchPointer, Given32bitPointerSizeThenPatchesOnly32bits) {
alignas(8) uint8_t buffer[64];
memset(buffer, 3, sizeof(buffer));