Browse Source

* handle mm register properly when used as top_local, resolves #14566

git-svn-id: trunk@14535 -
florian 15 years ago
parent
commit
40cea8d4d5
3 changed files with 25 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 15 0
      compiler/ncgbas.pas
  3. 9 0
      tests/webtbs/tw14566.pp

+ 1 - 0
.gitattributes

@@ -10140,6 +10140,7 @@ tests/webtbs/tw1451.pp svneol=native#text/plain
 tests/webtbs/tw14514.pp svneol=native#text/plain
 tests/webtbs/tw14514.pp svneol=native#text/plain
 tests/webtbs/tw14536.pp svneol=native#text/plain
 tests/webtbs/tw14536.pp svneol=native#text/plain
 tests/webtbs/tw14553.pp svneol=native#text/pascal
 tests/webtbs/tw14553.pp svneol=native#text/pascal
+tests/webtbs/tw14566.pp svneol=native#text/pascal
 tests/webtbs/tw14617.pp svneol=native#text/plain
 tests/webtbs/tw14617.pp svneol=native#text/plain
 tests/webtbs/tw1470.pp svneol=native#text/plain
 tests/webtbs/tw1470.pp svneol=native#text/plain
 tests/webtbs/tw1472.pp svneol=native#text/plain
 tests/webtbs/tw1472.pp svneol=native#text/plain

+ 15 - 0
compiler/ncgbas.pas

@@ -206,6 +206,21 @@ interface
                         op.reg:=sym.localloc.register;
                         op.reg:=sym.localloc.register;
                       end;
                       end;
                   end;
                   end;
+                LOC_MMREGISTER :
+                  begin
+                    if getoffset then
+                      Message(asmr_e_invalid_reference_syntax);
+                    { Subscribed access }
+                    if forceref or (sofs<>0) then
+                      internalerror(201001032)
+                    else
+                      begin
+                        op.typ:=top_reg;
+                        op.reg:=sym.localloc.register;
+                      end;
+                  end;
+                else
+                  internalerror(201001031);
               end;
               end;
             end;
             end;
         end;
         end;

+ 9 - 0
tests/webtbs/tw14566.pp

@@ -0,0 +1,9 @@
+{ %cpu=x86_64 }
+{ %norun }
+procedure p(xmm0 : double);assembler;
+asm
+  movaps %xmm0,xmm0
+end;
+
+begin
+end.