mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 19:43:15 +01:00
* Removed/commented more unused variables.
* Fixed some uninitialized variable warnings. git-svn-id: trunk@11442 -
This commit is contained in:
parent
6c6bf452ca
commit
fd0ed50331
@ -71,7 +71,7 @@ Unit aopt;
|
||||
{ Walks through the paasmlist to find the lowest and highest label number. }
|
||||
{ Returns the last Pai object of the current block }
|
||||
Var LabelFound: Boolean;
|
||||
p, prev: tai;
|
||||
p: tai;
|
||||
Begin
|
||||
LabelInfo^.LowLabel := High(AWord);
|
||||
LabelInfo^.HighLabel := 0;
|
||||
@ -79,7 +79,6 @@ Unit aopt;
|
||||
LabelInfo^.LabelTable:=nil;
|
||||
LabelFound := False;
|
||||
P := BlockStart;
|
||||
prev := p;
|
||||
With LabelInfo^ Do
|
||||
Begin
|
||||
While Assigned(P) And
|
||||
@ -96,7 +95,6 @@ Unit aopt;
|
||||
If (tai_Label(p).labsym.labelnr > HighLabel) Then
|
||||
HighLabel := tai_Label(p).labsym.labelnr
|
||||
End;
|
||||
prev := p;
|
||||
GetNextInstruction(p, p)
|
||||
End;
|
||||
blockend:=p;
|
||||
@ -110,10 +108,10 @@ Unit aopt;
|
||||
{ Builds a table with the locations of the labels in the TAsmList. }
|
||||
{ Also fixes some RegDeallocs like "# %eax released; push (%eax)" }
|
||||
Var p{, hp1, hp2}: tai;
|
||||
UsedRegs: TRegSet;
|
||||
{UsedRegs: TRegSet;}
|
||||
LabelIdx : longint;
|
||||
Begin
|
||||
UsedRegs := [];
|
||||
{UsedRegs := [];}
|
||||
With LabelInfo^ Do
|
||||
If (LabelDif <> 0) Then
|
||||
Begin
|
||||
|
||||
@ -1279,8 +1279,8 @@ implementation
|
||||
* required to have unspecified size in the instruction too...)
|
||||
}
|
||||
var
|
||||
i,{j,}asize{,oprs} : longint;
|
||||
siz : array[0..3] of longint;
|
||||
i{,j,asize,oprs} : longint;
|
||||
{siz : array[0..3] of longint;}
|
||||
begin
|
||||
Matches:=100;
|
||||
writeln(getstring,'---');
|
||||
@ -1369,8 +1369,8 @@ implementation
|
||||
{ as default an untyped size can get all the sizes, this is different
|
||||
from nasm, but else we need to do a lot checking which opcodes want
|
||||
size or not with the automatic size generation }
|
||||
asize:=longint($ffffffff);
|
||||
(*
|
||||
asize:=longint($ffffffff);
|
||||
if (p^.flags and IF_SB)<>0 then
|
||||
asize:=OT_BITS8
|
||||
else if (p^.flags and IF_SW)<>0 then
|
||||
|
||||
@ -418,7 +418,7 @@ var
|
||||
HighFound, OrgRegFound: longint;
|
||||
regcounter, regCounter2, tmpreg, base, index: tsuperregister;
|
||||
OrgRegResult: Boolean;
|
||||
TmpResult, flagResultsNeeded, stopchecking: Boolean;
|
||||
TmpResult, flagResultsNeeded: Boolean;
|
||||
begin {CheckSequence}
|
||||
TmpResult := False;
|
||||
FillChar(OrgRegInfo, Sizeof(OrgRegInfo), 0);
|
||||
@ -458,7 +458,6 @@ begin {CheckSequence}
|
||||
hp3 := p;
|
||||
if checkingprevsequences then
|
||||
prevreginfo := reginfo;
|
||||
stopchecking := false;
|
||||
while (Found <> OldNrofMods) and
|
||||
{ old new }
|
||||
InstructionsEquivalent(hp2, hp3, reginfo) and
|
||||
|
||||
@ -451,7 +451,7 @@ procedure AddRegDeallocFor(asml: TAsmList; reg: tregister; p: tai);
|
||||
var
|
||||
hp1: tai;
|
||||
funcResRegs: tregset;
|
||||
funcResReg: boolean;
|
||||
{ funcResReg: boolean;}
|
||||
begin
|
||||
{ if not(supreg in rg.usableregsint) then
|
||||
exit;}
|
||||
@ -461,7 +461,7 @@ begin
|
||||
{ funcResRegs := funcResRegs - rg.usableregsint;}
|
||||
{ funcResRegs := funcResRegs - [RS_EDI];}
|
||||
{ funcResRegs := funcResRegs - [RS_EAX,RS_EBX,RS_ECX,RS_EDX,RS_ESI]; }
|
||||
funcResReg := getsupreg(reg) in funcresregs;
|
||||
{ funcResReg := getsupreg(reg) in funcresregs;}
|
||||
|
||||
hp1 := p;
|
||||
{
|
||||
|
||||
@ -111,7 +111,7 @@ begin
|
||||
removeLastDeallocForFuncRes(asmL, p);
|
||||
doFPULoadStoreOpt := true;
|
||||
end
|
||||
{ can't be done because the store operation rounds
|
||||
(* can't be done because the store operation rounds
|
||||
else
|
||||
{ fst can't store an extended value! }
|
||||
if (taicpu(p).opsize <> S_FX) and
|
||||
@ -123,7 +123,7 @@ begin
|
||||
asml.remove(hp1);
|
||||
hp1.free;
|
||||
end
|
||||
}
|
||||
*)
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -2776,7 +2776,7 @@ const pemagic : array[0..3] of byte = (
|
||||
end;
|
||||
{ Read Function name from DLL, prepend _ and terminate with #0 }
|
||||
DLLReader.Seek(sechdr.datapos+NameOfs);
|
||||
DLLReader.Read(FuncName[1],sizeof(FuncName)-3);
|
||||
DLLReader.Read((@FuncName[1])^,sizeof(FuncName)-3);
|
||||
FuncName[sizeof(FuncName)-1]:=#0;
|
||||
FuncName[0]:=chr(Strlen(@FuncName[1]));
|
||||
readdllproc(DLLName,FuncName);
|
||||
|
||||
@ -64,12 +64,12 @@ interface
|
||||
private
|
||||
symtabsect,
|
||||
strtabsect,
|
||||
shstrtabsect,
|
||||
gotpcsect,
|
||||
shstrtabsect: TElfObjSection;
|
||||
{gotpcsect,
|
||||
gotoffsect,
|
||||
goTSect,
|
||||
plTSect,
|
||||
symsect : TElfObjSection;
|
||||
symsect : TElfObjSection;}
|
||||
elf32data : TElfObjData;
|
||||
symidx,
|
||||
localsyms : longint;
|
||||
|
||||
@ -1541,18 +1541,18 @@ implementation
|
||||
var
|
||||
main_file : tinputfile;
|
||||
hp,hp2 : tmodule;
|
||||
finalize_procinfo,
|
||||
{finalize_procinfo,
|
||||
init_procinfo,
|
||||
main_procinfo : tcgprocinfo;
|
||||
main_procinfo : tcgprocinfo;}
|
||||
force_init_final : boolean;
|
||||
uu : tused_unit;
|
||||
begin
|
||||
Status.IsPackage:=true;
|
||||
Status.IsExe:=true;
|
||||
parse_only:=false;
|
||||
main_procinfo:=nil;
|
||||
{main_procinfo:=nil;
|
||||
init_procinfo:=nil;
|
||||
finalize_procinfo:=nil;
|
||||
finalize_procinfo:=nil;}
|
||||
|
||||
if not RelocSectionSetExplicitly then
|
||||
RelocSection:=true;
|
||||
@ -1645,7 +1645,7 @@ implementation
|
||||
{ should we force unit initialization? }
|
||||
force_init_final:=tstaticsymtable(current_module.localsymtable).needs_init_final;
|
||||
if force_init_final then
|
||||
init_procinfo:=gen_implicit_initfinal(uf_init,current_module.localsymtable);
|
||||
{init_procinfo:=gen_implicit_initfinal(uf_init,current_module.localsymtable)};
|
||||
|
||||
{ Add symbol to the exports section for win32 so smartlinking a
|
||||
DLL will include the edata section }
|
||||
|
||||
@ -1206,10 +1206,10 @@ implementation
|
||||
}
|
||||
procedure dir_warn;
|
||||
var
|
||||
warning_string,state : string;
|
||||
state : string;
|
||||
begin
|
||||
current_scanner.skipspace;
|
||||
warning_string:=current_scanner.readid;
|
||||
current_scanner.readid;
|
||||
current_scanner.skipspace;
|
||||
state:=current_scanner.readid;
|
||||
if (upper(state)='ON') then
|
||||
|
||||
@ -290,6 +290,7 @@ var tmp1,tmp2,tmp3:string;
|
||||
func : string;
|
||||
begin
|
||||
aout_init;
|
||||
func:='';
|
||||
tmp2:=func;
|
||||
if profile_flag and not (copy(func,1,4)='_16_') then
|
||||
begin
|
||||
|
||||
@ -232,9 +232,9 @@ Function TLinkersolaris.WriteResponseFile(isdll:boolean) : Boolean;
|
||||
Var
|
||||
linkres : TLinkRes;
|
||||
i : longint;
|
||||
cprtobj,
|
||||
{ cprtobj,
|
||||
gprtobj,
|
||||
prtobj : string[80];
|
||||
prtobj : string[80];}
|
||||
HPath : TCmdStrListItem;
|
||||
s,s2 : TCmdStr;
|
||||
linkdynamic,
|
||||
@ -245,12 +245,12 @@ begin
|
||||
linkdynamic:=not(SharedLibFiles.empty);
|
||||
{ linkdynamic:=false; // da nicht getestet }
|
||||
linklibc:=(SharedLibFiles.Find('c')<>nil);
|
||||
prtobj:='prt0';
|
||||
{ prtobj:='prt0';
|
||||
cprtobj:='cprt0';
|
||||
gprtobj:='gprt0';
|
||||
gprtobj:='gprt0';}
|
||||
if cs_profile in current_settings.moduleswitches then
|
||||
begin
|
||||
prtobj:=gprtobj;
|
||||
{ prtobj:=gprtobj;}
|
||||
if not glibc2 then
|
||||
AddSharedLibrary('gmon');
|
||||
AddSharedLibrary('c');
|
||||
@ -259,7 +259,9 @@ begin
|
||||
else
|
||||
begin
|
||||
if linklibc then
|
||||
prtobj:=cprtobj
|
||||
begin
|
||||
{ prtobj:=cprtobj;}
|
||||
end
|
||||
else
|
||||
AddSharedLibrary('c'); { quick hack: this solaris implementation needs alwys libc }
|
||||
end;
|
||||
|
||||
@ -894,14 +894,14 @@ implementation
|
||||
procedure TExportLibWin.generatenasmlib;
|
||||
var
|
||||
hp : texported_item;
|
||||
p : pchar;
|
||||
s : string;
|
||||
{p : pchar;
|
||||
s : string;}
|
||||
begin
|
||||
new_section(current_asmdata.asmlists[al_exports],sec_code,'',0);
|
||||
hp:=texported_item(current_module._exports.first);
|
||||
while assigned(hp) do
|
||||
begin
|
||||
case hp.sym.typ of
|
||||
{ case hp.sym.typ of
|
||||
staticvarsym :
|
||||
s:=tstaticvarsym(hp.sym).mangledname;
|
||||
procsym :
|
||||
@ -910,7 +910,7 @@ implementation
|
||||
s:='';
|
||||
end;
|
||||
p:=strpnew(#9+'export '+s+' '+hp.Name^+' '+tostr(hp.index));
|
||||
{current_asmdata.asmlists[al_exports].concat(tai_direct.create(p));}
|
||||
current_asmdata.asmlists[al_exports].concat(tai_direct.create(p));}
|
||||
hp:=texported_item(hp.next);
|
||||
end;
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user