On 18/07/18 13:31, Umesh Kalappa wrote:
Hi Nagy/Ramana,
Please help us to review the attached patch and do let me know your comments .
No regress in the gcc.target suite for arm target.
have you submitted a copyright assignment form yet?
https://gcc.gnu.org/contribute.html
Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog (revision 262850)
+++ gcc/testsuite/ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2018-07-18 Umesh Kalappa<umesh.kalap...@gmail.com>
+
+ PR libgcc/86512
+ * gcc.target/arm/pr86512.c :New test.
+
normally changelog should be part of the mail message and
not included in the diff as it will conflict with other changes
and the whitespace formatting around : and before the email
address is wrong.
Index: gcc/testsuite/gcc.target/arm/pr86512.c
===================================================================
--- gcc/testsuite/gcc.target/arm/pr86512.c (nonexistent)
+++ gcc/testsuite/gcc.target/arm/pr86512.c (working copy)
@@ -0,0 +1,30 @@
+/* { dg-do run } */
+/* { dg-options "-O0 -msoft-float" } */
+
+#include<stdlib.h>
+#include<stdint.h>
+#define PRIx64 "llx"
this macro is not needed.
+
+typedef union
+{
+ double d;
+ uint64_t i;
+} u;
+
+int main()
+{
+ u smallestPositiveNormal, smallesPositiveSubnormal, expectedResult, result;
+
+ smallesPositiveSubnormal.i = 1;
+
+ smallestPositiveNormal.i = 0x0010000000000000;
+ expectedResult.i = 0x000fffffffffffff;
+ result.d = smallestPositiveNormal.d - smallesPositiveSubnormal.d;
+
+
+ if (result.i != expectedResult.i)
+ abort();
+
+ return 0;
+}
+
Index: libgcc/ChangeLog
===================================================================
--- libgcc/ChangeLog (revision 262850)
+++ libgcc/ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2018-07-18 Umesh Kalappa<umesh.kalap...@gmail.com>
+
+ PR libgcc/86512
+ * config/arm/ieee754-df.S :Don't normalise the denormal result.
+
same as above.
--- libgcc/config/arm/ieee754-df.S (revision 262850)
+++ libgcc/config/arm/ieee754-df.S (working copy)
@@ -203,8 +203,11 @@
#endif
@ Determine how to normalize the result.
+ @ if result is denormal i.e (exp)=0,then don't normalise the result,
LSYM(Lad_p):
cmp xh, #0x00100000
+ blt LSYM(Lad_e)
+ cmp xh, #0x00100000
bcc LSYM(Lad_a)
i think you don't need to retest the same thing,
blt won't clobber the condition codes.
as for the technical contents, sorry i have not
reviewed it in detail, the blt might not be the
right check since it's signed compare..
(but i'm not even sure why is there an assembly
implementation for this, generic c code should do
a good job.)
cmp xh, #0x00200000
bcc LSYM(Lad_e)