From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3e46146c294cafbb1628f26d5c5a0fd7.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199704220051.RAA05084@panda.mosberger> Date: Mon, 21 Apr 1997 17:51:59 -0700 From: David Mosberger-Tang Subject: Re: SIGFPE -- the answer [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. Richard> And to answer the question that came up elsewhere: those bits are Richard> on by default on Linux/Alpha because they are on by default on DU. 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. --david -- 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