Author: meiye Date: 2011-03-03 14:46:19 -0500 (Thu, 03 Mar 2011) New Revision: 3502
Modified: trunk/osprey/be/opt/opt_htable.cxx trunk/osprey/be/opt/opt_lftr2.cxx Log: Fix for Bug 573. Force comparison to be unsigned in LFTR. CR: Sun Modified: trunk/osprey/be/opt/opt_htable.cxx =================================================================== --- trunk/osprey/be/opt/opt_htable.cxx 2011-03-01 21:47:53 UTC (rev 3501) +++ trunk/osprey/be/opt/opt_htable.cxx 2011-03-03 19:46:19 UTC (rev 3502) @@ -5102,8 +5102,11 @@ if (res0 == ADDRESSABILITY_UNKNOWN) return ADDRESSABILITY_UNKNOWN; res1 = Opnd(1)->Check_if_result_is_address(opt_stab); - if (res1 == ADDRESSABILITY_UNKNOWN) + if (res1 == ADDRESSABILITY_UNKNOWN) { + if (res0 == ADDRESSABILITY_IS_ADDRESS) + return res0; return ADDRESSABILITY_UNKNOWN; + } if (res0 == res1) { if (res0 == ADDRESSABILITY_IS_ADDRESS) return ADDRESSABILITY_NOT_ADDRESS; Modified: trunk/osprey/be/opt/opt_lftr2.cxx =================================================================== --- trunk/osprey/be/opt/opt_lftr2.cxx 2011-03-01 21:47:53 UTC (rev 3501) +++ trunk/osprey/be/opt/opt_lftr2.cxx 2011-03-03 19:46:19 UTC (rev 3502) @@ -1216,11 +1216,18 @@ // adjust operator of new comparison OPERATOR new_compare_opr = comparison_cr->Opr(); -#ifdef KEY +#ifdef KEY MTYPE new_compare_type = tempcr->Dtyp(); // do not change signedness of comparison since that could change semantics new_compare_type = Mtype_TransferSign(comparison_cr->Dsctyp(), new_compare_type); + if (Is_Target_32bit() + && (addressable == ADDRESSABILITY_IS_ADDRESS) + && MTYPE_is_signed(new_compare_type)) { + // For 32-bit targets, force comparison of address expressions to be unsigned. + new_compare_type = Mtype_from_mtype_class_and_size(MTYPE_CLASS_UNSIGNED, + MTYPE_size_min(new_compare_type)/8); + } #else MTYPE new_compare_type = comparison_cr->Dsctyp(); if (addressable == ADDRESSABILITY_IS_ADDRESS && ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel