juha.riihim...@nokia.com wrote:
Hi,
Thanks for the testing. I fixed all of the issues found by your test programs
except:
Great! This is very good news. Please look at my comments below regarding
specific issues.
- vmull.p8 is not implemented in QEMU.
So seems this is now the only NEON instruction variant left that QEMU doesn't
handle.
- vrecpe/vrsqrte returns exact reciprocal/root in QEMU instead of estimate.
A simple algorithm used in hardware is described in the ARMv7 ARM* (see function
'recip_estimate' on page A2-59) but I don't think this is a big issue as exact
computations may be even better.
- Using subnormal floating point input values yields wrong results (this is
visible in your vceq/vcgt/vcle tests against zero), I guess this would need to
be corrected in the softfloat library which QEMU uses.
This is actually a "Flush-to-zero" feature which is always on for NEON
instructions (see FZ field description of FPSCR in A2.6.4 chapter of ARMv7 ARM).
Before attempting to perform an action on the floating-point data NEON first
checks if it is close to zero (zero exponent, bits 23-30 for F32, see FPUnpack
function at page A2-48) and behaves as if it was zero if the check succeeds.
- vqdmlsl yields different results for some specific input values, however I
think QEMU is producing correct results. For example,
1431655765-(2*-32768*-32768)=-715827883 but your reference hardware results say
it should be -715827882.
From what I understand hardware gets such result because saturation occurs on
the (2*-32768*-32768) step. The result is not 0x80000000 as expected but
because of overflow is set as the largest 32-bit signed integer 0x7FFFFFFF. It
seems that QEMU just doesn't perform saturation (in this particular case at least).
Anyway, many thanks for the testing you did and especially for posting the test
programs as well. All these fixes along with many others are now in the Maemo
QEMU repository. We'll try to make a new set of ARM emulation patches against
upstream QEMU in the near future.
We'll be waiting for this. Thanks a lot for your work.
Regards,
Juha
* I am referring to the "ARM Architecture Reference Manual, ARMv7-A and ARMv7-R
edition" version ARM_2009_Q3.
Regards,
Dmitry