[Beignet] [PATCH 07/27] Add the u64 imm type in register

junyan.he at inbox.com junyan.he at inbox.com
Tue Jan 6 02:00:49 PST 2015


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

Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
 backend/src/backend/gen_register.hpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/backend/src/backend/gen_register.hpp b/backend/src/backend/gen_register.hpp
index d8a89dd..e3ba1fb 100644
--- a/backend/src/backend/gen_register.hpp
+++ b/backend/src/backend/gen_register.hpp
@@ -241,6 +241,7 @@ namespace gbe
       uint32_t ud;
       uint16_t reg;
       int64_t i64;
+      uint64_t u64;
     } value;
 
     uint32_t nr:8;         //!< Just for some physical registers (acc, null)
@@ -581,6 +582,12 @@ namespace gbe
                          GEN_HORIZONTAL_STRIDE_0);
     }
 
+    static INLINE GenRegister immuint64(uint64_t i) {
+      GenRegister immediate = imm(GEN_TYPE_UL);
+      immediate.value.u64 = i;
+      return immediate;
+    }
+
     static INLINE GenRegister immint64(int64_t i) {
       GenRegister immediate = imm(GEN_TYPE_L);
       immediate.value.i64 = i;
-- 
1.9.1



More information about the Beignet mailing list