mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 17:41:57 +02:00
* fixed compile of powerpc,sparc,arm
This commit is contained in:
parent
8acd96fa67
commit
0c7e53bb81
@ -269,7 +269,7 @@ Unit raarmgas;
|
|||||||
will generate buggy code. Allow it only for explicit typecasting }
|
will generate buggy code. Allow it only for explicit typecasting }
|
||||||
if hasdot and
|
if hasdot and
|
||||||
(not oper.hastype) and
|
(not oper.hastype) and
|
||||||
(tvarsym(oper.opr.localsym).owner.symtabletype=parasymtable) and
|
(tabstractnormalvarsym(oper.opr.localsym).owner.symtabletype=parasymtable) and
|
||||||
(current_procinfo.procdef.proccalloption<>pocall_register) then
|
(current_procinfo.procdef.proccalloption<>pocall_register) then
|
||||||
Message(asmr_e_cannot_access_field_directly_for_parameters);
|
Message(asmr_e_cannot_access_field_directly_for_parameters);
|
||||||
inc(oper.opr.localsymofs,l)
|
inc(oper.opr.localsymofs,l)
|
||||||
@ -748,7 +748,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.9 2004-06-20 08:55:31 florian
|
Revision 1.10 2004-11-11 19:31:33 peter
|
||||||
|
* fixed compile of powerpc,sparc,arm
|
||||||
|
|
||||||
|
Revision 1.9 2004/06/20 08:55:31 florian
|
||||||
* logs truncated
|
* logs truncated
|
||||||
|
|
||||||
Revision 1.8 2004/03/02 00:36:33 olle
|
Revision 1.8 2004/03/02 00:36:33 olle
|
||||||
|
@ -134,7 +134,7 @@ interface
|
|||||||
|
|
||||||
procedure ResolveRef(var op:toper);
|
procedure ResolveRef(var op:toper);
|
||||||
var
|
var
|
||||||
sym : tlocalvarsym;
|
sym : tabstractnormalvarsym;
|
||||||
{$ifdef x86}
|
{$ifdef x86}
|
||||||
scale : byte;
|
scale : byte;
|
||||||
{$endif x86}
|
{$endif x86}
|
||||||
@ -150,7 +150,7 @@ interface
|
|||||||
scale:=op.localoper^.localscale;
|
scale:=op.localoper^.localscale;
|
||||||
{$endif x86}
|
{$endif x86}
|
||||||
getoffset:=op.localoper^.localgetoffset;
|
getoffset:=op.localoper^.localgetoffset;
|
||||||
sym:=tlocalvarsym(pointer(op.localoper^.localsym));
|
sym:=tabstractnormalvarsym(pointer(op.localoper^.localsym));
|
||||||
dispose(op.localoper);
|
dispose(op.localoper);
|
||||||
case sym.localloc.loc of
|
case sym.localloc.loc of
|
||||||
LOC_REFERENCE :
|
LOC_REFERENCE :
|
||||||
@ -491,7 +491,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.70 2004-11-08 22:09:59 peter
|
Revision 1.71 2004-11-11 19:31:33 peter
|
||||||
|
* fixed compile of powerpc,sparc,arm
|
||||||
|
|
||||||
|
Revision 1.70 2004/11/08 22:09:59 peter
|
||||||
* tvarsym splitted
|
* tvarsym splitted
|
||||||
|
|
||||||
Revision 1.69 2004/10/31 21:45:03 peter
|
Revision 1.69 2004/10/31 21:45:03 peter
|
||||||
|
@ -1348,7 +1348,7 @@ implementation
|
|||||||
{$ifdef sparc}
|
{$ifdef sparc}
|
||||||
{ Sparc passes floats in int registers, when loading to fpu register
|
{ Sparc passes floats in int registers, when loading to fpu register
|
||||||
we need a temp }
|
we need a temp }
|
||||||
tg.GetTemp(list,TCGSize2Size[tvarsym(hp.parasym).localloc.size],tt_normal,tempref);
|
tg.GetTemp(list,TCGSize2Size[tparavarsym(hp.parasym).localloc.size],tt_normal,tempref);
|
||||||
href:=tempref;
|
href:=tempref;
|
||||||
while assigned(paraloc) do
|
while assigned(paraloc) do
|
||||||
begin
|
begin
|
||||||
@ -1357,7 +1357,7 @@ implementation
|
|||||||
inc(href.offset,TCGSize2Size[paraloc^.size]);
|
inc(href.offset,TCGSize2Size[paraloc^.size]);
|
||||||
paraloc:=paraloc^.next;
|
paraloc:=paraloc^.next;
|
||||||
end;
|
end;
|
||||||
cg.a_loadfpu_ref_reg(list,tvarsym(hp.parasym).localloc.size,tempref,tvarsym(hp.parasym).localloc.register);
|
cg.a_loadfpu_ref_reg(list,tparavarsym(hp.parasym).localloc.size,tempref,tparavarsym(hp.parasym).localloc.register);
|
||||||
tg.UnGetTemp(list,tempref);
|
tg.UnGetTemp(list,tempref);
|
||||||
{$else sparc}
|
{$else sparc}
|
||||||
unget_para(paraloc^);
|
unget_para(paraloc^);
|
||||||
@ -2212,7 +2212,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.239 2004-11-09 17:26:47 peter
|
Revision 1.240 2004-11-11 19:31:33 peter
|
||||||
|
* fixed compile of powerpc,sparc,arm
|
||||||
|
|
||||||
|
Revision 1.239 2004/11/09 17:26:47 peter
|
||||||
* fixed wrong typecasts
|
* fixed wrong typecasts
|
||||||
|
|
||||||
Revision 1.238 2004/11/08 22:09:59 peter
|
Revision 1.238 2004/11/08 22:09:59 peter
|
||||||
|
@ -1176,13 +1176,13 @@ begin
|
|||||||
include(pd.procoptions,po_explicitparaloc);
|
include(pd.procoptions,po_explicitparaloc);
|
||||||
if consume_sym(sym,symtable) then
|
if consume_sym(sym,symtable) then
|
||||||
begin
|
begin
|
||||||
if (sym.typ=varsym) and
|
if (sym.typ in [localvarsym,paravarsym]) and
|
||||||
((tvarsym(sym).vartype.def.deftype=pointerdef) or
|
((tabstractvarsym(sym).vartype.def.deftype=pointerdef) or
|
||||||
is_32bitint(tvarsym(sym).vartype.def)
|
is_32bitint(tabstractvarsym(sym).vartype.def)
|
||||||
) then
|
) then
|
||||||
begin
|
begin
|
||||||
tprocdef(pd).libsym:=sym;
|
tprocdef(pd).libsym:=sym;
|
||||||
pd.concatpara(nil,tvarsym(sym).vartype,tvarsym(sym),nil,true);
|
pd.concatpara(nil,tabstractvarsym(sym).vartype,tabstractvarsym(sym),nil,true);
|
||||||
paramanager.parseparaloc(tparaitem(pd.para.last),'A6');
|
paramanager.parseparaloc(tparaitem(pd.para.last),'A6');
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -2266,7 +2266,10 @@ const
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.202 2004-11-09 22:32:59 peter
|
Revision 1.203 2004-11-11 19:31:33 peter
|
||||||
|
* fixed compile of powerpc,sparc,arm
|
||||||
|
|
||||||
|
Revision 1.202 2004/11/09 22:32:59 peter
|
||||||
* small m68k updates to bring it up2date
|
* small m68k updates to bring it up2date
|
||||||
* give better error for external local variable
|
* give better error for external local variable
|
||||||
|
|
||||||
|
@ -1178,10 +1178,11 @@ const
|
|||||||
begin
|
begin
|
||||||
if assigned(hp.paraloc[callerside].location^.next) then
|
if assigned(hp.paraloc[callerside].location^.next) then
|
||||||
internalerror(2004091210);
|
internalerror(2004091210);
|
||||||
case tvarsym(hp.parasym).localloc.loc of
|
case tabstractnormalvarsym(hp.parasym).localloc.loc of
|
||||||
LOC_REFERENCE:
|
LOC_REFERENCE:
|
||||||
begin
|
begin
|
||||||
reference_reset_base(href,tvarsym(hp.parasym).localloc.reference.base,tvarsym(hp.parasym).localloc.reference.offset);
|
reference_reset_base(href,tabstractnormalvarsym(hp.parasym).localloc.reference.base,
|
||||||
|
tabstractnormalvarsym(hp.parasym).localloc.reference.offset);
|
||||||
reference_reset_base(href2,NR_R12,hp.paraloc[callerside].location^.reference.offset);
|
reference_reset_base(href2,NR_R12,hp.paraloc[callerside].location^.reference.offset);
|
||||||
{ we can't use functions here which allocate registers (FK)
|
{ we can't use functions here which allocate registers (FK)
|
||||||
cg.a_load_ref_ref(list,hp.paraloc[calleeside].size,hp.paraloc[calleeside].size,href2,href);
|
cg.a_load_ref_ref(list,hp.paraloc[calleeside].size,hp.paraloc[calleeside].size,href2,href);
|
||||||
@ -2356,7 +2357,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.184 2004-10-31 21:45:03 peter
|
Revision 1.185 2004-11-11 19:31:33 peter
|
||||||
|
* fixed compile of powerpc,sparc,arm
|
||||||
|
|
||||||
|
Revision 1.184 2004/10/31 21:45:03 peter
|
||||||
* generic tlocation
|
* generic tlocation
|
||||||
* move tlocation to cgutils
|
* move tlocation to cgutils
|
||||||
|
|
||||||
|
@ -90,14 +90,15 @@ unit nppcld;
|
|||||||
case target_info.system of
|
case target_info.system of
|
||||||
system_powerpc_darwin:
|
system_powerpc_darwin:
|
||||||
begin
|
begin
|
||||||
if (tvarsym(symtableentry).owner.unitid<>0) or (vo_is_dll_var in tvarsym(symtableentry).varoptions) then
|
if (tglobalvarsym(symtableentry).owner.unitid<>0) or
|
||||||
|
(vo_is_dll_var in tglobalvarsym(symtableentry).varoptions) then
|
||||||
begin
|
begin
|
||||||
l:=objectlibrary.getasmsymbol('L'+tvarsym(symtableentry).mangledname+'$non_lazy_ptr');
|
l:=objectlibrary.getasmsymbol('L'+tglobalvarsym(symtableentry).mangledname+'$non_lazy_ptr');
|
||||||
if not(assigned(l)) then
|
if not(assigned(l)) then
|
||||||
begin
|
begin
|
||||||
l:=objectlibrary.newasmsymbol('L'+tvarsym(symtableentry).mangledname+'$non_lazy_ptr',AB_COMMON,AT_DATA);
|
l:=objectlibrary.newasmsymbol('L'+tglobalvarsym(symtableentry).mangledname+'$non_lazy_ptr',AB_COMMON,AT_DATA);
|
||||||
picdata.concat(tai_symbol.create(l,0));
|
picdata.concat(tai_symbol.create(l,0));
|
||||||
picdata.concat(tai_const.create_indirect_sym(objectlibrary.newasmsymbol(tvarsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA)));
|
picdata.concat(tai_const.create_indirect_sym(objectlibrary.newasmsymbol(tglobalvarsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA)));
|
||||||
picdata.concat(tai_const.create_32bit(0));
|
picdata.concat(tai_const.create_32bit(0));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -121,7 +122,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.4 2004-07-19 12:45:43 jonas
|
Revision 1.5 2004-11-11 19:31:33 peter
|
||||||
|
* fixed compile of powerpc,sparc,arm
|
||||||
|
|
||||||
|
Revision 1.4 2004/07/19 12:45:43 jonas
|
||||||
* fixed loading external procedure addresses
|
* fixed loading external procedure addresses
|
||||||
|
|
||||||
Revision 1.3 2004/06/17 16:55:46 peter
|
Revision 1.3 2004/06/17 16:55:46 peter
|
||||||
|
@ -290,7 +290,7 @@ Unit rappcgas;
|
|||||||
will generate buggy code. Allow it only for explicit typecasting }
|
will generate buggy code. Allow it only for explicit typecasting }
|
||||||
if hasdot and
|
if hasdot and
|
||||||
(not oper.hastype) and
|
(not oper.hastype) and
|
||||||
(tvarsym(oper.opr.localsym).owner.symtabletype=parasymtable) and
|
(tabstractvarsym(oper.opr.localsym).owner.symtabletype=parasymtable) and
|
||||||
(current_procinfo.procdef.proccalloption<>pocall_register) then
|
(current_procinfo.procdef.proccalloption<>pocall_register) then
|
||||||
Message(asmr_e_cannot_access_field_directly_for_parameters);
|
Message(asmr_e_cannot_access_field_directly_for_parameters);
|
||||||
inc(oper.opr.localsymofs,l)
|
inc(oper.opr.localsymofs,l)
|
||||||
@ -753,7 +753,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.16 2004-06-20 08:55:32 florian
|
Revision 1.17 2004-11-11 19:31:33 peter
|
||||||
|
* fixed compile of powerpc,sparc,arm
|
||||||
|
|
||||||
|
Revision 1.16 2004/06/20 08:55:32 florian
|
||||||
* logs truncated
|
* logs truncated
|
||||||
|
|
||||||
Revision 1.15 2004/06/16 20:07:10 florian
|
Revision 1.15 2004/06/16 20:07:10 florian
|
||||||
|
@ -264,7 +264,7 @@ Interface
|
|||||||
will generate buggy code. Allow it only for explicit typecasting }
|
will generate buggy code. Allow it only for explicit typecasting }
|
||||||
if hasdot and
|
if hasdot and
|
||||||
(not oper.hastype) and
|
(not oper.hastype) and
|
||||||
(tvarsym(oper.opr.localsym).owner.symtabletype=parasymtable) and
|
(tabstractnormalvarsym(oper.opr.localsym).owner.symtabletype=parasymtable) and
|
||||||
(current_procinfo.procdef.proccalloption<>pocall_register) then
|
(current_procinfo.procdef.proccalloption<>pocall_register) then
|
||||||
Message(asmr_e_cannot_access_field_directly_for_parameters);
|
Message(asmr_e_cannot_access_field_directly_for_parameters);
|
||||||
inc(oper.opr.localsymofs,l)
|
inc(oper.opr.localsymofs,l)
|
||||||
@ -684,7 +684,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.10 2004-06-20 08:55:32 florian
|
Revision 1.11 2004-11-11 19:31:33 peter
|
||||||
|
* fixed compile of powerpc,sparc,arm
|
||||||
|
|
||||||
|
Revision 1.10 2004/06/20 08:55:32 florian
|
||||||
* logs truncated
|
* logs truncated
|
||||||
|
|
||||||
Revision 1.9 2004/06/16 20:07:11 florian
|
Revision 1.9 2004/06/16 20:07:11 florian
|
||||||
|
@ -4319,7 +4319,7 @@ implementation
|
|||||||
procsym:=tprocsym(procsymderef.resolve);
|
procsym:=tprocsym(procsymderef.resolve);
|
||||||
{$ifdef powerpc}
|
{$ifdef powerpc}
|
||||||
{ library symbol for AmigaOS/MorphOS }
|
{ library symbol for AmigaOS/MorphOS }
|
||||||
libsym:=tvarsym(libsymderef.resolve);
|
libsym:=tsym(libsymderef.resolve);
|
||||||
{$endif powerpc}
|
{$endif powerpc}
|
||||||
|
|
||||||
aktparasymtable:=oldparasymtable;
|
aktparasymtable:=oldparasymtable;
|
||||||
@ -6244,7 +6244,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.269 2004-11-08 22:09:59 peter
|
Revision 1.270 2004-11-11 19:31:33 peter
|
||||||
|
* fixed compile of powerpc,sparc,arm
|
||||||
|
|
||||||
|
Revision 1.269 2004/11/08 22:09:59 peter
|
||||||
* tvarsym splitted
|
* tvarsym splitted
|
||||||
|
|
||||||
Revision 1.268 2004/11/06 17:44:47 florian
|
Revision 1.268 2004/11/06 17:44:47 florian
|
||||||
|
@ -33,7 +33,7 @@ interface
|
|||||||
timportlibmacos=class(timportlib)
|
timportlibmacos=class(timportlib)
|
||||||
procedure preparelib(const s:string);override;
|
procedure preparelib(const s:string);override;
|
||||||
procedure importprocedure(aprocdef:tprocdef;const module:string;index:longint;const name:string);override;
|
procedure importprocedure(aprocdef:tprocdef;const module:string;index:longint;const name:string);override;
|
||||||
procedure importvariable(vs:tvarsym;const name,module:string);override;
|
procedure importvariable(vs:tglobalvarsym;const name,module:string);override;
|
||||||
procedure generatelib;override;
|
procedure generatelib;override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure timportlibmacos.importvariable(vs:tvarsym;const name,module:string);
|
procedure timportlibmacos.importvariable(vs:tglobalvarsym;const name,module:string);
|
||||||
begin
|
begin
|
||||||
{ insert sharedlibrary }
|
{ insert sharedlibrary }
|
||||||
current_module.linkothersharedlibs.add(SplitName(module),link_allways);
|
current_module.linkothersharedlibs.add(SplitName(module),link_allways);
|
||||||
@ -252,7 +252,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.13 2004-10-25 15:38:41 peter
|
Revision 1.14 2004-11-11 19:31:33 peter
|
||||||
|
* fixed compile of powerpc,sparc,arm
|
||||||
|
|
||||||
|
Revision 1.13 2004/10/25 15:38:41 peter
|
||||||
* heap and heapsize removed
|
* heap and heapsize removed
|
||||||
* checkpointer fixes
|
* checkpointer fixes
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user