> On Oct 2, 2020, at 10:15 AM, Richard Sandiford <richard.sandif...@arm.com> 
> wrote:
> 
> Qing Zhao <qing.z...@oracle.com> writes:
>>> 
>>> Going back to the default hook, I guess one option is:
>>> 
>>>  rtx zero = CONST0_RTX (reg_raw_mode[regno]);
>>>  rtx_insn *insn = emit_insn (gen_rtx_SET (regno_reg_rtx[regno], zero));
>>>  if (!valid_insn_p (insn))
>>>    sorry (…);
>> 
>> “Sorry” here will tell the user that the implementation on this platform is 
>> not valid?
> 
> Right.  If we didn't have a default implementation of the target hook,
> we would presumably need to issue a sorry () if the user tried to use
> the option on a target that didn't define the hook.  The above is a
> compromise: we instead make a reasonable attempt to handle the option,
> and issue the sorry only if that attempt fails.

Sounds reasonable, I will do this.

thanks.

Qing
> 
> Thanks,
> Richard
> 
>> 
>> Qing
>>> 
>>> but with some mechanism to avoid spewing the user with messages
>>> for the same problem.
>>> 
>>> Thanks,
>>> Richard

Reply via email to