[Beignet] [PATCH] GBE: fix one potential bug in UnsignedI64ToFloat.

Zhigang Gong zhigang.gong at intel.com
Mon May 5 21:48:22 PDT 2014


Set exp to a proper value to make sure all the inactive lanes
flag bits are 1s which satisfy the requirement of the following
ALL16/ALL8H condition check.

Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
---
 backend/src/backend/gen_context.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/backend/src/backend/gen_context.cpp b/backend/src/backend/gen_context.cpp
index 00cbf1d..f014295 100644
--- a/backend/src/backend/gen_context.cpp
+++ b/backend/src/backend/gen_context.cpp
@@ -907,6 +907,10 @@ namespace gbe
                                             GenRegister mantissa, GenRegister tmp, GenRegister flag) {
     uint32_t jip0, jip1;
     GenRegister dst_ud = GenRegister::retype(dst, GEN_TYPE_UD);
+    p->push();
+      p->curr.noMask = 1;
+      p->MOV(exp, GenRegister::immud(24)); // make sure the inactive lane is 1 when check ALL8H/ALL16H condition latter.
+    p->pop();
     p->FBH(exp, high);
     p->ADD(exp, GenRegister::negate(exp), GenRegister::immud(31));  //exp = 32 when high == 0
     p->push();
-- 
1.8.3.2



More information about the Beignet mailing list