[Beignet] [PATCH 05/10 OpenCL-2.0] Add subnr to notification register.

junyan.he at inbox.com junyan.he at inbox.com
Wed Apr 22 20:26:04 PDT 2015


From: Junyan He <junyan.he at linux.intel.com>

Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
 backend/src/backend/gen75_context.cpp |   10 ++--------
 backend/src/backend/gen_register.hpp  |    4 ++--
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/backend/src/backend/gen75_context.cpp b/backend/src/backend/gen75_context.cpp
index a830260..887fb13 100644
--- a/backend/src/backend/gen75_context.cpp
+++ b/backend/src/backend/gen75_context.cpp
@@ -44,14 +44,8 @@ namespace gbe
     p->push();
       p->curr.execWidth = 1;
       p->curr.predicate = GEN_PREDICATE_NONE;
-      GenRegister sr0 = GenRegister(GEN_ARCHITECTURE_REGISTER_FILE,
-                                    GEN_ARF_STATE,
-                                    1,
-                                    GEN_TYPE_UD,
-                                    GEN_VERTICAL_STRIDE_8,
-                                    GEN_WIDTH_8,
-                                    GEN_HORIZONTAL_STRIDE_1);
-      p->SHR(sr0, slm_index, GenRegister::immud(16));
+      GenRegister sr0_1 = GenRegister::sr(0, 1);
+      p->SHR(sr0_1, slm_index, GenRegister::immud(16));
     p->pop();
   }
 
diff --git a/backend/src/backend/gen_register.hpp b/backend/src/backend/gen_register.hpp
index 6e5321c..fa858d2 100644
--- a/backend/src/backend/gen_register.hpp
+++ b/backend/src/backend/gen_register.hpp
@@ -807,10 +807,10 @@ namespace gbe
                          GEN_HORIZONTAL_STRIDE_1);
     }
 
-    static INLINE GenRegister notification1(void) {
+    static INLINE GenRegister notification(uint32_t subnr = 0) {
       return GenRegister(GEN_ARCHITECTURE_REGISTER_FILE,
                          GEN_ARF_NOTIFICATION_COUNT,
-                         0,
+                         subnr,
                          GEN_TYPE_UD,
                          GEN_VERTICAL_STRIDE_0,
                          GEN_WIDTH_1,
-- 
1.7.9.5





More information about the Beignet mailing list