mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-25 03:58:30 +02:00
* compiler/mips/cpuinfo.pas: removed "FPU_" prefixes from FPU names, not necessary because compiler inserts one itself.
* rtl/embedded/system.pp: removed (commented out) FPU initialization from initialization of system unit, was dead code anyway because FPC_HAS_FEATURE_FPU is never defined and "feature FPU" does not exist. * rtl/mips/*.inc: don't compile FPU instructions if compiling RTL with -CfNONE or -CfSOFT (however, handling these switches for MIPS targets in compiler needs further fixing). git-svn-id: trunk@28670 -
This commit is contained in:
parent
e5c104ca96
commit
f85a8159ef
@ -87,7 +87,7 @@ Const
|
||||
|
||||
fputypestr : array[tfputype] of string[9] = ('',
|
||||
'SOFT',
|
||||
'FPU_MIPS2','FPU_MIPS3'
|
||||
'MIPS2','MIPS3'
|
||||
);
|
||||
|
||||
{ abi strings as accepted by
|
||||
|
@ -211,13 +211,12 @@ var
|
||||
{$endif FPC_HAS_FEATURE_STACKCHECK}
|
||||
|
||||
begin
|
||||
{$ifdef FPC_HAS_FEATURE_FPU}
|
||||
{ Beware: The same code is executed from fpc_cpuinit, which is included
|
||||
per-cpu unconditionally }
|
||||
{ FPU (hard or soft) is initialized from fpc_cpuinit, which is included
|
||||
per-cpu unconditionally.
|
||||
SysResetFPU;
|
||||
if not(IsLibrary) then
|
||||
SysInitFPU;
|
||||
{$endif FPC_HAS_FEATURE_FPU}
|
||||
}
|
||||
|
||||
{$ifdef FPC_HAS_FEATURE_CONSOLEIO}
|
||||
IsConsole := TRUE;
|
||||
|
@ -55,6 +55,7 @@ const
|
||||
|
||||
fpu_all_bits = fpu_enable_mask or fpu_flags_mask or fpu_cause_mask or fpu_rounding_mask;
|
||||
|
||||
{$if defined(FPUMIPS2) or defined(FPUMIPS3)}
|
||||
{$define FPC_SYSTEM_HAS_SYSINITFPU}
|
||||
procedure SysInitFPU;
|
||||
begin
|
||||
@ -66,13 +67,16 @@ procedure SysInitFPU;
|
||||
procedure SysResetFPU;
|
||||
begin
|
||||
end;
|
||||
{$endif FPUMIPS2 or FPUMIPS3}
|
||||
|
||||
|
||||
procedure fpc_cpuinit;
|
||||
begin
|
||||
{$ifndef FPUNONE}
|
||||
SysResetFPU;
|
||||
if (not IsLibrary) then
|
||||
SysInitFPU;
|
||||
{$endif FPUNONE}
|
||||
end;
|
||||
|
||||
|
||||
|
@ -27,6 +27,7 @@ procedure fpc_longjmp(var s : jmp_buf;value:longint);assembler;nostackframe;[Pub
|
||||
lw $s7,jmp_buf.s7($a0)
|
||||
lw $fp,jmp_buf.fp($a0)
|
||||
lw $gp,jmp_buf.gp($a0)
|
||||
{$if defined(FPUMIPS2) or defined(FPUMIPS3)}
|
||||
lw $v0,jmp_buf._fcsr($a0)
|
||||
ctc1 $v0,$31
|
||||
lwc1 $f20,jmp_buf.f20($a0)
|
||||
@ -41,7 +42,7 @@ procedure fpc_longjmp(var s : jmp_buf;value:longint);assembler;nostackframe;[Pub
|
||||
lwc1 $f29,jmp_buf.f29($a0)
|
||||
lwc1 $f30,jmp_buf.f30($a0)
|
||||
lwc1 $f31,jmp_buf.f31($a0)
|
||||
|
||||
{$endif FPUMIPS2 or FPUMIPS3}
|
||||
// Put value into register $2 as in setjmp
|
||||
move $v0,$a1
|
||||
bne $a1,$zero,.L1
|
||||
@ -65,6 +66,7 @@ function fpc_setjmp(var S:jmp_buf):longint;assembler;nostackframe;[Public,alias:
|
||||
sw $s7,jmp_buf.s7($a0)
|
||||
sw $fp,jmp_buf.fp($a0)
|
||||
sw $gp,jmp_buf.gp($a0)
|
||||
{$if defined(FPUMIPS2) or defined(FPUMIPS3)}
|
||||
cfc1 $v0,$31
|
||||
sw $v0,jmp_buf._fcsr($a0)
|
||||
swc1 $f20,jmp_buf.f20($a0)
|
||||
@ -79,5 +81,6 @@ function fpc_setjmp(var S:jmp_buf):longint;assembler;nostackframe;[Public,alias:
|
||||
swc1 $f29,jmp_buf.f29($a0)
|
||||
swc1 $f30,jmp_buf.f30($a0)
|
||||
swc1 $f31,jmp_buf.f31($a0)
|
||||
{$endif FPUMIPS2 or FPUMIPS3}
|
||||
move $v0,$zero
|
||||
end;
|
||||
|
@ -17,7 +17,9 @@
|
||||
type
|
||||
jmp_buf=packed record
|
||||
ra,sp,s0,s1,s2,s3,s4,s5,s6,s7,fp,gp: longint;
|
||||
{$if defined(FPUMIPS2) or defined(FPUMIPS3)}
|
||||
_fcsr,f20,f21,f22,f23,f24,f25,f26,f27,f28,f29,f30,f31: longint;
|
||||
{$endif FPUMIPS2 or FPUMIPS3}
|
||||
end;
|
||||
Pjmp_buf=^jmp_buf;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user