[Beignet] [PATCH] Backend: Refine block_read buffer with unaligned OWord block read

Xiuli Pan xiuli.pan at intel.com
Thu Aug 18 04:56:36 UTC 2016


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

Block read buffer may have address that is unaligned to OWord, using
unaligned OWord block read to refine block read buffer.

Signed-off-by: Pan Xiuli <xiuli.pan at intel.com>
---
 backend/src/backend/gen_context.cpp | 6 +++---
 backend/src/backend/gen_encoder.cpp | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/backend/src/backend/gen_context.cpp b/backend/src/backend/gen_context.cpp
index b429ec3..34d74cd 100644
--- a/backend/src/backend/gen_context.cpp
+++ b/backend/src/backend/gen_context.cpp
@@ -3507,7 +3507,7 @@ namespace gbe
 
       // Update the header with the current address
       p->curr.execWidth = 1;
-      p->SHR(headeraddr, addr, GenRegister::immud(4));
+      p->MOV(headeraddr, addr);
 
       // Put zero in the general state base address
       p->MOV(GenRegister::offset(header, 0, 5 * 4), GenRegister::immud(0));
@@ -3540,7 +3540,7 @@ namespace gbe
             {
               // Update the address in header
               p->curr.execWidth = 1;
-              p->ADD(headeraddr, headeraddr, GenRegister::immud(8));
+              p->ADD(headeraddr, headeraddr, GenRegister::immud(128));
             }
             p->pop();
           }
@@ -3561,7 +3561,7 @@ namespace gbe
             {
               // Update the address in header
               p->curr.execWidth = 1;
-              p->ADD(headeraddr, headeraddr, GenRegister::immud(8));
+              p->ADD(headeraddr, headeraddr, GenRegister::immud(128));
             }
             p->pop();
           }
diff --git a/backend/src/backend/gen_encoder.cpp b/backend/src/backend/gen_encoder.cpp
index f8c99b2..975e1c7 100644
--- a/backend/src/backend/gen_encoder.cpp
+++ b/backend/src/backend/gen_encoder.cpp
@@ -1270,7 +1270,7 @@ namespace gbe
                 insn,
                 bti,
                 size,
-                GEN7_OBLOCK_READ,
+                GEN7_UNALIGNED_OBLOCK_READ,
                 msg_length,
                 response_length);
   }
-- 
2.7.4



More information about the Beignet mailing list