FEXCore: Support CpuState relative vector named constants

The motivation towards just having a pointer array in CpuState was that
initialization was fairly cheap and that we have limited space inside
the encoding depending on what we want to do.

Initialization cost is still a concern but doing a memcpy of 128-bytes
isn't that big of a deal.

Limited space in CpuState, while a concern isn't a significant one.
   - Needs to currently be less than 1 page in size
   - Needs to be under the architectural offset limitations of loadstore
     scaled offsets. Which is 65KB for 128-bit vectors

Still keeps the pointer array around for cases when we would need
synthesize an address offset and it's just easier to load the
process-wide table.

The performance improvement here is removing the dependency in the
ldr+ldr chain. In microbenchmarks this has shown to have an improvement
of ~4% by removing this dependency chain on Cortex-X1C.
This commit is contained in:
Ryan Houdek committed 2023-10-04 20:56:29 -07:00
1 parent ee6debe8fd
commit 8a51bb7a61
3 files changed
+30 -10

No files matched your search

+3
View File
@@ -259,6 +259,9 @@ namespace FEXCore::Core {
uint64_t L1Pointer{};
uint64_t L2Pointer{};
/** @} */
// Copy of process-wide named vector constants data.
alignas(16) uint64_t NamedVectorConstants[FEXCore::IR::NamedVectorConstant::NAMED_VECTOR_CONST_POOL_MAX][2];
} Common;
union {