[Beignet] [PATCH] GBE: fix half immediate negate assert.

Pan, Xiuli xiuli.pan at intel.com
Thu Oct 20 08:00:29 UTC 2016


LGTM!
Thanks!

-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of rong.r.yang at intel.com
Sent: Sunday, September 18, 2016 10:50 AM
To: beignet at lists.freedesktop.org
Cc: Luo, Xionghu <xionghu.luo at intel.com>; Yang, Rong R <rong.r.yang at intel.com>
Subject: [Beignet] [PATCH] GBE: fix half immediate negate assert.

From: Yang Rong <rong.r.yang at intel.com>

Also add double immediate negate support.

Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
 backend/src/backend/gen_register.hpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/backend/src/backend/gen_register.hpp b/backend/src/backend/gen_register.hpp
index bbea761..a8eb2e4 100644
--- a/backend/src/backend/gen_register.hpp
+++ b/backend/src/backend/gen_register.hpp
@@ -1267,6 +1267,11 @@ namespace gbe
         } else if (reg.type == GEN_TYPE_W) {
           const uint16_t uw = reg.value.ud & 0xffff;
           reg = GenRegister::immw(-(int16_t)uw);
+        } else if (reg.type == GEN_TYPE_HF_IMM) {
+          const uint16_t uw = reg.value.ud & 0xffff;
+          reg = GenRegister::immh(uw ^ 0x8000);
+        } else if (reg.type == GEN_TYPE_DF_IMM) {
+          reg.value.df = -reg.value.df;
         } else
           NOT_SUPPORTED;
       }
-- 
1.9.1

_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list