qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] softfloat: m68k: infinity is a valid encoding


From: KONRAD Frederic
Subject: Re: [PATCH 1/2] softfloat: m68k: infinity is a valid encoding
Date: Wed, 29 Apr 2020 14:33:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0



Le 4/29/20 à 10:42 AM, Laurent Vivier a écrit :
Le 28/04/2020 à 19:17, KONRAD Frederic a écrit :
The MC68881 say about infinities (3.2.4):

"*For the extended precision format, the most significant bit of the
mantissa (the integer bit) is a don't care."

https://www.nxp.com/docs/en/reference-manual/MC68881UM.pdf

As we use 68040 I refer to:

https://www.nxp.com/files-static/archives/doc/ref_manual/M68000PRM.pdf


[...]


This is denormalized numbers and should generate an exception.

I tried something like that in the past:

https://patchew.org/QEMU/address@hidden/address@hidden/

Pierre tried recently:
https://patchew.org/QEMU/address@hidden/

Arg, yes that's almost the same!  Sorry Pierre I missed this one :(.


See "1.6.2 Denormalized Numbers" in M68000 FAMILY PROGRAMMER’S REFERENCE
MANUAL.

"Since the extended-precision data format has an explicit integer bit, a
number can be formatted with a nonzero exponent, less than the maximum
value, and a zero integer bit. The IEEE 754 standard does not define a
zero integer bit. Such a number is an unnormalized number. Hardware does
not directly support denormalized and unnormalized numbers, but
implicitly supports them by trapping them as unimplemented data types,
allowing efficient conversion in software."

But m68k FPU exceptions are not currently implemented in QEMU.

Hmm ok, I don't have any m68k with an FPU at hand for testing.  I just tested
with an other simulator and it seems to trap when I load the value in the
register.  So I'm probably chasing the wrong bug here.

Thanks for the tips Laurent!
Fred


Thanks,
Laurent




reply via email to

[Prev in Thread] Current Thread [Next in Thread]