Re: math co-processor exceptions

From: Scott J. McCaughrin (spamtrap_at_crayne.org)
Date: 10/25/04


Date: Mon, 25 Oct 2004 07:32:53 +0000 (UTC)

Hi, Florian.
Thanks for your input. My comments follow.

Florian Liebig <spamtrap@crayne.org> wrote:
: Hello mister.

: "Scott J. McCaughrin" schrieb:

: > Any good examples of math co-processor exception-handling?
: > Should include unmasking of the lo-order 6 flags in the
: > control word (P,U,O,D,Z,I) so that, e.g., sqrt(-1.0) will
: > set trigger "Invalid Operation" and transfer control to
: > the appropriate exception-handler (INT 02h in DOS?).
: >
: > Thanks.

Sorry, but this isn't about emulation.

: when emulating, you haven't a control word. even that must be emulated
: since the control word do only exist in the 80x87.
: when you're good in programming, the only thing you have to do is check
: COPRO-flag and set COPRO-EMUlating flag. so, every time an extended
: mnemonic structure is fetched, the CPU generates an IRQ that is mostly
: redirected to PIC2->MATH_EXT (IRQ13 or 14).

Trouble is, I don't want to be checking exception flags after every single
floating-point operation -- I want the machine to do that for me, and
automatically cause invocation of an exception-handler when the unmasked
exception is raised in the FPU status word.

: you have to design them (emulators) corresponding to the kind of
: environment you want it to run in stable- as they are REAL/PROT.
: environment.
: but in every case, the emulator can read out the command from the stack
: and calculate the result on it's own; what you have to do is look up
: CS:IP / CS:EIP from STACK, get that command and jump to a code in your
: handler that does the following process(es).
: but if you only want to "unmask" a special command of the command set of
: the coprocessor, that even works..

: let me hear from you, if you like.
: Florian.



Relevant Pages

  • Re: Motorcycle Race Accident ................dramatic video footage
    ... red-flagged the race. ... What I can tell you is that not getting the right flags up ... As a cornerworker, your order of priorities ... come from the control station and the red flags must go up everywhere ...
    (rec.motorcycles.racing)
  • displaying bitflags as enumerated text and not int
    ... Im trying to expose one of its internal properties so the user can set ... public String DWFlags { ... in the control field. ... I also want the user to be able to enter the flags as the above text, ...
    (microsoft.public.dotnet.languages.csharp)
  • Is this possible in VB.Net?
    ... Controlling Download and Execution ... The WebBrowser Control gives you control over what it downloads, displays, ... if these flags are set. ...
    (microsoft.public.dotnet.languages.vb)
  • Is this possible in VB.Net?
    ... Controlling Download and Execution ... The WebBrowser Control gives you control over what it downloads, displays, ... if these flags are set. ...
    (microsoft.public.dotnet.general)
  • Re: DMA transfer size limited on MPC8272
    ... Not sure about the internal H/W DMA buffer size, but the CPM's IDMA ... Emulation still available, were you have control on this parameter. ... David Gabbay ...
    (comp.sys.powerpc.tech)