[Beignet] [PATCH] [OCL20] atomic bug fix.
Pan, Xiuli
xiuli.pan at intel.com
Mon Mar 21 07:22:51 UTC 2016
LGTM, thanks.
-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of xionghu.luo at intel.com
Sent: Monday, March 21, 2016 9:11 PM
To: beignet at lists.freedesktop.org
Cc: Luo, Xionghu <xionghu.luo at intel.com>
Subject: [Beignet] [PATCH] [OCL20] atomic bug fix.
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
_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list