* Small refactor of the arm defaults for better readability.

git-svn-id: trunk@33307 -
This commit is contained in:
yury 2016-03-21 09:19:02 +00:00
parent 681b06bc90
commit cac16fa60e

View File

@ -3748,24 +3748,6 @@ begin
{$endif cpufpemu}
end;
{$ifdef arm}
if target_info.abi = abi_eabihf then
begin
if not(option.FPUSetExplicitly) then
begin
init_settings.fputype:=fpu_vfpv3_d16
end
else
begin
if not (init_settings.fputype in [fpu_vfpv2,fpu_vfpv3,fpu_vfpv3_d16,fpu_vfpv4]) then
begin
Message(option_illegal_fpu_eabihf);
StopOptions(1);
end;
end;
end;
{$endif arm}
{$ifdef arm}
case target_info.system of
system_arm_darwin:
@ -3790,25 +3772,40 @@ begin
end;
end;
{ set default cpu type to ARMv7a for ARMHF unless specified otherwise }
if (target_info.abi = abi_eabihf) then
begin
{$ifdef CPUARMV6}
{ if the compiler is built for armv6, then
inherit this setting, e.g. Raspian is armhf but
only armv6, this makes rebuilds of the compiler
easier }
if not option.CPUSetExplicitly then
init_settings.cputype:=cpu_armv6;
if not option.OptCPUSetExplicitly then
init_settings.optimizecputype:=cpu_armv6;
{$else CPUARMV6}
if not option.CPUSetExplicitly then
init_settings.cputype:=cpu_armv7a;
if not option.OptCPUSetExplicitly then
init_settings.optimizecputype:=cpu_armv7a;
{$endif CPUARMV6}
end;
{ ARMHF defaults }
if (target_info.abi = abi_eabihf) then
{ set default cpu type to ARMv7a for ARMHF unless specified otherwise }
begin
{$ifdef CPUARMV6}
{ if the compiler is built for armv6, then
inherit this setting, e.g. Raspian is armhf but
only armv6, this makes rebuilds of the compiler
easier }
if not option.CPUSetExplicitly then
init_settings.cputype:=cpu_armv6;
if not option.OptCPUSetExplicitly then
init_settings.optimizecputype:=cpu_armv6;
{$else CPUARMV6}
if not option.CPUSetExplicitly then
init_settings.cputype:=cpu_armv7a;
if not option.OptCPUSetExplicitly then
init_settings.optimizecputype:=cpu_armv7a;
{$endif CPUARMV6}
{ Set FPU type }
if not(option.FPUSetExplicitly) then
begin
init_settings.fputype:=fpu_vfpv3_d16
end
else
begin
if not (init_settings.fputype in [fpu_vfpv2,fpu_vfpv3,fpu_vfpv3_d16,fpu_vfpv4]) then
begin
Message(option_illegal_fpu_eabihf);
StopOptions(1);
end;
end;
end;
if (init_settings.instructionset=is_thumb) and not(CPUARM_HAS_THUMB2 in cpu_capabilities[init_settings.cputype]) then
begin