qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [ARM - FCVT inst] : Difference in calculated value
@ 2014-08-14  7:37 Gaurav Sharma
  2014-08-16 19:06 ` Gaurav Sharma
  0 siblings, 1 reply; 8+ messages in thread
From: Gaurav Sharma @ 2014-08-14  7:37 UTC (permalink / raw)
  To: QEMU-DEVEL

[-- Attachment #1: Type: text/plain, Size: 835 bytes --]

I am trying to execute a 'fcvt' instruction for conversion from single
precision to half precision value.
with the following values :

[Instrn]
fcvt h16 s25

[register values]
SIMD register [25] = 0x9EA82A22AB98FBA8L
FPCR = 0x40ae2f54 [with according mask removing the UFE and other
unnecessary bit]

As per the softfloat algorithm, if the exp is < -10, we return a signed /
unsigned zero. In this case 0x8000 is the value set in h16.

However,  when trying to match the same with arm implementation, the value
for h16 comes out as 0x8001.
While trying to map the softfloat implementation with arm manual, depending
upon rounding mode  it seems we can get both 0x8000 and 0x8001.

I am still in the process of checking the algorithm for conversion in
softfloat, but in the arm manual, i do not see we returning a zero.

Thanks,
Gaurav

[-- Attachment #2: Type: text/html, Size: 1128 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-08-22 16:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-14  7:37 [Qemu-devel] [ARM - FCVT inst] : Difference in calculated value Gaurav Sharma
2014-08-16 19:06 ` Gaurav Sharma
2014-08-16 19:44   ` Peter Maydell
2014-08-18 21:04     ` Gaurav Sharma
2014-08-18 21:12       ` Peter Maydell
2014-08-19 12:39         ` Gaurav Sharma
2014-08-22 14:28           ` Peter Maydell
2014-08-22 16:27             ` Gaurav Sharma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).