[Beignet] [PATCH] Backend: Fix header address of oword block read/write

Xiuli Pan xiuli.pan at intel.com
Wed Jan 4 07:33:47 UTC 2017


From: Pan Xiuli <xiuli.pan at intel.com>

These regiter are uniform and used as src and dst, need to restrict them
to be uniform.

Signed-off-by: Pan Xiuli <xiuli.pan at intel.com>
---
 backend/src/backend/gen_insn_selection.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/backend/src/backend/gen_insn_selection.cpp b/backend/src/backend/gen_insn_selection.cpp
index 7a3f2fe..22b0ddc 100644
--- a/backend/src/backend/gen_insn_selection.cpp
+++ b/backend/src/backend/gen_insn_selection.cpp
@@ -4819,9 +4819,9 @@ extern bool OCL_DEBUGINFO; // first defined by calling BVAR in program.cpp
 
       GenRegister headeraddr;
       if (isA64)
-        headeraddr = GenRegister::retype(sel.getOffsetReg(header, 0, 0), GEN_TYPE_UL);
+        headeraddr = GenRegister::toUniform(sel.getOffsetReg(header, 0, 0), GEN_TYPE_UL);
       else
-        headeraddr = sel.getOffsetReg(header, 0, 2 * 4);
+        headeraddr = GenRegister::toUniform(sel.getOffsetReg(header, 0, 2 * 4), GEN_TYPE_UD);
       // Make header
       sel.push();
       {
@@ -5327,9 +5327,9 @@ extern bool OCL_DEBUGINFO; // first defined by calling BVAR in program.cpp
 
       GenRegister headeraddr;
       if (isA64)
-        headeraddr = GenRegister::retype(sel.getOffsetReg(header, 0, 0), GEN_TYPE_UL);
+        headeraddr = GenRegister::toUniform(sel.getOffsetReg(header, 0, 0), GEN_TYPE_UL);
       else
-        headeraddr = sel.getOffsetReg(header, 0, 2 * 4);
+        headeraddr = GenRegister::toUniform(sel.getOffsetReg(header, 0, 2 * 4), GEN_TYPE_UD);
       // Make header
       sel.push();
       {
-- 
2.7.4



More information about the Beignet mailing list