mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-21 21:41:37 +02:00
* only compile cs_fp_emulation support when cpufpuemu is defined
* define cpufpuemu for m68k only
This commit is contained in:
parent
2e864d0cee
commit
cab4c8879f
@ -52,9 +52,19 @@
|
||||
{$define cpu64bit}
|
||||
{$undef cpuflags}
|
||||
{$endif alpha}
|
||||
|
||||
{ FPU Emulator support }
|
||||
{$ifdef m68k}
|
||||
{$define cpufpemu}
|
||||
{$endif m68k}
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.13 2002-10-16 19:01:43 peter
|
||||
Revision 1.14 2002-12-06 16:56:57 peter
|
||||
* only compile cs_fp_emulation support when cpufpuemu is defined
|
||||
* define cpufpuemu for m68k only
|
||||
|
||||
Revision 1.13 2002/10/16 19:01:43 peter
|
||||
+ $IMPLICITEXCEPTIONS switch to turn on/off generation of the
|
||||
implicit exception frames for procedures with initialized variables
|
||||
and for constructors. The default is on for compatibility
|
||||
|
@ -181,6 +181,7 @@ uses
|
||||
Message(unit_u_ppu_invalid_target);
|
||||
exit;
|
||||
end;
|
||||
{$ifdef cpufpemu}
|
||||
{ check if floating point emulation is on?}
|
||||
if ((ppufile.header.flags and uf_fpu_emulation)<>0) and
|
||||
(cs_fp_emulation in aktmoduleswitches) then
|
||||
@ -190,6 +191,7 @@ uses
|
||||
Message(unit_u_ppu_invalid_fpumode);
|
||||
exit;
|
||||
end;
|
||||
{$endif cpufpemu}
|
||||
|
||||
{ Load values to be access easier }
|
||||
flags:=ppufile.header.flags;
|
||||
@ -860,8 +862,10 @@ uses
|
||||
flags:=flags or uf_local_browser;
|
||||
if do_release then
|
||||
flags:=flags or uf_release;
|
||||
{$ifdef cpufpemu}
|
||||
if (cs_fp_emulation in aktmoduleswitches) then
|
||||
flags:=flags or uf_fpu_emulation;
|
||||
{$endif cpufpemu}
|
||||
{$ifdef Test_Double_checksum_write}
|
||||
Assign(CRCFile,s+'.IMP');
|
||||
Rewrite(CRCFile);
|
||||
@ -1325,7 +1329,11 @@ uses
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.27 2002-11-20 12:36:24 mazen
|
||||
Revision 1.28 2002-12-06 16:56:57 peter
|
||||
* only compile cs_fp_emulation support when cpufpuemu is defined
|
||||
* define cpufpuemu for m68k only
|
||||
|
||||
Revision 1.27 2002/11/20 12:36:24 mazen
|
||||
* $UNITPATH directive is now working
|
||||
|
||||
Revision 1.26 2002/11/15 01:58:46 peter
|
||||
|
@ -45,6 +45,7 @@ interface
|
||||
{ only implements "muln" nodes, the rest always has to be done in }
|
||||
{ the code generator for performance reasons (JM) }
|
||||
function first_add64bitint: tnode; virtual;
|
||||
{$ifdef cpufpemu}
|
||||
{ This routine calls internal runtime library helpers
|
||||
for all floating point arithmetic in the case
|
||||
where the emulation switches is on. Otherwise
|
||||
@ -52,6 +53,7 @@ interface
|
||||
the code generation phase.
|
||||
}
|
||||
function first_addfloat : tnode; virtual;
|
||||
{$endif cpufpemu}
|
||||
end;
|
||||
taddnodeclass = class of taddnode;
|
||||
|
||||
@ -1523,6 +1525,7 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
{$ifdef cpufpemu}
|
||||
function taddnode.first_addfloat: tnode;
|
||||
var
|
||||
procname: string[31];
|
||||
@ -1576,6 +1579,7 @@ implementation
|
||||
right := nil;
|
||||
firstpass(result);
|
||||
end;
|
||||
{$endif cpufpemu}
|
||||
|
||||
|
||||
function taddnode.pass_1 : tnode;
|
||||
@ -1601,9 +1605,11 @@ implementation
|
||||
{ int/int gives real/real! }
|
||||
if nodetype=slashn then
|
||||
begin
|
||||
{$ifdef cpufpemu}
|
||||
result := first_addfloat;
|
||||
if assigned(result) then
|
||||
exit;
|
||||
{$endif cpufpemu}
|
||||
location.loc:=LOC_FPUREGISTER;
|
||||
{ maybe we need an integer register to save }
|
||||
{ a reference }
|
||||
@ -1781,9 +1787,11 @@ implementation
|
||||
{ is one a real float ? }
|
||||
else if (rd.deftype=floatdef) or (ld.deftype=floatdef) then
|
||||
begin
|
||||
{$ifdef cpufpemu}
|
||||
result := first_addfloat;
|
||||
if assigned(result) then
|
||||
exit;
|
||||
{$endif cpufpemu}
|
||||
location.loc:=LOC_FPUREGISTER;
|
||||
calcregisters(self,0,1,0);
|
||||
{ an add node always first loads both the left and the }
|
||||
@ -1914,7 +1922,11 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.76 2002-11-30 21:32:24 carl
|
||||
Revision 1.77 2002-12-06 16:56:57 peter
|
||||
* only compile cs_fp_emulation support when cpufpuemu is defined
|
||||
* define cpufpuemu for m68k only
|
||||
|
||||
Revision 1.76 2002/11/30 21:32:24 carl
|
||||
+ Add loading of softfpu in emulation mode
|
||||
+ Correct routine call for softfpu
|
||||
* Extended type must also be defined even with softfpu
|
||||
|
@ -2526,15 +2526,17 @@ type
|
||||
floatdef :
|
||||
begin
|
||||
location.loc:=LOC_FPUREGISTER;
|
||||
{$ifdef m68k}
|
||||
if (cs_fp_emulation in aktmoduleswitches) or
|
||||
(tfloatdef(resulttype.def).typ=s32real) then
|
||||
{$ifdef cpufpemu}
|
||||
if (cs_fp_emulation in aktmoduleswitches) then
|
||||
registers32:=1
|
||||
else
|
||||
{$endif cpufpemu}
|
||||
{$ifdef m68k}
|
||||
if (tfloatdef(resulttype.def).typ=s32real) then
|
||||
registers32:=1
|
||||
else
|
||||
{$endif m68k}
|
||||
registersfpu:=1;
|
||||
{$else not m68k}
|
||||
registersfpu:=1;
|
||||
{$endif not m68k}
|
||||
end;
|
||||
else
|
||||
begin
|
||||
@ -2838,7 +2840,11 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.113 2002-11-27 20:04:38 peter
|
||||
Revision 1.114 2002-12-06 16:56:58 peter
|
||||
* only compile cs_fp_emulation support when cpufpuemu is defined
|
||||
* define cpufpuemu for m68k only
|
||||
|
||||
Revision 1.113 2002/11/27 20:04:38 peter
|
||||
* cdecl array of const fixes
|
||||
|
||||
Revision 1.112 2002/11/27 15:33:46 peter
|
||||
|
@ -474,13 +474,15 @@ begin
|
||||
IllegalPara(opt);
|
||||
break;
|
||||
end;
|
||||
{$ifdef cpufpemu}
|
||||
'e' :
|
||||
begin
|
||||
If UnsetBool(More, j) then
|
||||
exclude(initmoduleswitches,cs_fp_emulation)
|
||||
Else
|
||||
include(initmoduleswitches,cs_fp_emulation);
|
||||
end;
|
||||
end;
|
||||
{$endif cpufpemu}
|
||||
'h' :
|
||||
begin
|
||||
val(copy(more,j+1,length(more)-j),heapsize,code);
|
||||
@ -1887,7 +1889,11 @@ finalization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.90 2002-11-30 23:14:55 carl
|
||||
Revision 1.91 2002-12-06 16:56:58 peter
|
||||
* only compile cs_fp_emulation support when cpufpuemu is defined
|
||||
* define cpufpuemu for m68k only
|
||||
|
||||
Revision 1.90 2002/11/30 23:14:55 carl
|
||||
- removed cs_fp_emulation checking for m68k, its now controled
|
||||
by a global switch
|
||||
+ added powerpc/sparc/vis message options support
|
||||
|
@ -301,9 +301,11 @@ unit paramgr;
|
||||
floatdef :
|
||||
begin
|
||||
result.loc := LOC_FPUREGISTER;
|
||||
{$ifdef cpufpemu}
|
||||
if cs_fp_emulation in aktmoduleswitches then
|
||||
result.register := accumulator
|
||||
else
|
||||
{$endif cpufpemu}
|
||||
result.register := FPU_RESULT_REG;
|
||||
end;
|
||||
else
|
||||
@ -412,7 +414,11 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.26 2002-11-27 20:04:09 peter
|
||||
Revision 1.27 2002-12-06 16:56:58 peter
|
||||
* only compile cs_fp_emulation support when cpufpuemu is defined
|
||||
* define cpufpuemu for m68k only
|
||||
|
||||
Revision 1.26 2002/11/27 20:04:09 peter
|
||||
* tvarsym.get_push_size replaced by paramanager.push_size
|
||||
|
||||
Revision 1.25 2002/11/27 02:33:19 peter
|
||||
|
@ -441,6 +441,7 @@ implementation
|
||||
make_ref:=false;
|
||||
readconstdefs;
|
||||
make_ref:=true;
|
||||
{$ifdef cpufpemu}
|
||||
{ Floating point emulation unit? }
|
||||
if (cs_fp_emulation in aktmoduleswitches) then
|
||||
begin
|
||||
@ -453,6 +454,7 @@ implementation
|
||||
inc(unitsym.refs);
|
||||
refsymtable.insert(unitsym);
|
||||
end;
|
||||
{$endif cpufpemu}
|
||||
{ Thread support unit? }
|
||||
if (cs_threading in aktmoduleswitches) then
|
||||
begin
|
||||
@ -1453,7 +1455,11 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.85 2002-11-30 21:32:24 carl
|
||||
Revision 1.86 2002-12-06 16:56:58 peter
|
||||
* only compile cs_fp_emulation support when cpufpuemu is defined
|
||||
* define cpufpuemu for m68k only
|
||||
|
||||
Revision 1.85 2002/11/30 21:32:24 carl
|
||||
+ Add loading of softfpu in emulation mode
|
||||
+ Correct routine call for softfpu
|
||||
* Extended type must also be defined even with softfpu
|
||||
|
@ -125,6 +125,7 @@ implementation
|
||||
vmtarraytype : ttype;
|
||||
vmtsymtable : tsymtable;
|
||||
begin
|
||||
{$ifdef cpufpemu}
|
||||
{ Normal types }
|
||||
if (cs_fp_emulation in aktmoduleswitches) then
|
||||
begin
|
||||
@ -136,6 +137,7 @@ implementation
|
||||
addtype('Extended',pbestrealtype^);
|
||||
end
|
||||
else
|
||||
{$endif cpufpemu}
|
||||
begin
|
||||
addtype('Single',s32floattype);
|
||||
addtype('Double',s64floattype);
|
||||
@ -477,7 +479,11 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.43 2002-11-30 21:32:26 carl
|
||||
Revision 1.44 2002-12-06 16:56:59 peter
|
||||
* only compile cs_fp_emulation support when cpufpuemu is defined
|
||||
* define cpufpuemu for m68k only
|
||||
|
||||
Revision 1.43 2002/11/30 21:32:26 carl
|
||||
+ Add loading of softfpu in emulation mode
|
||||
+ Correct routine call for softfpu
|
||||
* Extended type must also be defined even with softfpu
|
||||
|
Loading…
Reference in New Issue
Block a user