public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Subnormal float support in armv7(with -msoft-float) for intrinsics
@ 2018-07-12 15:20 Umesh Kalappa
  2018-07-12 16:03 ` Szabolcs Nagy
  0 siblings, 1 reply; 6+ messages in thread
From: Umesh Kalappa @ 2018-07-12 15:20 UTC (permalink / raw)
  To: gcc

Hi everyone,

we have our source base ,that was compiled for armv7 on gcc8.1 with
soft-float and for following input

a=0x0010000000000000
b=0x0000000000000001

 result = a - b ;

we are getting the result as "0x000ffffffffffffe" and with
-mhard-float (disabled the flush to zero mode ) we are getting the
result as ""0x000fffffffffffff" as expected.

while debugging the soft-float code,we see that ,the compiler calls
the intrinsic "__aeabi_dsub" with arm calling conventions i.e passing
"a" in r0 and r1 registers and respectively for "b".

we are investigating the routine "__aeabi_dsub" that comes from libgcc
for incorrect result  and meanwhile we would like to know that

a)do libgcc routines/intrinsic for float operations support or
consider the subnormal values ? ,if so how we can enable the same.

Thank you
~Umesh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subnormal float support in armv7(with -msoft-float) for intrinsics
  2018-07-12 15:20 Subnormal float support in armv7(with -msoft-float) for intrinsics Umesh Kalappa
@ 2018-07-12 16:03 ` Szabolcs Nagy
  2018-07-13  7:53   ` Umesh Kalappa
  0 siblings, 1 reply; 6+ messages in thread
From: Szabolcs Nagy @ 2018-07-12 16:03 UTC (permalink / raw)
  To: Umesh Kalappa, gcc; +Cc: nd

On 12/07/18 16:20, Umesh Kalappa wrote:
> Hi everyone,
> 
> we have our source base ,that was compiled for armv7 on gcc8.1 with
> soft-float and for following input
> 
> a=0x0010000000000000
> b=0x0000000000000001
> 
>   result = a - b ;
> 
> we are getting the result as "0x000ffffffffffffe" and with
> -mhard-float (disabled the flush to zero mode ) we are getting the
> result as ""0x000fffffffffffff" as expected.
> 

please submit it as a bug report to bugzilla

> while debugging the soft-float code,we see that ,the compiler calls
> the intrinsic "__aeabi_dsub" with arm calling conventions i.e passing
> "a" in r0 and r1 registers and respectively for "b".
> 
> we are investigating the routine "__aeabi_dsub" that comes from libgcc
> for incorrect result  and meanwhile we would like to know that
> 
> a)do libgcc routines/intrinsic for float operations support or
> consider the subnormal values ? ,if so how we can enable the same.
> 
> Thank you
> ~Umesh
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subnormal float support in armv7(with -msoft-float) for intrinsics
  2018-07-12 16:03 ` Szabolcs Nagy
@ 2018-07-13  7:53   ` Umesh Kalappa
  2018-07-17  9:42     ` Umesh Kalappa
  0 siblings, 1 reply; 6+ messages in thread
From: Umesh Kalappa @ 2018-07-13  7:53 UTC (permalink / raw)
  To: Szabolcs Nagy; +Cc: gcc, nd

Thank you and issue  raised at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86512

~Umesh

On Thu, Jul 12, 2018 at 9:33 PM, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
> On 12/07/18 16:20, Umesh Kalappa wrote:
>>
>> Hi everyone,
>>
>> we have our source base ,that was compiled for armv7 on gcc8.1 with
>> soft-float and for following input
>>
>> a=0x0010000000000000
>> b=0x0000000000000001
>>
>>   result = a - b ;
>>
>> we are getting the result as "0x000ffffffffffffe" and with
>> -mhard-float (disabled the flush to zero mode ) we are getting the
>> result as ""0x000fffffffffffff" as expected.
>>
>
> please submit it as a bug report to bugzilla
>
>
>> while debugging the soft-float code,we see that ,the compiler calls
>> the intrinsic "__aeabi_dsub" with arm calling conventions i.e passing
>> "a" in r0 and r1 registers and respectively for "b".
>>
>> we are investigating the routine "__aeabi_dsub" that comes from libgcc
>> for incorrect result  and meanwhile we would like to know that
>>
>> a)do libgcc routines/intrinsic for float operations support or
>> consider the subnormal values ? ,if so how we can enable the same.
>>
>> Thank you
>> ~Umesh
>>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subnormal float support in armv7(with -msoft-float) for intrinsics
  2018-07-13  7:53   ` Umesh Kalappa
@ 2018-07-17  9:42     ` Umesh Kalappa
  2018-07-17  9:54       ` Ramana Radhakrishnan
  0 siblings, 1 reply; 6+ messages in thread
From: Umesh Kalappa @ 2018-07-17  9:42 UTC (permalink / raw)
  To: Szabolcs Nagy; +Cc: gcc, nd

[-- Attachment #1: Type: text/plain, Size: 1489 bytes --]

Hi Nagy,

Please  help us with your comments on the attached patch for the issue
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86512)

Thank you and waiting for your inputs on the same.
~Umesh

On Fri, Jul 13, 2018 at 1:22 PM, Umesh Kalappa <umesh.kalappa0@gmail.com> wrote:
> Thank you and issue  raised at
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86512
>
> ~Umesh
>
> On Thu, Jul 12, 2018 at 9:33 PM, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
>> On 12/07/18 16:20, Umesh Kalappa wrote:
>>>
>>> Hi everyone,
>>>
>>> we have our source base ,that was compiled for armv7 on gcc8.1 with
>>> soft-float and for following input
>>>
>>> a=0x0010000000000000
>>> b=0x0000000000000001
>>>
>>>   result = a - b ;
>>>
>>> we are getting the result as "0x000ffffffffffffe" and with
>>> -mhard-float (disabled the flush to zero mode ) we are getting the
>>> result as ""0x000fffffffffffff" as expected.
>>>
>>
>> please submit it as a bug report to bugzilla
>>
>>
>>> while debugging the soft-float code,we see that ,the compiler calls
>>> the intrinsic "__aeabi_dsub" with arm calling conventions i.e passing
>>> "a" in r0 and r1 registers and respectively for "b".
>>>
>>> we are investigating the routine "__aeabi_dsub" that comes from libgcc
>>> for incorrect result  and meanwhile we would like to know that
>>>
>>> a)do libgcc routines/intrinsic for float operations support or
>>> consider the subnormal values ? ,if so how we can enable the same.
>>>
>>> Thank you
>>> ~Umesh
>>>
>>

[-- Attachment #2: 86512.patch --]
[-- Type: application/octet-stream, Size: 801 bytes --]

*** ./libgcc/config/arm/ieee754-df.S	2018-07-17 14:57:47.618764934 +0530
--- ../../215/gcc-8.1.0/libgcc/config/arm/ieee754-df.S	2018-01-03 15:33:58.000000000 +0530
***************
*** 235,248 ****
  
  	@ Result must be shifted left and exponent adjusted.
  LSYM(Lad_a):
- 	cmp	r4,#0x0
- 	beq	1f
  	movs	ip, ip, lsl #1
  	adcs	xl, xl, xl
  	adc	xh, xh, xh
  	tst	xh, #0x00100000
  	sub	r4, r4, #1
! 1:	bne	LSYM(Lad_e)
  
  	@ No rounding necessary since ip will always be 0 at this point.
  LSYM(Lad_l):
--- 235,246 ----
  
  	@ Result must be shifted left and exponent adjusted.
  LSYM(Lad_a):
  	movs	ip, ip, lsl #1
  	adcs	xl, xl, xl
  	adc	xh, xh, xh
  	tst	xh, #0x00100000
  	sub	r4, r4, #1
! 	bne	LSYM(Lad_e)
  
  	@ No rounding necessary since ip will always be 0 at this point.
  LSYM(Lad_l):

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subnormal float support in armv7(with -msoft-float) for intrinsics
  2018-07-17  9:42     ` Umesh Kalappa
@ 2018-07-17  9:54       ` Ramana Radhakrishnan
  2018-07-17 10:31         ` Umesh Kalappa
  0 siblings, 1 reply; 6+ messages in thread
From: Ramana Radhakrishnan @ 2018-07-17  9:54 UTC (permalink / raw)
  To: Umesh Kalappa; +Cc: Szabolcs Nagy, gcc mailing list, nd

On Tue, Jul 17, 2018 at 10:41 AM, Umesh Kalappa
<umesh.kalappa0@gmail.com> wrote:
> Hi Nagy,
>
> Please  help us with your comments on the attached patch for the issue
> (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86512)
>
> Thank you and waiting for your inputs on the same.


Patches should be sent to gcc-patches@gcc.gnu.org with a clear
description of what the patch hopes to
achieve and why this is correct, how was it tested and if a regression
test needs to be added - add one please.
Please read https://gcc.gnu.org/contribute.html before sending a patch.

This is the wrong list to send patches to.

regards
Ramana
> ~Umesh
>
> On Fri, Jul 13, 2018 at 1:22 PM, Umesh Kalappa <umesh.kalappa0@gmail.com> wrote:
>> Thank you and issue  raised at
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86512
>>
>> ~Umesh
>>
>> On Thu, Jul 12, 2018 at 9:33 PM, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
>>> On 12/07/18 16:20, Umesh Kalappa wrote:
>>>>
>>>> Hi everyone,
>>>>
>>>> we have our source base ,that was compiled for armv7 on gcc8.1 with
>>>> soft-float and for following input
>>>>
>>>> a=0x0010000000000000
>>>> b=0x0000000000000001
>>>>
>>>>   result = a - b ;
>>>>
>>>> we are getting the result as "0x000ffffffffffffe" and with
>>>> -mhard-float (disabled the flush to zero mode ) we are getting the
>>>> result as ""0x000fffffffffffff" as expected.
>>>>
>>>
>>> please submit it as a bug report to bugzilla
>>>
>>>
>>>> while debugging the soft-float code,we see that ,the compiler calls
>>>> the intrinsic "__aeabi_dsub" with arm calling conventions i.e passing
>>>> "a" in r0 and r1 registers and respectively for "b".
>>>>
>>>> we are investigating the routine "__aeabi_dsub" that comes from libgcc
>>>> for incorrect result  and meanwhile we would like to know that
>>>>
>>>> a)do libgcc routines/intrinsic for float operations support or
>>>> consider the subnormal values ? ,if so how we can enable the same.
>>>>
>>>> Thank you
>>>> ~Umesh
>>>>
>>>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Subnormal float support in armv7(with -msoft-float) for intrinsics
  2018-07-17  9:54       ` Ramana Radhakrishnan
@ 2018-07-17 10:31         ` Umesh Kalappa
  0 siblings, 0 replies; 6+ messages in thread
From: Umesh Kalappa @ 2018-07-17 10:31 UTC (permalink / raw)
  To: Ramana Radhakrishnan; +Cc: Szabolcs Nagy, gcc, nd

Will do, thanks.
Thanks

On Tue, Jul 17, 2018, 3:24 PM Ramana Radhakrishnan <
ramana.gcc@googlemail.com> wrote:

> On Tue, Jul 17, 2018 at 10:41 AM, Umesh Kalappa
> <umesh.kalappa0@gmail.com> wrote:
> > Hi Nagy,
> >
> > Please  help us with your comments on the attached patch for the issue
> > (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86512)
> >
> > Thank you and waiting for your inputs on the same.
>
>
> Patches should be sent to gcc-patches@gcc.gnu.org with a clear
> description of what the patch hopes to
> achieve and why this is correct, how was it tested and if a regression
> test needs to be added - add one please.
> Please read https://gcc.gnu.org/contribute.html before sending a patch.
>
> This is the wrong list to send patches to.
>
> regards
> Ramana
> > ~Umesh
> >
> > On Fri, Jul 13, 2018 at 1:22 PM, Umesh Kalappa <umesh.kalappa0@gmail.com>
> wrote:
> >> Thank you and issue  raised at
> >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86512
> >>
> >> ~Umesh
> >>
> >> On Thu, Jul 12, 2018 at 9:33 PM, Szabolcs Nagy <szabolcs.nagy@arm.com>
> wrote:
> >>> On 12/07/18 16:20, Umesh Kalappa wrote:
> >>>>
> >>>> Hi everyone,
> >>>>
> >>>> we have our source base ,that was compiled for armv7 on gcc8.1 with
> >>>> soft-float and for following input
> >>>>
> >>>> a=0x0010000000000000
> >>>> b=0x0000000000000001
> >>>>
> >>>>   result = a - b ;
> >>>>
> >>>> we are getting the result as "0x000ffffffffffffe" and with
> >>>> -mhard-float (disabled the flush to zero mode ) we are getting the
> >>>> result as ""0x000fffffffffffff" as expected.
> >>>>
> >>>
> >>> please submit it as a bug report to bugzilla
> >>>
> >>>
> >>>> while debugging the soft-float code,we see that ,the compiler calls
> >>>> the intrinsic "__aeabi_dsub" with arm calling conventions i.e passing
> >>>> "a" in r0 and r1 registers and respectively for "b".
> >>>>
> >>>> we are investigating the routine "__aeabi_dsub" that comes from libgcc
> >>>> for incorrect result  and meanwhile we would like to know that
> >>>>
> >>>> a)do libgcc routines/intrinsic for float operations support or
> >>>> consider the subnormal values ? ,if so how we can enable the same.
> >>>>
> >>>> Thank you
> >>>> ~Umesh
> >>>>
> >>>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-07-17 10:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-12 15:20 Subnormal float support in armv7(with -msoft-float) for intrinsics Umesh Kalappa
2018-07-12 16:03 ` Szabolcs Nagy
2018-07-13  7:53   ` Umesh Kalappa
2018-07-17  9:42     ` Umesh Kalappa
2018-07-17  9:54       ` Ramana Radhakrishnan
2018-07-17 10:31         ` Umesh Kalappa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).