On 11/13/23 8:33 PM, Kewen.Lin wrote:
>> if (PCREL_SUPPORTED_BY_OS)
> ....
>> +  else
>> +    {
>> +      if (TARGET_PCREL
>> +      && (rs6000_isa_flags_explicit & OPTION_MASK_PCREL) != 0)
>> +    error ("use of %qs is invalid for this target", "-mpcrel");
>>        rs6000_isa_flags &= ~OPTION_MASK_PCREL;
>>      }
> 
> now, I think it should be fine not to explicitly mask it off Power10
> default flags?  Then leave Power10 default flags unchanged seems more
> consistent.  The others look good to me!  Thanks again.

Ah, good catch, yes, I'll remove the clearing of the bit, since we know
it's either already clear (because that is the default value) or if it's
set, then that's the error condition we're catching here.  That also means
that we can remove the test for rs6000_isa_flags_explicit & OPTION_MASK_PCREL) 
!= 0
too, since at this point, TARGET_PCREL can only be true if it was explicitly
enabled with -mpcrel by the user.  Therefor, the code can now look like:

  if (PCREL_SUPPORTED_BY_OS)
....
  else if (TARGET_PCREL)
    error ("use of %qs is invalid for this target", "-mpcrel");

I'll make that change, redo the bootstrap and regtesting and then
officially submit the patch.  Thanks!

Peter

Reply via email to