GBE: change scalar byte size to 2 from 1.
authorZhigang Gong <zhigang.gong@intel.com>
Wed, 7 May 2014 01:39:50 +0000 (09:39 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Tue, 13 May 2014 09:18:18 +0000 (17:18 +0800)
Due to the exec size is always larger or equal to 2,
we need to change the scalar byte size to 2 rather than
1. Otherwise, it may generate the following illegal instruction:

(17      )  mov(1)          g127.31<1>UB    0x2UW                           { align1 WE_all };

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: Ruiling Song <ruiling.song@intel.com>
backend/src/backend/gen_reg_allocation.cpp

index 5098f34..718f618 100644 (file)
@@ -108,7 +108,7 @@ namespace gbe
       // Note that byte vector registers use two bytes per byte (and can be
       // interleaved)
       static const size_t familyVectorSize[] = {2,2,2,4,8};
-      static const size_t familyScalarSize[] = {2,1,2,4,8};
+      static const size_t familyScalarSize[] = {2,2,2,4,8};
       using namespace ir;
       const bool isScalar = ctx.sel->isScalarOrBool(reg);
       const RegisterData regData = ctx.sel->getRegisterData(reg);