Subject: Re: bin/33295: ieeefp/except regression test fails on soft-float
To: None <gnats-bugs@netbsd.org>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: netbsd-bugs
Date: 04/20/2006 13:41:50
This is a multipart MIME message.

--==_Exmh_54691082924720
Content-Type: text/plain; charset=us-ascii


simonb@wasabisystems.com said:
> the softfloat library uses raise(3) to send SIGFPE

How about the appended patch?
best regards
Matthias



--==_Exmh_54691082924720
Content-Type: text/plain ; name="fpexc.txt"; charset=us-ascii
Content-Description: fpexc.txt
Content-Disposition: attachment; filename="fpexc.txt"

Index: Makefile
===================================================================
RCS file: /cvsroot/src/regress/lib/libc/ieeefp/except/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile	18 Sep 2002 05:41:38 -0000	1.5
+++ Makefile	20 Apr 2006 11:37:31 -0000
@@ -4,6 +4,11 @@
 
 PROG=		except
 
+.include <bsd.own.mk>
+.if defined(MKSOFTFLOAT) && (${MKSOFTFLOAT} != "no")
+CPPFLAGS+=	-DSOFTFLOAT
+.endif
+
 regress: ${PROG}
 	./${PROG}
 
Index: except.c
===================================================================
RCS file: /cvsroot/src/regress/lib/libc/ieeefp/except/except.c,v
retrieving revision 1.9
diff -u -r1.9 except.c
--- except.c	25 Mar 2004 15:12:42 -0000	1.9
+++ except.c	20 Apr 2006 11:37:31 -0000
@@ -161,7 +161,11 @@
 			BARRIER();
 		}
 		assert(signal_caught == 1);
-		assert(sicode == ops[i].sicode);
+		assert(sicode == ops[i].sicode
+#ifdef SOFTFLOAT /* sent by raise(3) */
+			|| sicode == SI_USER
+#endif
+		);
 		signal_caught = 0;
 	}
 

--==_Exmh_54691082924720--