From: Zhigang Gong Date: Wed, 7 May 2014 01:39:50 +0000 (+0800) Subject: GBE: change scalar byte size to 2 from 1. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6bcc39d0bd8734178dc8f84a51b6ff0e983c6f7;p=contrib%2Fbeignet.git GBE: change scalar byte size to 2 from 1. 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 Reviewed-by: Ruiling Song --- diff --git a/backend/src/backend/gen_reg_allocation.cpp b/backend/src/backend/gen_reg_allocation.cpp index 5098f34..718f618 100644 --- a/backend/src/backend/gen_reg_allocation.cpp +++ b/backend/src/backend/gen_reg_allocation.cpp @@ -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);