Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Mar 1999 11:52:20 -0700
From:      Nate Williams <nate@mt.sri.com>
To:        SHUDO Kazuyuki <shudoh@muraoka.info.waseda.ac.jp>
Cc:        Nate Williams <nate@mt.sri.com>, freebsd-java@FreeBSD.ORG
Subject:   Re: jre1.1.7 core dump on FreeBSD 3.1 (intel)
Message-ID:  <199903161852.LAA05728@mt.sri.com>
In-Reply-To: <199903110420.NAA03845@cafe.muraoka.info.waseda.ac.jp>
References:  <199903110107.SAA12226@mt.sri.com> <199903110420.NAA03845@cafe.muraoka.info.waseda.ac.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
> FreeBSD don't mask some floating point exceptions which
> are masked on initial state of x87. Overflow(OM),
> Devided by zero(ZM) and illegal operation(IM) aren't
> masked.
> 
> Does JDK for FreeBSD change these FPU exception masks
> from default value?
> 
> We can investigate the states of the masks by the
> following code:
> 
> #include <stdio.h>
> int main(int argc, char **argv) {
>   unsigned short cw;
>   __asm__("fnstcw %0" : "=m"(cw));
>   printf("FPU control word: 0x%04x\n", (int)cw);
>   return 0;
> }
> 
> The code shows FPU control word.
>   On linux:	0x037f
>   On FreeBSD:	0x1272

For what it's worth (this jumped out while I was working on Steve
Price's ELF patches to JDK1.1.7), the FPU mask in the JDK is set to
0x127f.  (See javasrc/src/freebsd/java/green_threads/src/context.c).

I'm not sure what Linux uses, but it may be similar.



Nate


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903161852.LAA05728>