diff --git a/compiler/aarch64/cpupara.pas b/compiler/aarch64/cpupara.pas index d40f8f0fde..582efaacdf 100644 --- a/compiler/aarch64/cpupara.pas +++ b/compiler/aarch64/cpupara.pas @@ -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; diff --git a/compiler/arm/cpupara.pas b/compiler/arm/cpupara.pas index 09816ec2eb..53189dcec9 100644 --- a/compiler/arm/cpupara.pas +++ b/compiler/arm/cpupara.pas @@ -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; diff --git a/compiler/fpcdefs.inc b/compiler/fpcdefs.inc index 6e12a0b2a6..fca7827fff 100644 --- a/compiler/fpcdefs.inc +++ b/compiler/fpcdefs.inc @@ -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} diff --git a/compiler/i386/cpupara.pas b/compiler/i386/cpupara.pas index 4e2b47f2fd..f6edaf66a4 100644 --- a/compiler/i386/cpupara.pas +++ b/compiler/i386/cpupara.pas @@ -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, diff --git a/compiler/i8086/cpupara.pas b/compiler/i8086/cpupara.pas index 628327db7e..13344bc39e 100644 --- a/compiler/i8086/cpupara.pas +++ b/compiler/i8086/cpupara.pas @@ -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, diff --git a/compiler/jvm/cpupara.pas b/compiler/jvm/cpupara.pas index c4bdf0bc3f..1e9ba782ed 100644 --- a/compiler/jvm/cpupara.pas +++ b/compiler/jvm/cpupara.pas @@ -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; diff --git a/compiler/m68k/cpupara.pas b/compiler/m68k/cpupara.pas index 2a1c99bcad..d75686a455 100644 --- a/compiler/m68k/cpupara.pas +++ b/compiler/m68k/cpupara.pas @@ -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; diff --git a/compiler/mips/cpupara.pas b/compiler/mips/cpupara.pas index 2f0e4ed5b1..fc5c7837e1 100644 --- a/compiler/mips/cpupara.pas +++ b/compiler/mips/cpupara.pas @@ -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; diff --git a/compiler/nadd.pas b/compiler/nadd.pas index 739b046816..323145261d 100644 --- a/compiler/nadd.pas +++ b/compiler/nadd.pas @@ -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 diff --git a/compiler/objcasm.pas b/compiler/objcasm.pas index bbbc114c84..7d3a3cbe38 100644 --- a/compiler/objcasm.pas +++ b/compiler/objcasm.pas @@ -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 diff --git a/compiler/paramgr.pas b/compiler/paramgr.pas index 729cbf56e6..56d49e0237 100644 --- a/compiler/paramgr.pas +++ b/compiler/paramgr.pas @@ -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; diff --git a/compiler/powerpc/cpupara.pas b/compiler/powerpc/cpupara.pas index 737e6cfe52..fc740506ab 100644 --- a/compiler/powerpc/cpupara.pas +++ b/compiler/powerpc/cpupara.pas @@ -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 diff --git a/compiler/powerpc64/cpupara.pas b/compiler/powerpc64/cpupara.pas index b33bc2ecc0..62f19eb4ba 100644 --- a/compiler/powerpc64/cpupara.pas +++ b/compiler/powerpc64/cpupara.pas @@ -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 diff --git a/compiler/wasm32/cpupara.pas b/compiler/wasm32/cpupara.pas index d7ff8e109e..bdda79fe1e 100644 --- a/compiler/wasm32/cpupara.pas +++ b/compiler/wasm32/cpupara.pas @@ -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; diff --git a/compiler/x86_64/cpupara.pas b/compiler/x86_64/cpupara.pas index 8f81dbb0da..dfb96ee654 100644 --- a/compiler/x86_64/cpupara.pas +++ b/compiler/x86_64/cpupara.pas @@ -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