From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <1f3d67b62e3e207b0f98fb619e434144.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199704221449.KAA22938@shell.ncm.com> Date: Tue, 22 Apr 1997 10:49:42 -0400 From: Randy Chapman Subject: Re: SIGFPE -- the answer In article <199704220051.RAA05084@panda.mosberger> you wrote: : [I'm replying to a mail that appeared in the axp-list mailing list archive. : I may have missed some follow-ups and apologize if this is an old hat...] : : Jim> Here's da goods: To read and write the floating-point exception : Jim> enable bits, you can use the following routines: : : Richard> Linux follows DEC in calling those functions ieee_get_fp_control() : Richard> and ieee_set_fp_control() respectively. : : Yes, those routines are for DEC Unix compatibility (not binary : compatibility, but to make it easier to port DEC Unix source code to : Linux/Alpha). However, there is also the setfpucw() call which is : there for Linux/x86 compatibility. : ... : : For the kernel that is true. For Linux application, the behaviour _should_ : be the same as for Linux/x86. glibc's init-first.c has the following : call: : : /* Set the FPU control word to the proper default value. */ : __setfpucw (__fpu_control); : : This is intented to establish the same environment as under Linux/x86 : (modulo extendend precision). But I think it would be an exaggeration : to claim that this code has been thoroughly tested, so it wouldn't : surprise me if things do not fully work as intended. Hrm. The ieee_set_fp_control() thing *definitely* changed the behavior of the Java runtime for the better. I am highly suspicious that __setfpucw() doesn't work at all. I tried setting something with it and reading the cw back in and I don't recall that it had even changed =( thanks, --randy -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com