Re: [hatari-devel] FPU update

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


> A question has raised while checking if all unnormals are caught
> before used for calculation: Theoretically it is possible to write an
> unnormal number to an FP register using FMOVEM. Then using that
> register as source (or destination for dyadic operations) will input
> an unnormal value to the arithmetic operation. At least that
> currently happens in emulation. I wonder how this is handled by real
> hardware. Does anybody know?
> 
> It could be tested by moving an unnormal number like: 0x40000000
> 0x08000000 0x00000000 to a register using FMOVEM and then applying
> some arithmetic operation (e.g. FADD) on it with the second operand
> being a normal number like 0x40000000 0x80000000 0x00000000.
> Furthermore it would be interesting if it makes a difference if the
> source or destination operand, or both operands are unnormal. In
> addition to the result it would be interesting if any exception bit
> is set (most likely operand error).

Quick test results:

FMOVEM does not do anything (as documented), FMOVEM to register and
FMOVEM from same register back to memory: same bit pattern.

Any arithmetic operation seems to normalize it automatically. I tried
FNEG, FABS, FADD (with another register containing zero), register
content was normalized even if it was source for FADD.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/