|
@@ -300,7 +300,7 @@ unit cgcpu;
|
|
|
non-overlapping subregs per register, so we can only use
|
|
|
half the single precision registers for now (as sub registers of the
|
|
|
double precision ones). }
|
|
|
- if current_settings.fputype in [fpu_vfpv3,fpu_vfpv4] then
|
|
|
+ if FPUARM_HAS_32REGS in fpu_capabilities[current_settings.fputype] then
|
|
|
rg[R_MMREGISTER]:=trgcpu.create(R_MMREGISTER,R_SUBFD,
|
|
|
[RS_D0,RS_D1,RS_D2,RS_D3,RS_D4,RS_D5,RS_D6,RS_D7,
|
|
|
RS_D16,RS_D17,RS_D18,RS_D19,RS_D20,RS_D21,RS_D22,RS_D23,RS_D24,RS_D25,RS_D26,RS_D27,RS_D28,RS_D29,RS_D30,RS_D31,
|
|
@@ -1926,16 +1926,13 @@ unit cgcpu;
|
|
|
inc(registerarea,12);
|
|
|
end;
|
|
|
end;
|
|
|
- fpu_vfpv2,
|
|
|
- fpu_vfpv3,
|
|
|
- fpu_vfpv4,
|
|
|
- fpu_vfpv3_d16:
|
|
|
+ else if FPUARM_HAS_32REGS in fpu_capabilities[current_settings.fputype] then
|
|
|
begin;
|
|
|
{ the *[0..31] is a hack to prevent that the compiler tries to save odd single-type registers,
|
|
|
they have numbers>$1f which is not really correct as they should simply have the same numbers
|
|
|
as the even ones by with a different subtype as it is done on x86 with al/ah }
|
|
|
mmregs:=(rg[R_MMREGISTER].used_in_proc-paramanager.get_volatile_registers_mm(pocall_stdcall))*[0..31];
|
|
|
- end;
|
|
|
+ end
|
|
|
else
|
|
|
internalerror(2019050924);
|
|
|
end;
|
|
@@ -2080,7 +2077,7 @@ unit cgcpu;
|
|
|
begin
|
|
|
reference_reset(ref,4,[]);
|
|
|
if (tg.direction*tcpuprocinfo(current_procinfo).floatregstart>=1023) or
|
|
|
- (current_settings.fputype in [fpu_vfpv2,fpu_vfpv3,fpu_vfpv4,fpu_vfpv3_d16]) then
|
|
|
+ (FPUARM_HAS_VFP_DOUBLE in fpu_capabilities[current_settings.fputype]) then
|
|
|
begin
|
|
|
if not is_shifter_const(tcpuprocinfo(current_procinfo).floatregstart,shift) then
|
|
|
begin
|
|
@@ -2107,10 +2104,7 @@ unit cgcpu;
|
|
|
list.concat(taicpu.op_reg_const_ref(A_SFM,newreg(R_FPUREGISTER,firstfloatreg,R_SUBWHOLE),
|
|
|
lastfloatreg-firstfloatreg+1,ref));
|
|
|
end;
|
|
|
- fpu_vfpv2,
|
|
|
- fpu_vfpv3,
|
|
|
- fpu_vfpv4,
|
|
|
- fpu_vfpv3_d16:
|
|
|
+ else if FPUARM_HAS_VFP_DOUBLE in fpu_capabilities[current_settings.fputype] then
|
|
|
begin
|
|
|
ref.index:=ref.base;
|
|
|
ref.base:=NR_NO;
|
|
@@ -2121,7 +2115,7 @@ unit cgcpu;
|
|
|
postfix:=PF_IAD;}
|
|
|
if mmregs<>[] then
|
|
|
list.concat(taicpu.op_ref_regset(A_VSTM,ref,R_MMREGISTER,R_SUBFD,mmregs));
|
|
|
- end;
|
|
|
+ end
|
|
|
else
|
|
|
internalerror(2019050923);
|
|
|
end;
|
|
@@ -2175,17 +2169,14 @@ unit cgcpu;
|
|
|
}
|
|
|
end;
|
|
|
end;
|
|
|
- fpu_vfpv2,
|
|
|
- fpu_vfpv3,
|
|
|
- fpu_vfpv4,
|
|
|
- fpu_vfpv3_d16:
|
|
|
- begin;
|
|
|
+ else if FPUARM_HAS_VFP_DOUBLE in fpu_capabilities[current_settings.fputype] then
|
|
|
+ begin
|
|
|
{ restore vfp registers? }
|
|
|
{ the *[0..31] is a hack to prevent that the compiler tries to save odd single-type registers,
|
|
|
they have numbers>$1f which is not really correct as they should simply have the same numbers
|
|
|
as the even ones by with a different subtype as it is done on x86 with al/ah }
|
|
|
mmregs:=(rg[R_MMREGISTER].used_in_proc-paramanager.get_volatile_registers_mm(pocall_stdcall))*[0..31];
|
|
|
- end;
|
|
|
+ end
|
|
|
else
|
|
|
internalerror(2019050926);
|
|
|
end;
|
|
@@ -2195,7 +2186,7 @@ unit cgcpu;
|
|
|
begin
|
|
|
reference_reset(ref,4,[]);
|
|
|
if (tg.direction*tcpuprocinfo(current_procinfo).floatregstart>=1023) or
|
|
|
- (current_settings.fputype in [fpu_vfpv2,fpu_vfpv3,fpu_vfpv4,fpu_vfpv3_d16]) then
|
|
|
+ (FPUARM_HAS_VFP_DOUBLE in fpu_capabilities[current_settings.fputype]) then
|
|
|
begin
|
|
|
if not is_shifter_const(tcpuprocinfo(current_procinfo).floatregstart,shift) then
|
|
|
begin
|
|
@@ -2221,10 +2212,7 @@ unit cgcpu;
|
|
|
list.concat(taicpu.op_reg_const_ref(A_LFM,newreg(R_FPUREGISTER,firstfloatreg,R_SUBWHOLE),
|
|
|
lastfloatreg-firstfloatreg+1,ref));
|
|
|
end;
|
|
|
- fpu_vfpv2,
|
|
|
- fpu_vfpv3,
|
|
|
- fpu_vfpv4,
|
|
|
- fpu_vfpv3_d16:
|
|
|
+ else if FPUARM_HAS_VFP_DOUBLE in fpu_capabilities[current_settings.fputype] then
|
|
|
begin
|
|
|
ref.index:=ref.base;
|
|
|
ref.base:=NR_NO;
|
|
@@ -2235,7 +2223,7 @@ unit cgcpu;
|
|
|
mmpostfix:=PF_IAD;}
|
|
|
if mmregs<>[] then
|
|
|
list.concat(taicpu.op_ref_regset(A_VLDM,ref,R_MMREGISTER,R_SUBFD,mmregs));
|
|
|
- end;
|
|
|
+ end
|
|
|
else
|
|
|
internalerror(2019050921);
|
|
|
end;
|
|
@@ -4313,13 +4301,13 @@ unit cgcpu;
|
|
|
rg[R_FPUREGISTER]:=trgcpu.create(R_FPUREGISTER,R_SUBNONE,
|
|
|
[RS_F0,RS_F1,RS_F2,RS_F3,RS_F4,RS_F5,RS_F6,RS_F7],first_fpu_imreg,[]);
|
|
|
|
|
|
- if current_settings.fputype in [fpu_vfpv3,fpu_vfpv4] then
|
|
|
+ if FPUARM_HAS_32REGS in fpu_capabilities[current_settings.fputype] then
|
|
|
rg[R_MMREGISTER]:=trgcpu.create(R_MMREGISTER,R_SUBFD,
|
|
|
[RS_D0,RS_D1,RS_D2,RS_D3,RS_D4,RS_D5,RS_D6,RS_D7,
|
|
|
RS_D16,RS_D17,RS_D18,RS_D19,RS_D20,RS_D21,RS_D22,RS_D23,RS_D24,RS_D25,RS_D26,RS_D27,RS_D28,RS_D29,RS_D30,RS_D31,
|
|
|
RS_D8,RS_D9,RS_D10,RS_D11,RS_D12,RS_D13,RS_D14,RS_D15
|
|
|
],first_mm_imreg,[])
|
|
|
- else if current_settings.fputype in [fpu_fpv4_s16,fpu_vfpv3_d16] then
|
|
|
+ else if FPUARM_HAS_VFP_EXTENSION in fpu_capabilities[current_settings.fputype] then
|
|
|
rg[R_MMREGISTER]:=trgcpu.create(R_MMREGISTER,R_SUBFD,
|
|
|
[RS_D0,RS_D1,RS_D2,RS_D3,RS_D4,RS_D5,RS_D6,RS_D7,
|
|
|
RS_D8,RS_D9,RS_D10,RS_D11,RS_D12,RS_D13,RS_D14,RS_D15
|