Author: shihui Date: 2011-05-08 10:30:34 -0400 (Sun, 08 May 2011) New Revision: 3590
Modified: trunk/osprey/common/com/MIPS/targ_const.cxx trunk/osprey/common/com/NVISA/targ_const.cxx trunk/osprey/common/com/SL/targ_const.cxx trunk/osprey/common/com/ia64/targ_const.cxx trunk/osprey/common/com/loongson/targ_const.cxx trunk/osprey/common/com/ppc32/targ_const.cxx trunk/osprey/common/com/x8664/targ_const.cxx Log: Fix debug build failure with r3574: r3574 fix the fake assertion in check_tcon. when tcon mtype is less than 4 bytes, check high 3 words be zero. However this assertion condition is not correct for I1,I2,I4 mtype tcon. I1,I2,I4 will be sign extend to I8 and store in TCON_I8, when construct tcon. So when I1,I2,I4 is negative, TCON_V1 can be 0xffffffff. Fix is, for I1,I2,I4 tcon value, assert if TCON_v0 is negative, TCON_V1 is 0xffffffff. Code review by Fred Modified: trunk/osprey/common/com/MIPS/targ_const.cxx =================================================================== --- trunk/osprey/common/com/MIPS/targ_const.cxx 2011-05-06 21:50:59 UTC (rev 3589) +++ trunk/osprey/common/com/MIPS/targ_const.cxx 2011-05-08 14:30:34 UTC (rev 3590) @@ -225,6 +225,16 @@ case MTYPE_I1: case MTYPE_I2: case MTYPE_I4: + // since I1/I2/I4 is negative and sign extend to I8 + // then store to TCON, tcon_v1 wil be 0xffffffff + if (((mINT32)TCON_v0(*tc)) < 0) { + Is_True ( ((mINT32)TCON_v1(*tc) == ((mINT32)-1)) && + ((TCON_v2(*tc)|TCON_v3(*tc)) == 0), + ("TCONV_1 is not -1 or high order word of %s TCON non zero %x", + Mtype_Name(TCON_ty(*tc)), TCON_v1(*tc)) ); + break; + } + /* fall thru */ case MTYPE_U1: case MTYPE_U2: case MTYPE_U4: Modified: trunk/osprey/common/com/NVISA/targ_const.cxx =================================================================== --- trunk/osprey/common/com/NVISA/targ_const.cxx 2011-05-06 21:50:59 UTC (rev 3589) +++ trunk/osprey/common/com/NVISA/targ_const.cxx 2011-05-08 14:30:34 UTC (rev 3590) @@ -239,6 +239,16 @@ case MTYPE_I1: case MTYPE_I2: case MTYPE_I4: + // since I1/I2/I4 is negative and sign extend to I8 + // then store to TCON, tcon_v1 wil be 0xffffffff + if (((mINT32)TCON_v0(*tc)) < 0) { + Is_True ( ((mINT32)TCON_v1(*tc) == ((mINT32)-1)) && + ((TCON_v2(*tc)|TCON_v3(*tc)) == 0), + ("TCONV_1 is not -1 or high order word of %s TCON non zero %x", + Mtype_Name(TCON_ty(*tc)), TCON_v1(*tc)) ); + break; + } + /* fall thru */ case MTYPE_U1: case MTYPE_U2: case MTYPE_U4: Modified: trunk/osprey/common/com/SL/targ_const.cxx =================================================================== --- trunk/osprey/common/com/SL/targ_const.cxx 2011-05-06 21:50:59 UTC (rev 3589) +++ trunk/osprey/common/com/SL/targ_const.cxx 2011-05-08 14:30:34 UTC (rev 3590) @@ -203,6 +203,16 @@ case MTYPE_I1: case MTYPE_I2: case MTYPE_I4: + // since I1/I2/I4 is negative and sign extend to I8 + // then store to TCON, tcon_v1 wil be 0xffffffff + if (((mINT32)TCON_v0(*tc)) < 0) { + Is_True ( ((mINT32)TCON_v1(*tc) == ((mINT32)-1)) && + ((TCON_v2(*tc)|TCON_v3(*tc)) == 0), + ("TCONV_1 is not -1 or high order word of %s TCON non zero %x", + Mtype_Name(TCON_ty(*tc)), TCON_v1(*tc)) ); + break; + } + /* fall thru */ case MTYPE_U1: case MTYPE_U2: case MTYPE_U4: Modified: trunk/osprey/common/com/ia64/targ_const.cxx =================================================================== --- trunk/osprey/common/com/ia64/targ_const.cxx 2011-05-06 21:50:59 UTC (rev 3589) +++ trunk/osprey/common/com/ia64/targ_const.cxx 2011-05-08 14:30:34 UTC (rev 3590) @@ -223,6 +223,16 @@ case MTYPE_I1: case MTYPE_I2: case MTYPE_I4: + // since I1/I2/I4 is negative and sign extend to I8 + // then store to TCON, tcon_v1 wil be 0xffffffff + if (((mINT32)TCON_v0(*tc)) < 0) { + Is_True ( ((mINT32)TCON_v1(*tc) == ((mINT32)-1)) && + ((TCON_v2(*tc)|TCON_v3(*tc)) == 0), + ("TCONV_1 is not -1 or high order word of %s TCON non zero %x", + Mtype_Name(TCON_ty(*tc)), TCON_v1(*tc)) ); + break; + } + /* fall thru */ case MTYPE_U1: case MTYPE_U2: case MTYPE_U4: Modified: trunk/osprey/common/com/loongson/targ_const.cxx =================================================================== --- trunk/osprey/common/com/loongson/targ_const.cxx 2011-05-06 21:50:59 UTC (rev 3589) +++ trunk/osprey/common/com/loongson/targ_const.cxx 2011-05-08 14:30:34 UTC (rev 3590) @@ -231,6 +231,16 @@ case MTYPE_I1: case MTYPE_I2: case MTYPE_I4: + // since I1/I2/I4 is negative and sign extend to I8 + // then store to TCON, tcon_v1 wil be 0xffffffff + if (((mINT32)TCON_v0(*tc)) < 0) { + Is_True ( ((mINT32)TCON_v1(*tc) == ((mINT32)-1)) && + ((TCON_v2(*tc)|TCON_v3(*tc)) == 0), + ("TCONV_1 is not -1 or high order word of %s TCON non zero %x", + Mtype_Name(TCON_ty(*tc)), TCON_v1(*tc)) ); + break; + } + /* fall thru */ case MTYPE_U1: case MTYPE_U2: case MTYPE_U4: Modified: trunk/osprey/common/com/ppc32/targ_const.cxx =================================================================== --- trunk/osprey/common/com/ppc32/targ_const.cxx 2011-05-06 21:50:59 UTC (rev 3589) +++ trunk/osprey/common/com/ppc32/targ_const.cxx 2011-05-08 14:30:34 UTC (rev 3590) @@ -224,6 +224,16 @@ case MTYPE_I1: case MTYPE_I2: case MTYPE_I4: + // since I1/I2/I4 is negative and sign extend to I8 + // then store to TCON, tcon_v1 wil be 0xffffffff + if (((mINT32)TCON_v0(*tc)) < 0) { + Is_True ( ((mINT32)TCON_v1(*tc) == ((mINT32)-1)) && + ((TCON_v2(*tc)|TCON_v3(*tc)) == 0), + ("TCONV_1 is not -1 or high order word of %s TCON non zero %x", + Mtype_Name(TCON_ty(*tc)), TCON_v1(*tc)) ); + break; + } + /* fall thru */ case MTYPE_U1: case MTYPE_U2: case MTYPE_U4: Modified: trunk/osprey/common/com/x8664/targ_const.cxx =================================================================== --- trunk/osprey/common/com/x8664/targ_const.cxx 2011-05-06 21:50:59 UTC (rev 3589) +++ trunk/osprey/common/com/x8664/targ_const.cxx 2011-05-08 14:30:34 UTC (rev 3590) @@ -250,6 +250,16 @@ case MTYPE_I1: case MTYPE_I2: case MTYPE_I4: + // since I1/I2/I4 is negative and sign extend to I8 + // then store to TCON, tcon_v1 wil be 0xffffffff + if (((mINT32)TCON_v0(*tc)) < 0) { + Is_True ( ((mINT32)TCON_v1(*tc) == ((mINT32)-1)) && + ((TCON_v2(*tc)|TCON_v3(*tc)) == 0), + ("TCONV_1 is not -1 or high order word of %s TCON non zero %x", + Mtype_Name(TCON_ty(*tc)), TCON_v1(*tc)) ); + break; + } + /* fall thru */ case MTYPE_U1: case MTYPE_U2: case MTYPE_U4: ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel