mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 20:09:25 +02:00
* consistently define empty saved_mm_registers arrays as containing a single
RS_INVALID superregister (instead of sometimes RS_NO and sometimes RS_INVALID) * check for RS_INVALID in tcg.g_save_registers() and ignore such entries git-svn-id: trunk@21622 -
This commit is contained in:
parent
313e976256
commit
708a2532fc
@ -314,7 +314,7 @@ unit cpubase;
|
||||
(RS_R4,RS_R5,RS_R6,RS_R7,RS_R8,RS_R9,RS_R10);
|
||||
|
||||
{ this is only for the generic code which is not used for this architecture }
|
||||
saved_mm_registers : array[0..0] of tsuperregister = (RS_NO);
|
||||
saved_mm_registers : array[0..0] of tsuperregister = (RS_INVALID);
|
||||
|
||||
{ Required parameter alignment when calling a routine declared as
|
||||
stdcall and cdecl. The alignment value should be the one defined
|
||||
|
@ -101,11 +101,11 @@ unit cpubase;
|
||||
|
||||
{ Float Super register first and last }
|
||||
first_fpu_supreg = RS_INVALID;
|
||||
first_fpu_imreg = RS_INVALID;
|
||||
first_fpu_imreg = 0;
|
||||
|
||||
{ MM Super register first and last }
|
||||
first_mm_supreg = RS_INVALID;
|
||||
first_mm_imreg = RS_INVALID;
|
||||
first_mm_imreg = 0;
|
||||
|
||||
regnumber_count_bsstart = 32;
|
||||
|
||||
|
@ -2507,12 +2507,19 @@ implementation
|
||||
|
||||
for r:=low(saved_mm_registers) to high(saved_mm_registers) do
|
||||
begin
|
||||
if saved_mm_registers[r] in rg[R_MMREGISTER].used_in_proc then
|
||||
{ the array has to be declared even if no MM registers are saved
|
||||
(such as with SSE on i386), and since 0-element arrays don't
|
||||
exist, they contain a single RS_INVALID element in that case
|
||||
}
|
||||
if saved_mm_registers[r]<>RS_INVALID then
|
||||
begin
|
||||
a_loadmm_reg_ref(list,OS_VECTOR,OS_VECTOR,newreg(R_MMREGISTER,saved_mm_registers[r],R_SUBNONE),href,nil);
|
||||
inc(href.offset,tcgsize2size[OS_VECTOR]);
|
||||
if saved_mm_registers[r] in rg[R_MMREGISTER].used_in_proc then
|
||||
begin
|
||||
a_loadmm_reg_ref(list,OS_VECTOR,OS_VECTOR,newreg(R_MMREGISTER,saved_mm_registers[r],R_SUBNONE),href,nil);
|
||||
inc(href.offset,tcgsize2size[OS_VECTOR]);
|
||||
end;
|
||||
include(rg[R_MMREGISTER].preserved_by_proc,saved_mm_registers[r]);
|
||||
end;
|
||||
include(rg[R_MMREGISTER].preserved_by_proc,saved_mm_registers[r]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -254,7 +254,7 @@ uses
|
||||
);
|
||||
|
||||
{ this is only for the generic code which is not used for this architecture }
|
||||
saved_mm_registers : array[0..0] of tsuperregister = (RS_NO);
|
||||
saved_mm_registers : array[0..0] of tsuperregister = (RS_INVALID);
|
||||
|
||||
{# Required parameter alignment when calling a routine
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ unit cpubase;
|
||||
saved_standard_address_registers : array[0..3] of tsuperregister = (RS_A2,RS_A3,RS_A4,RS_A5);
|
||||
|
||||
{ this is only for the generic code which is not used for this architecture }
|
||||
saved_mm_registers : array[0..0] of tsuperregister = (RS_NO);
|
||||
saved_mm_registers : array[0..0] of tsuperregister = (RS_INVALID);
|
||||
|
||||
{# Required parameter alignment when calling a routine declared as
|
||||
stdcall and cdecl. The alignment value should be the one defined
|
||||
|
@ -244,7 +244,7 @@ unit cpubase;
|
||||
(RS_NO);
|
||||
|
||||
{ this is only for the generic code which is not used for this architecture }
|
||||
saved_mm_registers : array[0..0] of tsuperregister = (RS_NO);
|
||||
saved_mm_registers : array[0..0] of tsuperregister = (RS_INVALID);
|
||||
|
||||
{ Required parameter alignment when calling a routine declared as
|
||||
stdcall and cdecl. The alignment value should be the one defined
|
||||
|
@ -352,7 +352,7 @@ uses
|
||||
);
|
||||
|
||||
{ this is only for the generic code which is not used for this architecture }
|
||||
saved_mm_registers : array[0..0] of tsuperregister = (RS_NO);
|
||||
saved_mm_registers : array[0..0] of tsuperregister = (RS_INVALID);
|
||||
|
||||
{# Required parameter alignment when calling a routine declared as
|
||||
stdcall and cdecl. The alignment value should be the one defined
|
||||
|
@ -350,7 +350,7 @@ const
|
||||
);
|
||||
|
||||
{ this is only for the generic code which is not used for this architecture }
|
||||
saved_mm_registers : array[0..0] of tsuperregister = (RS_NO);
|
||||
saved_mm_registers : array[0..0] of tsuperregister = (RS_INVALID);
|
||||
|
||||
{# Required parameter alignment when calling a routine declared as
|
||||
stdcall and cdecl. The alignment value should be the one defined
|
||||
|
@ -249,10 +249,10 @@ uses
|
||||
This value can be deduced from CALLED_USED_REGISTERS array in the
|
||||
GCC source.
|
||||
}
|
||||
saved_standard_registers : array[0..0] of tsuperregister = (RS_NO);
|
||||
saved_standard_registers : array[0..0] of tsuperregister = (RS_INVALID);
|
||||
|
||||
{ this is only for the generic code which is not used for this architecture }
|
||||
saved_mm_registers : array[0..0] of tsuperregister = (RS_NO);
|
||||
saved_mm_registers : array[0..0] of tsuperregister = (RS_INVALID);
|
||||
|
||||
{# Required parameter alignment when calling a routine declared as
|
||||
stdcall and cdecl. The alignment value should be the one defined
|
||||
|
Loading…
Reference in New Issue
Block a user