-
Subzero: replace globals with external memory for constant vectors · 02a39536Antonio Maiorano authored
Nucleus::createConstantVector was implemented in terms of Subzero's globals API; however, once we generate multiple functions, these globals end up with incorrect addresses in the jitted code. For now, replacing this usage of globals with using externally provided (and allocated) memory via Routine::addConstantData. We can go back to using globals once we fix the problem (b/148086935). Also, this change fixes a problem with loading from a constant pointer, which Subzero interprets as a load with offset. We fix this by casting to a non-const variable when loading. Bug: b/145754674 Change-Id: I6e15385de134d385036eef3e9a255bf0738e4d44 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/40451Tested-by:
Antonio Maiorano <amaiorano@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com>
02a39536
×