This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: powerpc compare_and_swap fails


On 11/17/2011 02:34 PM, David Edelsohn wrote:
> On Thu, Nov 17, 2011 at 3:25 PM, Richard Henderson <rth@redhat.com> wrote:
>> On 11/17/2011 12:37 AM, Alan Modra wrote:
>>> -      oldval = convert_modes (SImode, mode, oldval, 1);
>>> +      oldval = gen_reg_rtx (SImode);
>>> +      convert_move (oldval, orig, 1);
>>>        oldval = expand_simple_binop (SImode, ASHIFT, oldval, shift,
>>>                                   oldval, 1, OPTAB_LIB_WIDEN);
>>
>> Gah.  From convert_modes, oldval is a subreg, and modifying that
>> subreg gets us into all sorts of trouble.  The fix should be as
>> simple as
>>
>> -                                   oldval, 1, OPTAB_LIB_WIDEN);
>> +                                   NULL_RTX, 1, OPTAB_LIB_WIDEN);
>>
>> so that we don't write back into the subreg.
> 
> Richard,
> 
> Are you going to test and apply the fix or do you want Alan and I to do it?

Already done.  See gcc-patches.

http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181459

r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]