Subject: port-mips/35326: wrong FPU exception
To: None <port-mips-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <martin@duskware.de>
List: netbsd-bugs
Date: 12/27/2006 00:40:00
>Number:         35326
>Category:       port-mips
>Synopsis:       wrong FPU exception
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    port-mips-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 27 00:40:00 +0000 2006
>Originator:     Martin Husemann
>Release:        NetBSD 4.99.7
>Organization:
>Environment:
System: NetBSD tequila-sunrise.duskware.de 4.99.7 NetBSD 4.99.7 (GENERIC32_IP3x) #6: Wed Dec 27 00:05:39 CET 2006 martin@night-porter.duskware.de:/usr/src/sys/arch/sgimips/compile/GENERIC32_IP3x sgimips
Architecture: mipseb
Machine: sgimips
>Description:

The regress/lib/libc/ieeefp/except test runs a function

/* trip underflow */
static void
ufl()
{

	x = tiny * tiny;
}

which is supposed (tiny is FLT_MIN or DBL_MIN) to trigger a SIGFPE with
code = FPE_FLTUND - but causes a FPE_INTDIV code. This probably happens
via fpemul_trapsignal(), which hardcodes a code of 1 (instead of
mips_fpuexcept, which does the right thing).

>How-To-Repeat:
s/a

>Fix:
n/a