Browse Source

* 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 -

Jonas Maebe 10 years ago
parent
commit
9079227c56
5 changed files with 17 additions and 3 deletions
  1. 1 0
      .gitattributes
  2. 1 1
      compiler/arm/narminl.pas
  3. 1 1
      compiler/ppcgen/ngppcinl.pas
  4. 1 1
      compiler/x86/nx86inl.pas
  5. 13 0
      tests/webtbs/tw27811.pp

+ 1 - 0
.gitattributes

@@ -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

+ 1 - 1
compiler/arm/narminl.pas

@@ -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;

+ 1 - 1
compiler/ppcgen/ngppcinl.pas

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

+ 1 - 1
compiler/x86/nx86inl.pas

@@ -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 - 0
tests/webtbs/tw27811.pp

@@ -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.