* don't give an internalerror when trying to prefetch a regvar or even

something without a location at all; it's a hint/optional operation,
    so if there's nothing to prefetch just don't do anything
    (mantis #27811)

git-svn-id: trunk@30502 -
This commit is contained in:
Jonas Maebe 2015-04-08 20:35:13 +00:00
parent a8db5e3dfb
commit 9079227c56
5 changed files with 17 additions and 3 deletions

1
.gitattributes vendored
View File

@ -14388,6 +14388,7 @@ tests/webtbs/tw2776.pp svneol=native#text/plain
tests/webtbs/tw2778.pp svneol=native#text/plain
tests/webtbs/tw2779.pp svneol=native#text/plain
tests/webtbs/tw2780.pp svneol=native#text/plain
tests/webtbs/tw27811.pp svneol=native#text/plain
tests/webtbs/tw2788.pp svneol=native#text/plain
tests/webtbs/tw2789.pp svneol=native#text/plain
tests/webtbs/tw2794.pp svneol=native#text/plain

View File

@ -372,7 +372,7 @@ implementation
current_asmdata.CurrAsmList.concat(taicpu.op_ref(A_PLD,ref));
end;
else
internalerror(200402021);
{ nothing to prefetch };
end;
end;
end;

View File

@ -227,7 +227,7 @@ implementation
end;
end;
else
internalerror(200402021);
{ nothing to prefetch };
end;
end;

View File

@ -595,7 +595,7 @@ implementation
current_asmdata.CurrAsmList.concat(taicpu.op_ref(A_PREFETCHNTA,S_NO,ref));
end;
else
internalerror(200402021);
{ nothing to prefetch };
end;
end;
end;

13
tests/webtbs/tw27811.pp Normal file
View File

@ -0,0 +1,13 @@
{ %norun }
{$optimization regvar on}
procedure test;
var m,n: integer;
begin
for m := 100 downto 0 do begin
prefetch (m);
end;
end;
begin
end.