* fixed some PowerPC issues

This commit is contained in:
florian 2003-01-09 22:00:53 +00:00
parent 2721d341f0
commit 2102ce7031
5 changed files with 48 additions and 13 deletions

View File

@ -72,7 +72,7 @@ interface
TCgSize = (OS_NO,
{ integer registers }
OS_8,OS_16,OS_32,OS_64,OS_S8,OS_S16,OS_S32,OS_S64,
{ single,double,extended,comp }
{ single,double,extended,comp,float128 }
OS_F32,OS_F64,OS_F80,OS_C64,OS_F128,
{ multi-media sizes: split in byte, word, dword, ... }
{ entities, then the signed counterparts }
@ -107,7 +107,10 @@ implementation
end.
{
$Log$
Revision 1.17 2003-01-05 13:36:53 florian
Revision 1.18 2003-01-09 22:00:53 florian
* fixed some PowerPC issues
Revision 1.17 2003/01/05 13:36:53 florian
* x86-64 compiles
+ very basic support for float128 type (x86-64 only)

View File

@ -158,6 +158,8 @@ unit cgobj;
}
procedure a_paramaddr_ref(list : taasmoutput;const r : treference;const locpara : tparalocation);virtual;
{ Copies a whole memory block to the stack, the locpara must be a memory location }
procedure a_param_copy_ref(list : taasmoutput;size : qword;const r : treference;const locpara : tparalocation);
(* Remarks:
* If a method specifies a size you have only to take care
of that number of bits, i.e. load_const_reg with OP_8 must
@ -619,10 +621,8 @@ unit cgobj;
end;
procedure tcg.a_param_ref(list : taasmoutput;size : tcgsize;const r : treference;const locpara : tparalocation);
var
hr : tregister;
begin
hr:=get_scratch_reg_int(list);
a_load_ref_reg(list,size,r,hr);
@ -632,7 +632,6 @@ unit cgobj;
procedure tcg.a_param_loc(list : taasmoutput;const l:tlocation;const locpara : tparalocation);
begin
case l.loc of
LOC_REGISTER,
@ -650,10 +649,8 @@ unit cgobj;
procedure tcg.a_paramaddr_ref(list : taasmoutput;const r : treference;const locpara : tparalocation);
var
hr : tregister;
begin
hr:=get_scratch_reg_address(list);
a_loadaddr_ref_reg(list,r,hr);
@ -662,6 +659,22 @@ unit cgobj;
end;
procedure tcg.a_param_copy_ref(list : taasmoutput;size : qword;const r : treference;const locpara : tparalocation);
var
ref : treference;
hr : tregister;
begin
if not(locpara.loc in [LOC_REFERENCE,LOC_CREFERENCE]) then
internalerror(2003010901);
if locpara.sp_fixup<>0 then
cg.g_stackpointer_alloc(list,locpara.sp_fixup);
reference_reset(ref);
ref.base:=locpara.reference.index;
ref.offset:=locpara.reference.offset;
cg.g_concatcopy(list,r,ref,size,false,false);
end;
{****************************************************************************
some generic implementations
****************************************************************************}
@ -1681,7 +1694,10 @@ finalization
end.
{
$Log$
Revision 1.71 2003-01-09 20:41:10 florian
Revision 1.72 2003-01-09 22:00:53 florian
* fixed some PowerPC issues
Revision 1.71 2003/01/09 20:41:10 florian
* fixed broken PowerPC compiler
Revision 1.70 2003/01/08 18:43:56 daniel

View File

@ -805,6 +805,7 @@ implementation
{ copy the value on the stack or use normal parameter push? }
if paramanager.copy_value_on_stack(p.resulttype.def,calloption) then
begin
{$ifdef i386}
if not (p.location.loc in [LOC_REFERENCE,LOC_CREFERENCE]) then
internalerror(200204241);
{ push on stack }
@ -814,6 +815,9 @@ implementation
r.enum:=stack_pointer_reg;
reference_reset_base(href,r,0);
cg.g_concatcopy(exprasmlist,p.location.reference,href,size,false,false);
{$else i386}
cg.a_param_copy_ref(exprasmlist,p.resulttype.def.size,p.location.reference,locpara);
{$endif i386}
end
else
begin
@ -1960,7 +1964,10 @@ function returns in a register and the caller receives it in an other one}
end.
{
$Log$
Revision 1.74 2003-01-09 20:41:10 florian
Revision 1.75 2003-01-09 22:00:53 florian
* fixed some PowerPC issues
Revision 1.74 2003/01/09 20:41:10 florian
* fixed broken PowerPC compiler
Revision 1.73 2003/01/08 18:43:56 daniel

View File

@ -423,7 +423,7 @@ const
case size of
OS_32,OS_F32:
size:=OS_F32;
OS_64,OS_F64:
OS_64,OS_F64,OS_C64:
size:=OS_F64;
else
internalerror(200201121);
@ -2000,7 +2000,10 @@ begin
end.
{
$Log$
Revision 1.68 2003-01-08 18:43:58 daniel
Revision 1.69 2003-01-09 22:00:53 florian
* fixed some PowerPC issues
Revision 1.68 2003/01/08 18:43:58 daniel
* Tregister changed into a record
Revision 1.67 2002/12/15 19:22:01 florian

View File

@ -234,7 +234,10 @@ unit cpupara;
LOC_REFERENCE:
begin
hp.paraloc.size:=OS_ADDR;
if push_addr_param(hp.paratype.def,p.proccalloption) or (hp.paratyp in [vs_var,vs_out]) then
if push_addr_param(hp.paratype.def,p.proccalloption) or
is_open_array(hp.paratype.def) or
is_array_of_const(hp.paratype.def) or
(hp.paratyp in [vs_var,vs_out]) then
assignintreg
else
begin
@ -299,7 +302,10 @@ begin
end.
{
$Log$
Revision 1.21 2003-01-09 20:41:10 florian
Revision 1.22 2003-01-09 22:00:53 florian
* fixed some PowerPC issues
Revision 1.21 2003/01/09 20:41:10 florian
* fixed broken PowerPC compiler
Revision 1.20 2003/01/09 11:22:14 olle