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: Generate abs target assembly code with saturation behavior


Thank you for all your kindly help make the issue more clear.
Currently, we would disable abssi2 pattern and the soft-fp could work correctly.
Thanks all the explanation and assistance.
I really appreciate it.

2013/6/30 Joseph S. Myers <joseph@codesourcery.com>:
> On Sun, 30 Jun 2013, Shiva Chen wrote:
>
>> But how the target generate abs instruction if the target abs have
>> saturation behavior ?
>> We couldn't use abssi2 naming pattern and ss_abssi2 naming pattern
>> doesn't exist.
>
> If you want to use a saturating abs instruction for C code that exhibits
> undefined behavior in cases where the instruction saturates, you need to
> add support for ss_abssi2 patterns and teach the GIMPLE-to-RTL conversion
> to use such patterns as appropriate (in the absence of -fwrapv/-ftrapv, of
> course).
>
> --
> Joseph S. Myers
> joseph@codesourcery.com


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