[Beignet] [PATCH] [OCL20] atomic bug fix.

xionghu.luo at intel.com xionghu.luo at intel.com
Mon Mar 21 13:11:26 UTC 2016


From: Luo Xionghu <xionghu.luo at intel.com>

should use the dst type to differentiate the long type atomic,
the src type will always be 64 bit as it is the address register.

Signed-off-by: Luo Xionghu <xionghu.luo at intel.com>
---
 backend/src/backend/gen8_encoder.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backend/src/backend/gen8_encoder.cpp b/backend/src/backend/gen8_encoder.cpp
index 9af8cee..b83979c 100644
--- a/backend/src/backend/gen8_encoder.cpp
+++ b/backend/src/backend/gen8_encoder.cpp
@@ -206,7 +206,7 @@ namespace gbe
     this->setDst(insn, GenRegister::uw16grf(dst.nr, 0));
     this->setSrc0(insn, GenRegister::ud8grf(src.nr, 0));
     this->setSrc1(insn, GenRegister::immud(0));
-    int type_long = (src.type == GEN_TYPE_UL || src.type == GEN_TYPE_L) ? 1: 0;
+    int type_long = (dst.type == GEN_TYPE_UL || dst.type == GEN_TYPE_L) ? 1: 0;
     setAtomicA64MessageDesc(insn, function, bti.value.ud, srcNum, type_long);
   }
 
-- 
2.1.4



More information about the Beignet mailing list