From: Luo Xionghu <[email protected]>

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 <[email protected]>
---
 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

_______________________________________________
Beignet mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to