Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(revision 262850)
+++ gcc/testsuite/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2018-07-18  Umesh Kalappa <umesh.kalappa0@gmail.com>
+
+	PR libgcc/86512
+	* gcc.target/arm/pr86512.c :New test.
+
 2018-07-18  Richard Biener  <rguenther@suse.de>
 
 	PR debug/86523
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"
+
+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.kalappa0@gmail.com>
+	
+	PR libgcc/86512 
+	* config/arm/ieee754-df.S :Don't normalise the denormal result.
+
+
 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
 
 	* configure: Regenerated.
Index: libgcc/config/arm/ieee754-df.S
===================================================================
--- 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)
 	cmp	xh, #0x00200000
 	bcc	LSYM(Lad_e)
