lkml.org 
[lkml]   [1997]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Kernels 2.1 with 386DX/387 IRQ13 PC boxes


On Wed, 29 Oct 1997, Richard B. Johnson wrote:

> On Wed, 29 Oct 1997, C. Scott Ananian wrote:
>
> > On Tue, 28 Oct 1997 root <root@mangue.ibm.net> wrote:
> >
> > > Now my question : How to test it? How to generate an IRQ13 interrupt?
>
> main() { double zero=0.0 ; double one=1.0; one /= zero; }
>
>

You first have to unmask FP exceptions. By default they are all masked,
and you will never get any interrupt, as you can check with the following
simple code:

main() {
unsigned short cw;
asm("fstcw %0": "=m" (cw):);
printf("Initial FPU CW:%x\n", cw);
}

gives:

Initial FPU CW: 37f

Gabriel.

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.071 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site