mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 11:59:30 +02:00
* cleanup of VER3_0 defines
This commit is contained in:
parent
29ea731b2f
commit
6404478ea4
compiler
@ -92,7 +92,7 @@ unit cpupara;
|
||||
|
||||
function tcpuparamanager.get_saved_registers_int(calloption: tproccalloption): tcpuregisterarray;
|
||||
const
|
||||
saved_regs : {$ifndef VER3_0}tcpuregisterarray{$else}array[0..9] of tsuperregister{$endif} =
|
||||
saved_regs : tcpuregisterarray =
|
||||
(RS_X19,RS_X20,RS_X21,RS_X22,RS_X23,RS_X24,RS_X25,RS_X26,RS_X27,RS_X28);
|
||||
begin
|
||||
result:=saved_regs;
|
||||
@ -101,7 +101,7 @@ unit cpupara;
|
||||
|
||||
function tcpuparamanager.get_saved_registers_mm(calloption: tproccalloption): tcpuregisterarray;
|
||||
const
|
||||
saved_mm_regs : {$ifndef VER3_0}tcpuregisterarray{$else}array[0..7] of tsuperregister{$endif} =
|
||||
saved_mm_regs : tcpuregisterarray =
|
||||
(RS_D8,RS_D9,RS_D10,RS_D11,RS_D12,RS_D13,RS_D14,RS_D15);
|
||||
begin
|
||||
result:=saved_mm_regs;
|
||||
|
@ -87,7 +87,7 @@ unit cpupara;
|
||||
|
||||
function tcpuparamanager.get_saved_registers_int(calloption : tproccalloption):tcpuregisterarray;
|
||||
const
|
||||
saved_regs : {$ifndef VER3_0}tcpuregisterarray{$else}array[0..6] of tsuperregister{$endif} =
|
||||
saved_regs : tcpuregisterarray =
|
||||
(RS_R4,RS_R5,RS_R6,RS_R7,RS_R8,RS_R9,RS_R10);
|
||||
begin
|
||||
result:=saved_regs;
|
||||
|
@ -58,11 +58,6 @@
|
||||
|
||||
{$define USEEXCEPT}
|
||||
|
||||
{$ifdef VER3_0}
|
||||
{ fix bootstrapping dfa gives warnings on 3.2+ code due to changed case behaviour }
|
||||
{$OPTIMIZATION NODFA}
|
||||
{$endif VER3_0}
|
||||
|
||||
{ This fake CPU is used to allow incorporation of globtype unit
|
||||
into utils/ppudump without any CPU specific code PM }
|
||||
{$ifdef generic_cpu}
|
||||
|
@ -299,8 +299,8 @@ unit cpupara;
|
||||
|
||||
function tcpuparamanager.get_saved_registers_int(calloption : tproccalloption):tcpuregisterarray;
|
||||
const
|
||||
saveregs : {$ifndef VER3_0}tcpuregisterarray{$else}array[0..3] of tsuperregister{$endif} = (RS_EBX,RS_ESI,RS_EDI,RS_EBP);
|
||||
saveregs_oldfpccall : {$ifndef VER3_0}tcpuregisterarray{$else}array[0..0] of tsuperregister{$endif} = (RS_EBP);
|
||||
saveregs : tcpuregisterarray = (RS_EBX,RS_ESI,RS_EDI,RS_EBP);
|
||||
saveregs_oldfpccall : tcpuregisterarray = (RS_EBP);
|
||||
begin
|
||||
case calloption of
|
||||
pocall_internproc,
|
||||
|
@ -235,8 +235,8 @@ unit cpupara;
|
||||
|
||||
function tcpuparamanager.get_saved_registers_int(calloption : tproccalloption):tcpuregisterarray;
|
||||
const
|
||||
saveregs_cdecl: {$ifndef VER3_0}tcpuregisterarray{$else}array [0..2] of tsuperregister{$endif} = (RS_BP,RS_SI,RS_DI);
|
||||
saveregs_pascal: {$ifndef VER3_0}tcpuregisterarray{$else}array [0..0] of tsuperregister{$endif} = (RS_BP);
|
||||
saveregs_cdecl: tcpuregisterarray = (RS_BP,RS_SI,RS_DI);
|
||||
saveregs_pascal: tcpuregisterarray = (RS_BP);
|
||||
begin
|
||||
case calloption of
|
||||
pocall_register,
|
||||
|
@ -75,7 +75,7 @@ implementation
|
||||
function tcpuparamanager.get_saved_registers_int(calloption: tproccalloption): tcpuregisterarray;
|
||||
const
|
||||
{ dummy, not used for JVM }
|
||||
saved_regs: {$ifndef VER3_0}tcpuregisterarray{$else}array [0..0] of tsuperregister{$endif} = (RS_NO);
|
||||
saved_regs: tcpuregisterarray = (RS_NO);
|
||||
begin
|
||||
result:=saved_regs;
|
||||
end;
|
||||
|
@ -106,21 +106,21 @@ unit cpupara;
|
||||
|
||||
function tcpuparamanager.get_saved_registers_int(calloption:tproccalloption):tcpuregisterarray;
|
||||
const
|
||||
saved_regs: {$ifndef VER3_0}tcpuregisterarray{$else}array[0..5] of tsuperregister{$endif} = (RS_D2,RS_D3,RS_D4,RS_D5,RS_D6,RS_D7);
|
||||
saved_regs: tcpuregisterarray = (RS_D2,RS_D3,RS_D4,RS_D5,RS_D6,RS_D7);
|
||||
begin
|
||||
result:=saved_regs;
|
||||
end;
|
||||
|
||||
function tcpuparamanager.get_saved_registers_address(calloption:tproccalloption):tcpuregisterarray;
|
||||
const
|
||||
saved_addr_regs: {$ifndef VER3_0}tcpuregisterarray{$else}array[0..4] of tsuperregister{$endif} = (RS_A2,RS_A3,RS_A4,RS_A5,RS_A6);
|
||||
saved_addr_regs: tcpuregisterarray = (RS_A2,RS_A3,RS_A4,RS_A5,RS_A6);
|
||||
begin
|
||||
result:=saved_addr_regs;
|
||||
end;
|
||||
|
||||
function tcpuparamanager.get_saved_registers_fpu(calloption:tproccalloption):tcpuregisterarray;
|
||||
const
|
||||
saved_fpu_regs: {$ifndef VER3_0}tcpuregisterarray{$else}array[0..5] of tsuperregister{$endif} = (RS_FP2,RS_FP3,RS_FP4,RS_FP5,RS_FP6,RS_FP7);
|
||||
saved_fpu_regs: tcpuregisterarray = (RS_FP2,RS_FP3,RS_FP4,RS_FP5,RS_FP6,RS_FP7);
|
||||
begin
|
||||
result:=saved_fpu_regs;
|
||||
end;
|
||||
|
@ -109,7 +109,7 @@ implementation
|
||||
|
||||
function tcpuparamanager.get_saved_registers_int(calloption : tproccalloption):TCpuRegisterArray;
|
||||
const
|
||||
saved_regs : {$ifndef VER3_0}tcpuregisterarray{$else}array[0..0] of tsuperregister{$endif} =
|
||||
saved_regs : tcpuregisterarray =
|
||||
(RS_NO);
|
||||
begin
|
||||
result:=saved_regs;
|
||||
|
@ -3209,16 +3209,13 @@ implementation
|
||||
end
|
||||
else
|
||||
begin
|
||||
{$ifndef VER3_0}
|
||||
{ if left is a currency integer constant, we can get rid of the factor 10000 }
|
||||
if (left.nodetype=ordconstn) and (is_currency(left.resultdef)) and ((tordconstnode(left).value mod 10000)=0) then
|
||||
tordconstnode(left).value:=tordconstnode(left).value div 10000
|
||||
{ or if right is an integer constant, we can get rid of its factor 10000 }
|
||||
else if (right.nodetype=ordconstn) and (is_currency(right.resultdef)) and ((tordconstnode(right).value mod 10000)=0) then
|
||||
tordconstnode(right).value:=tordconstnode(right).value div 10000
|
||||
else
|
||||
{$endif VER3_0}
|
||||
if (right.nodetype=muln) and is_currency(right.resultdef) and
|
||||
else if (right.nodetype=muln) and is_currency(right.resultdef) and
|
||||
{ do not test swapped here as the internal conversions are only create as "var."*"10000" }
|
||||
is_currency(taddnode(right).right.resultdef) and (taddnode(right).right.nodetype=ordconstn) and (tordconstnode(taddnode(right).right).value=10000) and
|
||||
is_currency(taddnode(right).left.resultdef) and (taddnode(right).left.nodetype=typeconvn) then
|
||||
|
@ -32,11 +32,7 @@ unit objcasm;
|
||||
{ Workaround for mantis #29906: bug in PPC jump table generation if a jump
|
||||
table is created for a case-statement that handles at least the lowest
|
||||
and highest possible value of the case expression type }
|
||||
{$ifndef VER3_0_0}
|
||||
function objc_section_name(sec: TObjCAsmSectionType): string;
|
||||
{$else}
|
||||
function objc_section_name(sec: TAsmSectionType): string;
|
||||
{$endif}
|
||||
|
||||
implementation
|
||||
|
||||
@ -44,11 +40,7 @@ implementation
|
||||
verbose,
|
||||
systems;
|
||||
|
||||
{$ifndef VER3_0_0}
|
||||
function objc_section_name(sec: TObjCAsmSectionType): string;
|
||||
{$else}
|
||||
function objc_section_name(sec: TAsmSectionType): string;
|
||||
{$endif}
|
||||
begin
|
||||
result:='';
|
||||
if target_info.system in systems_darwin then
|
||||
|
@ -325,7 +325,7 @@ implementation
|
||||
|
||||
function tparamanager.get_saved_registers_int(calloption : tproccalloption):tcpuregisterarray;
|
||||
const
|
||||
inv: {$ifndef VER3_0}tcpuregisterarray{$else}array [0..0] of tsuperregister{$endif} = (RS_INVALID);
|
||||
inv: tcpuregisterarray = (RS_INVALID);
|
||||
begin
|
||||
result:=inv;
|
||||
end;
|
||||
@ -333,7 +333,7 @@ implementation
|
||||
|
||||
function tparamanager.get_saved_registers_address(calloption : tproccalloption):tcpuregisterarray;
|
||||
const
|
||||
inv: {$ifndef VER3_0}tcpuregisterarray{$else}array [0..0] of tsuperregister{$endif} = (RS_INVALID);
|
||||
inv: tcpuregisterarray = (RS_INVALID);
|
||||
begin
|
||||
result:=inv;
|
||||
end;
|
||||
@ -341,7 +341,7 @@ implementation
|
||||
|
||||
function tparamanager.get_saved_registers_fpu(calloption : tproccalloption):tcpuregisterarray;
|
||||
const
|
||||
inv: {$ifndef VER3_0}tcpuregisterarray{$else}array [0..0] of tsuperregister{$endif} = (RS_INVALID);
|
||||
inv: tcpuregisterarray = (RS_INVALID);
|
||||
begin
|
||||
result:=inv;
|
||||
end;
|
||||
@ -349,7 +349,7 @@ implementation
|
||||
|
||||
function tparamanager.get_saved_registers_mm(calloption : tproccalloption):tcpuregisterarray;
|
||||
const
|
||||
inv: {$ifndef VER3_0}tcpuregisterarray{$else}array [0..0] of tsuperregister{$endif} = (RS_INVALID);
|
||||
inv: tcpuregisterarray = (RS_INVALID);
|
||||
begin
|
||||
result:=inv;
|
||||
end;
|
||||
|
@ -81,7 +81,7 @@ unit cpupara;
|
||||
|
||||
function tcpuparamanager.get_saved_registers_int(calloption : tproccalloption):tcpuregisterarray;
|
||||
const
|
||||
saved_regs : {$ifndef VER3_0}tcpuregisterarray{$else}array[0..18] of tsuperregister{$endif} = (
|
||||
saved_regs : tcpuregisterarray = (
|
||||
RS_R13,RS_R14,RS_R15,RS_R16,RS_R17,RS_R18,RS_R19,
|
||||
RS_R20,RS_R21,RS_R22,RS_R23,RS_R24,RS_R25,RS_R26,RS_R27,RS_R28,RS_R29,
|
||||
RS_R30,RS_R31
|
||||
|
@ -83,7 +83,7 @@ end;
|
||||
function tcpuparamanager.get_saved_registers_int(calloption: tproccalloption):
|
||||
tcpuregisterarray;
|
||||
const
|
||||
saved_regs: {$ifndef VER3_0}tcpuregisterarray{$else}array[0..17] of tsuperregister{$endif} = (
|
||||
saved_regs: tcpuregisterarray = (
|
||||
RS_R14, RS_R15, RS_R16, RS_R17, RS_R18, RS_R19,
|
||||
RS_R20, RS_R21, RS_R22, RS_R23, RS_R24, RS_R25,
|
||||
RS_R26, RS_R27, RS_R28, RS_R29, RS_R30, RS_R31
|
||||
|
@ -67,7 +67,7 @@ implementation
|
||||
function tcpuparamanager.get_saved_registers_int(calloption: tproccalloption): tcpuregisterarray;
|
||||
const
|
||||
{ dummy, not used for WebAssembly }
|
||||
saved_regs: {$ifndef VER3_0}tcpuregisterarray{$else}array [0..0] of tsuperregister{$endif} = (RS_NO);
|
||||
saved_regs: tcpuregisterarray = (RS_NO);
|
||||
begin
|
||||
result:=saved_regs;
|
||||
end;
|
||||
|
@ -1386,8 +1386,8 @@ unit cpupara;
|
||||
|
||||
function tcpuparamanager.get_saved_registers_int(calloption : tproccalloption):tcpuregisterarray;
|
||||
const
|
||||
win64_saved_std_regs : {$ifndef VER3_0}tcpuregisterarray{$else}array[0..7] of tsuperregister{$endif} = (RS_RBX,RS_RDI,RS_RSI,RS_R12,RS_R13,RS_R14,RS_R15,RS_RBP);
|
||||
others_saved_std_regs : {$ifndef VER3_0}tcpuregisterarray{$else}array[0..4] of tsuperregister{$endif} = (RS_RBX,RS_R12,RS_R13,RS_R14,RS_R15);
|
||||
win64_saved_std_regs : tcpuregisterarray = (RS_RBX,RS_RDI,RS_RSI,RS_R12,RS_R13,RS_R14,RS_R15,RS_RBP);
|
||||
others_saved_std_regs : tcpuregisterarray = (RS_RBX,RS_R12,RS_R13,RS_R14,RS_R15);
|
||||
begin
|
||||
if tcgx86_64(cg).use_ms_abi then
|
||||
result:=win64_saved_std_regs
|
||||
@ -1398,7 +1398,7 @@ unit cpupara;
|
||||
|
||||
function tcpuparamanager.get_saved_registers_mm(calloption: tproccalloption):tcpuregisterarray;
|
||||
const
|
||||
win64_saved_xmm_regs : {$ifndef VER3_0}tcpuregisterarray{$else}array[0..9] of tsuperregister{$endif} = (RS_XMM6,RS_XMM7,
|
||||
win64_saved_xmm_regs : tcpuregisterarray = (RS_XMM6,RS_XMM7,
|
||||
RS_XMM8,RS_XMM9,RS_XMM10,RS_XMM11,RS_XMM12,RS_XMM13,RS_XMM14,RS_XMM15);
|
||||
begin
|
||||
if tcgx86_64(cg).use_ms_abi then
|
||||
|
Loading…
Reference in New Issue
Block a user