Author: shenruifen Date: 2010-07-18 23:09:35 -0400 (Sun, 18 Jul 2010) New Revision: 3285
Modified: trunk/osprey/wgen/wgen_expr.cxx Log: Refix bug 557: bug in wgen: error CVTL bit. Last fix of bug557 will introduce other new failure as there is not good support of CVTL in BE. Using extract_bit to workaround it in this patch. Modified: trunk/osprey/wgen/wgen_expr.cxx =================================================================== --- trunk/osprey/wgen/wgen_expr.cxx 2010-07-19 01:46:34 UTC (rev 3284) +++ trunk/osprey/wgen/wgen_expr.cxx 2010-07-19 03:09:35 UTC (rev 3285) @@ -6393,9 +6393,15 @@ } if (MTYPE_size_min(mtyp) < MTYPE_size_min(WN_rtype(wn))) { - if (MTYPE_size_min(mtyp) != 32) - wn = WN_CreateCvtl(OPR_CVTL, Widen_Mtype(mtyp), MTYPE_V, - gs_type_type_precision(gs_tree_type(exp)), wn); + if (MTYPE_size_min(mtyp) != 32) { + INT cvt_bit = gs_type_type_precision(gs_tree_type(exp)); + if (cvt_bit == 0 || cvt_bit == 8 || cvt_bit == 16 || cvt_bit == 32) { + wn = WN_CreateCvtl(OPR_CVTL, Widen_Mtype(mtyp), MTYPE_V, cvt_bit, wn); + } else { + wn = WN_CreateExp1(OPR_EXTRACT_BITS, Widen_Mtype(mtyp), MTYPE_V, wn); + WN_set_bit_offset_size(wn, 0, cvt_bit); + } + } } else wn = WN_Cvt(WN_rtype(wn), mtyp, wn); } else { ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel