mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 21:09:24 +02:00
* fixed broken PowerPC compiler
This commit is contained in:
parent
7b2fd10fb4
commit
34a91d9171
@ -203,6 +203,7 @@ unit cgobj;
|
||||
procedure a_loadfpu_reg_ref(list: taasmoutput; size: tcgsize; reg: tregister; const ref: treference); virtual; abstract;
|
||||
procedure a_loadfpu_loc_reg(list: taasmoutput; const loc: tlocation; const reg: tregister);
|
||||
procedure a_loadfpu_reg_loc(list: taasmoutput; size: tcgsize; const reg: tregister; const loc: tlocation);
|
||||
procedure a_paramfpu_reg(list : taasmoutput;size : tcgsize;const r : tregister;const locpara : tparalocation);virtual;
|
||||
|
||||
{ vector register move instructions }
|
||||
procedure a_loadmm_reg_reg(list: taasmoutput; reg1, reg2: tregister); virtual; abstract;
|
||||
@ -886,6 +887,34 @@ unit cgobj;
|
||||
end;
|
||||
|
||||
|
||||
procedure tcg.a_paramfpu_reg(list : taasmoutput;size : tcgsize;const r : tregister;const locpara : tparalocation);
|
||||
|
||||
var
|
||||
ref : treference;
|
||||
t : Tregister;
|
||||
|
||||
begin
|
||||
case locpara.loc of
|
||||
LOC_FPUREGISTER,LOC_CFPUREGISTER:
|
||||
a_loadfpu_reg_reg(list,r,locpara.register);
|
||||
LOC_REFERENCE,LOC_CREFERENCE:
|
||||
begin
|
||||
if locpara.sp_fixup<>0 then
|
||||
begin
|
||||
t.enum:=stack_pointer_reg;
|
||||
a_op_const_reg(list,OP_ADD,locpara.sp_fixup,t);
|
||||
end;
|
||||
reference_reset(ref);
|
||||
ref.base:=locpara.reference.index;
|
||||
ref.offset:=locpara.reference.offset;
|
||||
a_loadfpu_reg_ref(list,size,r,ref);
|
||||
end
|
||||
else
|
||||
internalerror(2002071004);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure tcg.a_op_const_ref(list : taasmoutput; Op: TOpCG; size: TCGSize; a: AWord; const ref: TReference);
|
||||
|
||||
var
|
||||
@ -1652,7 +1681,10 @@ finalization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.70 2003-01-08 18:43:56 daniel
|
||||
Revision 1.71 2003-01-09 20:41:10 florian
|
||||
* fixed broken PowerPC compiler
|
||||
|
||||
Revision 1.70 2003/01/08 18:43:56 daniel
|
||||
* Tregister changed into a record
|
||||
|
||||
Revision 1.69 2002/12/24 15:56:50 peter
|
||||
|
@ -738,8 +738,10 @@ implementation
|
||||
LOC_FPUREGISTER,
|
||||
LOC_CFPUREGISTER:
|
||||
begin
|
||||
{$ifdef i386}
|
||||
size:=align(tfloatdef(p.resulttype.def).size,alignment);
|
||||
inc(pushedparasize,size);
|
||||
|
||||
if calloption<>pocall_inline then
|
||||
cg.g_stackpointer_alloc(exprasmlist,size);
|
||||
{$ifdef GDB}
|
||||
@ -757,6 +759,10 @@ implementation
|
||||
|
||||
cg.a_loadfpu_reg_ref(exprasmlist,
|
||||
def_cgsize(p.resulttype.def),p.location.register,href);
|
||||
{$else i386}
|
||||
cg.a_paramfpu_reg(exprasmlist,def_cgsize(p.resulttype.def),p.location.register,locpara);
|
||||
{$endif i386}
|
||||
|
||||
end;
|
||||
LOC_REFERENCE,
|
||||
LOC_CREFERENCE :
|
||||
@ -1954,7 +1960,10 @@ function returns in a register and the caller receives it in an other one}
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.73 2003-01-08 18:43:56 daniel
|
||||
Revision 1.74 2003-01-09 20:41:10 florian
|
||||
* fixed broken PowerPC compiler
|
||||
|
||||
Revision 1.73 2003/01/08 18:43:56 daniel
|
||||
* Tregister changed into a record
|
||||
|
||||
Revision 1.72 2002/12/29 23:51:43 florian
|
||||
|
@ -227,7 +227,7 @@ unit cpupara;
|
||||
else
|
||||
begin
|
||||
{!!!!!!!}
|
||||
hp.paraloc.size:=def_cgsize(hp.paratype.def);
|
||||
hp.paraloc.size:=def_cgsize(hp.paratype.def);
|
||||
internalerror(2002071004);
|
||||
end;
|
||||
end;
|
||||
@ -299,7 +299,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.20 2003-01-09 11:22:14 olle
|
||||
Revision 1.21 2003-01-09 20:41:10 florian
|
||||
* fixed broken PowerPC compiler
|
||||
|
||||
Revision 1.20 2003/01/09 11:22:14 olle
|
||||
* made powerpc compiler compile after Daniels Tregister modification
|
||||
|
||||
Revision 1.19 2003/01/08 18:43:58 daniel
|
||||
|
@ -456,6 +456,7 @@ implementation
|
||||
hl:=truelabel;
|
||||
truelabel:=falselabel;
|
||||
falselabel:=hl;
|
||||
location.loc:=LOC_JUMP;
|
||||
end;
|
||||
LOC_FLAGS :
|
||||
begin
|
||||
@ -505,7 +506,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.21 2003-01-08 18:43:58 daniel
|
||||
Revision 1.22 2003-01-09 20:41:10 florian
|
||||
* fixed broken PowerPC compiler
|
||||
|
||||
Revision 1.21 2003/01/08 18:43:58 daniel
|
||||
* Tregister changed into a record
|
||||
|
||||
Revision 1.20 2002/11/25 17:43:28 peter
|
||||
|
Loading…
Reference in New Issue
Block a user