GBE: fixed a long related bug.
authorZhigang Gong <zhigang.gong@intel.com>
Fri, 10 Jan 2014 09:49:12 +0000 (17:49 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Tue, 14 Jan 2014 01:42:11 +0000 (09:42 +0800)
We need to consider the situation that the 64 bit virtual register
is crossing two GRFs.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
backend/src/backend/gen_register.hpp

index 73d8ffa..57c78d9 100644 (file)
@@ -270,6 +270,8 @@ namespace gbe
     INLINE GenRegister top_half(void) const {
       GenRegister r = bottom_half();
       r.subnr += 4;
+      r.nr += r.subnr / 32;
+      r.subnr %= 32;
       return r;
     }