<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 7, 2020 at 1:33 PM Eshan Dhawan <<a href="mailto:eshandhawan51@gmail.com">eshandhawan51@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Hello everyone,<br></div>This the tread to discuss adding fenv support for ARM architecture in newlib.<br><br></div>Link to previous thread: <a href="https://lists.rtems.org/pipermail/devel/2020-March/058473.html" target="_blank">https://lists.rtems.org/pipermail/devel/2020-March/058473.html</a><br><div><br></div><div>---FreeBSD Source </div><div><span><div># <a href="https://github.com/freebsd/freebsd/tree/master/lib/msun/arm" style="text-decoration:none" id="gmail-m_-4061233678676955460gmail-m_-9039115123886165558gmail-m_4745620444899719269gmail-docs-internal-guid-da84d445-7fff-21ce-cc7a-4f349dac9a65" target="_blank"><span style="font-size:12pt;font-family:"Liberation Serif";color:rgb(17,85,204);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">https://github.com/freebsd/freebsd/tree/master/lib/msun/arm</span></a></div><div># <a href="https://github.com/freebsd/freebsd/blob/master/sys/arm/include/ieeefp.h" target="_blank">https://github.com/freebsd/freebsd/blob/master/sys/arm/include/ieeefp.h</a></div><div>---NetBSD Source <br></div><div># <a href="https://github.com/NetBSD/src/tree/trunk/lib/libm/arch/arm" target="_blank">https://github.com/NetBSD/src/tree/trunk/lib/libm/arch/arm</a></div><div><br></div><div>--- Musl has no implementation for fenv support for ARM  in it <br></div><div><br></div><div>After going through the implementations both FreeBSD and NetBSD have a stub implementation.<br></div><div>But then FreeBSD implementation seems to be more portable compared to that in NetBSD.<br><br></div><div>Should I start porting it from FreeBSD?<br></div><div>And which ARM BSP should I use for testing the changes?<br></div><div>Currently, I have xilinx_zynq_a9_qemu build <br></div></span></div></div></blockquote><div><br></div><div>I think the FreeBSD implementation is the one to use. It looks to support hard and soft floating point implementations. </div><div><br></div><div>I think the fenv.h file there will have to be worked on so some of the contents go into sys or machine/fenv.h. There is a portable fenv.h.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><span><div><br></div><div>There would also be a requirement to discuss where to place the files in Newlib.</div></span></div></div></blockquote><div><br></div><div>Not much to discuss. It should go into newlib-cygwin/newlib/libm/machine/arm.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><span><div><br></div><div>Thanks <br></div><div>-Eshan<br></div><div><br></div></span></div></div>
</blockquote></div></div>