The IAR port of TF-M is mostly done and all regression tests runs OK, with the exception of some of the QCBOR tests.

I've analyzed the issue to be the NaN tests to not follow the Arm run-time ABI.

The issue is with doubles where some of the tested NaN:s only have set bits in the lower 32 bits of the mantissa.

From https://developer.arm.com/docs/ihi0043/e/run-time-abi-for-the-arm-architecture-abi-2018q4-documentation
---

If NaNs are supported, it is only required to recognize, process, and convert those values with at least one bit set in the 20 most significant bits of the mantissa. Remaining bits should be zero and can be ignored. When a quiet NaN of one precision is converted to a quiet of the other precision, the most significant 20 bits of the mantissa must be preserved. Consequently:

---

The IAR toolchain only checks the upper 32 bits for NaN / INF and the double precision NaN tests misinterprets some of the hand crafted NaN:s as INF.

How should TF-M handle this?

Thomas

--

Thomas Törnblom, Product Engineer
IAR Systems AB
Box 23051, Strandbodgatan 1
SE-750 23 Uppsala, SWEDEN
Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01
E-mail: thomas.tornblom@iar.com Website: www.iar.com
Twitter: www.twitter.com/iarsystems