Reactor: Expose Capabilities.
Subzero is now lagging behind LLVM in terms of functionality.
Stub a new Capabilities, pre-populated with the Call() feature (implemented in a follow-up change).
With this we can skip tests that are known to not pass.
Bug: b/130746922
Change-Id: I033b63034a6dccd31418b1d1898114adbd718025
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/29409
Presubmit-Ready: Ben Clayton <bclayton@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
diff --git a/src/Reactor/LLVMReactor.cpp b/src/Reactor/LLVMReactor.cpp
index 2069a77..fc9f5e9 100644
--- a/src/Reactor/LLVMReactor.cpp
+++ b/src/Reactor/LLVMReactor.cpp
@@ -452,6 +452,12 @@
namespace rr
{
+ const Capabilities Caps =
+ {
+ true, // CallSupported
+ };
+
+
#if REACTOR_LLVM_VERSION < 7
class LLVMReactorJIT
{
diff --git a/src/Reactor/Reactor.hpp b/src/Reactor/Reactor.hpp
index 7846711..e6f3ff2 100644
--- a/src/Reactor/Reactor.hpp
+++ b/src/Reactor/Reactor.hpp
@@ -34,6 +34,12 @@
namespace rr
{
+ struct Capabilities
+ {
+ bool CallSupported; // Support for rr::Call()
+ };
+ extern const Capabilities Caps;
+
class Bool;
class Byte;
class SByte;
diff --git a/src/Reactor/SubzeroReactor.cpp b/src/Reactor/SubzeroReactor.cpp
index 63d7bd6..c30a419 100644
--- a/src/Reactor/SubzeroReactor.cpp
+++ b/src/Reactor/SubzeroReactor.cpp
@@ -133,6 +133,11 @@
namespace rr
{
+ const Capabilities Caps =
+ {
+ false, // CallSupported
+ };
+
enum EmulatedType
{
EmulatedShift = 16,