<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 21 Mar 2020, 10:29 Eshan Dhawan, <<a href="mailto:eshandhawan51@gmail.com">eshandhawan51@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>I went through the FreeBSD and NetBSD sources for implementation <br></div>In FreeBSD there is an architecture-specific implementation with different header file for each architecture it supports .<br></div>Whereas in NetBSD there is a single fenv.h defined but each architecture has its own C file to implement the functions.<br></div>Also FreeBSD has soft-float for ARM <br></div><div>So, I think FreeBSD would be a better option.<br></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Look into this discussion on mail thread: </div><div dir="auto"><a href="https://sourceware.org/legacy-ml/newlib/2017/msg00818.html">https://sourceware.org/legacy-ml/newlib/2017/msg00818.html</a><br></div><div dir="auto"><br></div><div dir="auto">and this patch series on newlib mailing list. </div><div dir="auto"><br></div><div dir="auto"><a href="https://sourceware.org/legacy-ml/newlib/2019/msg00418.html">https://sourceware.org/legacy-ml/newlib/2019/msg00418.html</a> .</div><div dir="auto"><br></div><div dir="auto">It will help to understand the fenv-stub code. </div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 21, 2020 at 2:37 AM Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank" rel="noreferrer">joel@rtems.org</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 dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 20, 2020 at 3:33 PM Eshan Dhawan <<a href="mailto:eshandhawan51@gmail.com" target="_blank" rel="noreferrer">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">thanks, dr Joel<br><br><div>I had gone through the musl-libc library but it doesn't have much architecture specific support for ARM as well as AARCH64 <br></div><div>It has support for s390x, m68k, powerpc64<br></div></div></blockquote><div><br></div><div>This type of evaluation is important. The architecture may be supported in only one implementation or one may be more complete than another. </div><div><br></div><div>Ignoring the license requirements of course. </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><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 21, 2020 at 1:32 AM Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank" rel="noreferrer">joel@rtems.org</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 dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 20, 2020 at 2:43 PM Eshan Dhawan <<a href="mailto:eshandhawan51@gmail.com" target="_blank" rel="noreferrer">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><div><div>What would be the preferred source to port fenv.h to ARM and AARCH64 <br></div>its implementation is present in both FreeBSD as well AS NetBSD <br></div>-> ARM <br></div>---FreeBSD Source <br># <a href="https://github.com/freebsd/freebsd/tree/master/lib/msun/arm" style="text-decoration:none" id="m_-2663814603707344878gmail-m_-4729989265313573442gmail-m_7793848973158610204gmail-m_-150435429407172625gmail-m_4745620444899719269gmail-docs-internal-guid-da84d445-7fff-21ce-cc7a-4f349dac9a65" target="_blank" rel="noreferrer"><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><br></div><div>---NetBSD Source <br></div><div># <a href="https://github.com/NetBSD/src/tree/trunk/lib/libm/arch/arm" target="_blank" rel="noreferrer">https://github.com/NetBSD/src/tree/trunk/lib/libm/arch/arm</a></div><div><br></div><div>->AARCH64</div><div>---FreeBSD Source <br></div><div>#<a href="https://github.com/freebsd/freebsd/tree/master/lib/msun/aarch64" target="_blank" rel="noreferrer"> https://github.com/freebsd/freebsd/tree/master/lib/msun/aarch64</a></div><div>---NetBSD Source <br></div><div># <a href="https://github.com/NetBSD/src/tree/trunk/lib/libm/arch/aarch64" target="_blank" rel="noreferrer">https://github.com/NetBSD/src/tree/trunk/lib/libm/arch/aarch64<br></a></div></div></blockquote><div><br></div><div>Don't forget MUSL-C Library which has a lot of architectures and </div><div>is appropriately licensed.</div><div><br></div><div><a href="https://git.musl-libc.org/cgit/musl/tree/src/fenv" target="_blank" rel="noreferrer">https://git.musl-libc.org/cgit/musl/tree/src/fenv</a></div><div><br></div><div>I think our the order is going to be FreeBSD, NetBSD, then other places.</div><div><br></div><div>The code drops into newlib's libm in a particular way which may require</div><div>some refactoring. fenv.h is shared across all ports and machine/fenv.h is</div><div>where port code goes. There must be an architecture specific file for each</div><div>method. But the entire implementation could go in one file and the others</div><div>be stubs. The i386 does this.</div><div><br></div><div>--joel </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><a href="https://github.com/NetBSD/src/tree/trunk/lib/libm/arch/aarch64" target="_blank" rel="noreferrer"><br><br></a></div><div><br></div><div>Thanks</div><div>-Eshan <br></div></div>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div></div>