<font size=2 face="sans-serif">Hi, Jiri.</font>
<br>
<br><font size=2 face="sans-serif">You are right that this is the default
(see quick test output below). If I understood him corectly, though, I
think that Sebastian is saying that the default settings of the Leon3 BSP
compilation ("-msoft-float " - see "c/src/lib/libbsp/sparc/leon3/make/custom/leon3.cfg")
do not allow me to use "-mhard-float" in my application code.
The documentation seems to contradict him, stating that I should be able
to, and that "deferred floating point context switch" is a feature,
not a bug). I will try his suggestion anyway - I patched the .cfg and am
currentlly building the BSP with -mhard-float - will report back whether
this solves the issue or not.</font>
<br>
<br><font size=2 face="sans-serif">$ cat foo.c</font>
<br><font size=2 face="sans-serif">void foo()</font>
<br><font size=2 face="sans-serif">{</font>
<br><font size=2 face="sans-serif"> float a=1;</font>
<br><font size=2 face="sans-serif"> float b;</font>
<br><font size=2 face="sans-serif"> b= a*a;</font>
<br><font size=2 face="sans-serif">}</font>
<br>
<br><font size=2 face="sans-serif">$ sparc-rtems4.11-gcc -c foo.c</font>
<br>
<br><font size=2 face="sans-serif">$ sparc-rtems4.11-objdump -S foo.o</font>
<br>
<br><font size=2 face="sans-serif">Disassembly of section .text:</font>
<br><font size=2 face="sans-serif">00000000 <foo>:</font>
<br><font size=2 face="sans-serif"> ...</font>
<br><font size=2 face="sans-serif"> 1c: 91 a2 49 28
fmuls %f9, %f8, %f8</font>
<br><font size=2 face="sans-serif"> ...</font>
<br>
<br>
<br><font size=2 face="sans-serif"><b>European Space Agency (via HE Space)</b></font>
<br><font size=2 color=#000080 face="sans-serif">Thanassis Tsiodras</font>
<br><font size=2 face="sans-serif">Real-time Embedded Software Engineer
</font>
<br><font size=2 face="sans-serif">System, Software and Technology Department</font>
<br>
<br><font size=2 face="sans-serif"><b>ESTEC</b></font>
<br><font size=2 face="sans-serif">Keplerlaan 1, PO Box 299</font>
<br><font size=2 face="sans-serif">NL-2200 AG Noordwijk, The Netherlands</font>
<br><font size=2 face="sans-serif">Athanasios.Tsiodras@esa.int | </font><a href=www.esa.int><font size=2 color=blue face="sans-serif">www.esa.int</font></a>
<br><font size=2 face="sans-serif">T +31 71 565 5332</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">"Jiri Gaisler"
<jiri@gaisler.se></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">"Sebastian Huber"
<sebastian.huber@embedded-brains.de>, "RTEMS List" <users@rtems.org></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Cc:
</font><font size=1 face="sans-serif">software@gaisler.com</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">07/02/2016 10:59</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">Re: Crash under
sparc/rtems-4.11 when compiling with FPU</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by:
</font><font size=1 face="sans-serif">"users"
<users-bounces@rtems.org></font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>On 07/02/16 07:41, Sebastian Huber wrote:<br>
> Hello Athanasios,<br>
><br>
> it was always a miracle to me how you are supposed to use the leon2/leon3
BSPs with a FPU. If you want to use the FPU, then the BSP must be built
with the -mhard-float option, otherwise the FPU support is not enabled
in the operating system support. In addition the application configuration
must be compiled with exactly the same compiler flags as the BSP, otherwise
it will generate a corrupt configuration.<br>
><br>
> I think we need leon2fp and leon3fp BSPs, which use -mhard-float.<br>
><br>
<br>
Isn't -mhard-float the default setting in gcc? -msoft-float is used to<br>
force software emulation of the FPU, otherwise FPU instructions are<br>
issued by default.<br>
<br>
Jiri.<br>
_______________________________________________<br>
users mailing list<br>
users@rtems.org<br>
</font></tt><a href=http://lists.rtems.org/mailman/listinfo/users><tt><font size=2>http://lists.rtems.org/mailman/listinfo/users</font></tt></a><tt><font size=2><br>
</font></tt>
<br><PRE>This message and any attachments are intended for the use of the addressee or addressees only.
The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its
content is not permitted.
If you received this message in error, please notify the sender and delete it from your system.
Emails can be altered and their integrity cannot be guaranteed by the sender.
Please consider the environment before printing this email.
</PRE>