* several powerpc related stuff fixed

This commit is contained in:
florian 2002-09-01 21:04:47 +00:00
parent f77536fece
commit 6502638258
7 changed files with 52 additions and 23 deletions

View File

@ -576,12 +576,12 @@ unit cgobj;
a_load_reg_reg(list,size,r,locpara.register);
LOC_REFERENCE:
begin
if locpara.sp_fixup<>0 then
a_op_const_reg(list,OP_ADD,locpara.sp_fixup,stack_pointer_reg);
reference_reset(ref);
ref.base:=locpara.reference.index;
ref.offset:=locpara.reference.offset;
a_load_reg_ref(list,size,r,ref);
{!!!! FIX ME!, take sp_fixup into account }
internalerror(2002071005);
end
else
internalerror(2002071004);
@ -1585,7 +1585,10 @@ finalization
end.
{
$Log$
Revision 1.55 2002-09-01 17:05:43 florian
Revision 1.56 2002-09-01 21:04:47 florian
* several powerpc related stuff fixed
Revision 1.55 2002/09/01 17:05:43 florian
+ added abstract tcg.g_removevaluepara_openarray
Revision 1.54 2002/09/01 12:09:27 peter

View File

@ -89,6 +89,8 @@ implementation
push_value_para(hightree,inlined,false,para_offset,4,defcoll.paraloc);
end;
end;
var
otlabel,oflabel : tasmlabel;
{ temporary variables: }
@ -156,7 +158,9 @@ implementation
else
begin
if not(left.location.loc in [LOC_CREFERENCE,LOC_REFERENCE]) then
CGMessage(type_e_mismatch)
begin
CGMessage(type_e_mismatch)
end
else
begin
if inlined then
@ -1476,7 +1480,10 @@ begin
end.
{
$Log$
Revision 1.18 2002-09-01 18:43:27 peter
Revision 1.19 2002-09-01 21:04:48 florian
* several powerpc related stuff fixed
Revision 1.18 2002/09/01 18:43:27 peter
* include accumulator in regs_to_push list
Revision 1.17 2002/09/01 12:13:00 peter

View File

@ -273,15 +273,14 @@ unit paramgr;
hp:=tparaitem(p.para.first);
while assigned(hp) do
begin
{$ifdef SUPPORT_MMX}
if (hp.paraloc.loc in [LOC_REGISTER,LOC_FPUREGISTER,
LOC_MMREGISTER]) and
{$else}
if (hp.paraloc.loc in [LOC_REGISTER,LOC_FPUREGISTER]) and
{$endif}
{ if the parameter isn't regable, we've to work with the local copy }
((vo_regable in tvarsym(hp.parasym).varoptions) or
(vo_fpuregable in tvarsym(hp.parasym).varoptions)) then
(
(vo_regable in tvarsym(hp.parasym).varoptions) or
(vo_fpuregable in tvarsym(hp.parasym).varoptions) or
paramanager.push_addr_param(hp.paratype.def,p.proccalloption in [pocall_cdecl,pocall_cppdecl]) or
(hp.paratyp in [vs_var,vs_out])
) then
begin
case hp.paraloc.loc of
LOC_REGISTER:
@ -306,7 +305,10 @@ end.
{
$Log$
Revision 1.15 2002-08-25 19:25:19 peter
Revision 1.16 2002-09-01 21:04:48 florian
* several powerpc related stuff fixed
Revision 1.15 2002/08/25 19:25:19 peter
* sym.insert_in_data removed
* symtable.insertvardata/insertconstdata added
* removed insert_in_data call from symtable.insert, it needs to be

View File

@ -138,7 +138,8 @@ unit agppcgas;
'insrwi.', 'rotlwi', 'rotlwi.', 'rotlw', 'rotlw.', 'slwi', 'slwi.',
'srwi', 'srwi.', 'clrlwi', 'clrlwi.', 'clrrwi', 'clrrwi.', 'clrslwi',
'clrslwi.', 'blr', 'bctr', 'blrl', 'bctrl', 'crset', 'crclr', 'crmove',
'crnot', 'mt', 'mf','nop', 'li', 'lis', 'la', 'mr','mr.','not', 'mtcr', 'mtlr', 'mflr');
'crnot', 'mt', 'mf','nop', 'li', 'lis', 'la', 'mr','mr.','not', 'mtcr', 'mtlr', 'mflr',
'mtctr', 'mfctr');
symaddr2str: array[trefsymaddr] of string[3] = ('','@ha','@l');
@ -367,7 +368,10 @@ begin
end.
{
$Log$
Revision 1.16 2002-08-31 19:27:48 jonas
Revision 1.17 2002-09-01 21:04:48 florian
* several powerpc related stuff fixed
Revision 1.16 2002/08/31 19:27:48 jonas
+ support top_none for branches
Revision 1.15 2002/08/20 21:40:44 florian

View File

@ -1,5 +1,5 @@
{
$id: cgcpu.pas,v 1.43 2002/08/17 09:23:49 florian Exp $
$Id$
Copyright (c) 1998-2002 by Florian Klaempfl
This unit implements the code generator for the PowerPC
@ -270,7 +270,7 @@ const
list.concat(taicpu.op_reg_ref(A_STW,R_TOC,href));
tmpreg := get_scratch_reg_int(list);
a_load_ref_reg(list,OS_ADDR,ref,tmpreg);
list.concat(taicpu.op_reg_reg(A_MTSPR,R_CTR,tmpreg));
list.concat(taicpu.op_reg(A_MTCTR,tmpreg));
free_scratch_reg(list,tmpreg);
a_reg_dealloc(list,R_0);
list.concat(taicpu.op_none(A_BCCTRL));
@ -1688,7 +1688,10 @@ begin
end.
{
$Log$
Revision 1.49 2002-09-01 12:09:27 peter
Revision 1.50 2002-09-01 21:04:49 florian
* several powerpc related stuff fixed
Revision 1.49 2002/09/01 12:09:27 peter
+ a_call_reg, a_call_loc added
* removed exprasmlist references

View File

@ -83,7 +83,8 @@ uses
a_srwi, a_srwi_, a_clrlwi, a_clrlwi_, a_clrrwi, a_clrrwi_, a_clrslwi,
a_clrslwi_, a_blr, a_bctr, a_blrl, a_bctrl, a_crset, a_crclr, a_crmove,
a_crnot, a_mt {move to special prupose reg}, a_mf {move from special purpose reg},
a_nop, a_li, a_lis, a_la, a_mr, a_mr_, a_not, a_mtcr, a_mtlr, a_mflr);
a_nop, a_li, a_lis, a_la, a_mr, a_mr_, a_not, a_mtcr, a_mtlr, a_mflr,
a_mtctr, a_mfctr);
{# This should define the array of instructions as string }
op2strtable=array[tasmop] of string[8];
@ -709,7 +710,10 @@ implementation
end.
{
$Log$
Revision 1.30 2002-08-18 22:16:15 florian
Revision 1.31 2002-09-01 21:04:49 florian
* several powerpc related stuff fixed
Revision 1.30 2002/08/18 22:16:15 florian
+ the ppc gas assembler writer adds now registers aliases
to the assembler file

View File

@ -137,6 +137,7 @@ unit cpupara;
while assigned(hp) do
begin
loc:=getparaloc(hp.paratype.def);
hp.paraloc.sp_fixup:=0;
case loc of
LOC_REGISTER:
begin
@ -197,8 +198,10 @@ unit cpupara;
end
else
begin
{!!!!!!!}
internalerror(2002071005);
hp.paraloc.loc:=LOC_REFERENCE;
hp.paraloc.reference.index:=stack_pointer_reg;
hp.paraloc.reference.offset:=stack_offset;
inc(stack_offset,4);
end;
end
else
@ -228,7 +231,10 @@ begin
end.
{
$Log$
Revision 1.9 2002-08-31 12:43:31 florian
Revision 1.10 2002-09-01 21:04:49 florian
* several powerpc related stuff fixed
Revision 1.9 2002/08/31 12:43:31 florian
* ppc compilation fixed
Revision 1.8 2002/08/18 10:42:38 florian