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 :
> On Sun, 30 Jun 2013, Shiva Chen wrote:
>
>> But how the ta
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
undef
Therefore, the macro in libgcc should be fine for GCC even if there
may occur signed overflow.
Because we have GCC implementation defined to follow.
GCC implementation defined could be guarantee even if generate abs.
Because abssi2 shouldn't do saturation.
But how the target generate abs instruct
On Fri, 28 Jun 2013, Shiva Chen wrote:
> Does the abssi2 semantically assume target abs shouldn't do saturation ?
Yes. The semantics of RTL abs are modulo, whereas ss_abs does signed
saturation. Likewise for addition, subtraction and multiplication.
(Some RTL codes have more complicated targ
Accordoing to GCC implementation defined
assigned 0x8000u to signed int should be 0x8000.
If GCC generate abs, abs will saturation or not depend on target ISA.
Then the result of the case won't follow the GCC implementation defined.
Then the result of the marco in
libgcc/soft-fp/op-common
On Fri, 28 Jun 2013, Andrew Haley wrote:
On 06/28/2013 08:53 AM, Shiva Chen wrote:
I have a case which will generate abs instructions.
int main(int argc)
{
if (argc < 0)
argc = -(unsigned int)argc;
return argc;
}
To my understanding, given that argc=0x8000 in 32bit int
On 06/28/2013 11:11 AM, Andrew Haley wrote:
On 06/28/2013 08:53 AM, Shiva Chen wrote:
I have a case which will generate abs instructions.
int main(int argc)
{
if (argc < 0)
argc = -(unsigned int)argc;
return argc;
}
To my understanding, given that argc=0x8000 in 32b
On 06/28/2013 08:53 AM, Shiva Chen wrote:
> I have a case which will generate abs instructions.
>
> int main(int argc)
> {
> if (argc < 0)
>argc = -(unsigned int)argc;
> return argc;
> }
>
> To my understanding, given that argc=0x8000 in 32bit int plaform,
> the result of
Hi,
I have a case which will generate abs instructions.
int main(int argc)
{
if (argc < 0)
argc = -(unsigned int)argc;
return argc;
}
To my understanding, given that argc=0x8000 in 32bit int plaform,
the result of (unsigned int)argc is well defined and should be 0x8000