<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">I checked the compile of system.pp for
mipsel-embedded with the compile option -vc to see the status of
the defines in order to find out the correct way to get
SysResetFPU and SysInitFPU called.<br>
<br>
As mips.inc is parsed before generic.inc fpc_cpuunit must get
defined out because if not compilation breaks as the correct
versions are defined later in generic.inc.<br>
<br>
I also saw a second call for initialization in
rtl/embedded/system.pp:<br>
<br>
{$ifdef FPC_HAS_FEATURE_FPU}<br>
{ Beware: The same code is executed from fpc_cpuinit, which is
included<br>
per-cpu unconditionally }<br>
SysResetFPU;<br>
if not(IsLibrary) then<br>
SysInitFPU;<br>
{$endif FPC_HAS_FEATURE_FPU}<br>
<br>
This place looks perfect, only thing is that I do not know the
meaning of FPC_HAS_FEATURE_FPU. <br>
<br>
If this means "System has FPU, do not care if it is hard ord soft
fpu" then I guess the way to do things would be to define
FPC_HAS_FEATURE_FPU together with FPC_HAS_FEATURE_SOFTFPU<br>
<br>
But what makes me struggle is that I also see a lot of occurences
of the define FPUNONE, so I guess my interpretation above is
wrong.<br>
<br>
I also did a complete grep for FPC_HAS_FEATURE_FPU<br>
<br>
find fpc-mipsel -type f -exec grep -H "FPC_HAS_FEATURE_FPU" {} \;<br>
<br>
./rtl/embedded/system.pp:{$ifdef FPC_HAS_FEATURE_FPU}<br>
./rtl/embedded/system.pp:{$endif FPC_HAS_FEATURE_FPU} <br>
<br>
and it is only used in ./rtl/embedded/system.pp, <br>
<br>
could the solution be as simple as to <b>replace
FPC_HAS_FEATURE_FPU with FPC_HAS_FEATURE_SOFTFPU</b> ?<br>
<br>
puzzled,<br>
<br>
Michael<br>
<br>
<br>
Am 09.09.14 um 13:32 schrieb Sergei Gorelkin:<br>
</div>
<blockquote cite="mid:540EE539.7010109@mail.ru" type="cite">09.09.2014
14:33, Michael Ring пишет:
<br>
<blockquote type="cite">Sergei, I have reworked the patch based on
your comment:
<br>
<br>
<a class="moz-txt-link-freetext" href="http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=28634">http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=28634</a>
<br>
<br>
Do you think this is solved better now?
<br>
<br>
</blockquote>
No, my point was that routines SysInitFPU and SysResetFPU from
inc/generic.inc must be called instead of ones in mips/mips.inc.
Therefore changes to fpc_cpuinit aren't necessary.
<br>
<br>
Regards,
<br>
Sergei
<br>
<br>
_______________________________________________
<br>
fpc-devel maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>
<br>
</blockquote>
<br>
</body>
</html>