Add pi_needs_got to current_procinfo.flags in pass_1 method if a label reference is used

git-svn-id: trunk@22448 -
This commit is contained in:
pierre 2012-09-24 15:39:26 +00:00
parent cd733daaa4
commit bc04e83b25
2 changed files with 11 additions and 1 deletions

View File

@ -203,7 +203,7 @@ implementation
uses
cutils,
verbose,systems,sysutils,
defutil,
defutil,procinfo,
cpubase,cgbase,
nld;
@ -588,6 +588,8 @@ implementation
begin
result:=nil;
expectloc:=LOC_CREFERENCE;
if (cs_create_pic in current_settings.moduleswitches) then
include(current_procinfo.flags,pi_needs_got);
end;
function trealconstnode.docompare(p: tnode): boolean;
@ -948,6 +950,9 @@ implementation
end
else
expectloc:=LOC_CREFERENCE;
if (cs_create_pic in current_settings.moduleswitches) and
(expectloc <> LOC_CONSTANT) then
include(current_procinfo.flags,pi_needs_got);
end;
@ -1227,6 +1232,9 @@ implementation
expectloc:=LOC_CONSTANT
else
expectloc:=LOC_CREFERENCE;
if (cs_create_pic in current_settings.moduleswitches) and
(expectloc <> LOC_CONSTANT) then
include(current_procinfo.flags,pi_needs_got);
end;

View File

@ -219,6 +219,8 @@ implementation
begin
result:=nil;
expectloc:=LOC_REGISTER;
if (cs_create_pic in current_settings.moduleswitches) then
include(current_procinfo.flags,pi_needs_got);
if left.nodetype<>typen then
begin
if is_objcclass(left.resultdef) and