Browse Source

--- Reverse-merging r23700 into '.':
U compiler/x86_64/cpupara.pas
U compiler/x86/aasmcpu.pas
U compiler/x86/cgx86.pas
D tests/webtbs/tw23962.pp

git-svn-id: branches/fixes_2_6@25955 -

marco 11 years ago
parent
commit
b74b811673
5 changed files with 3 additions and 53 deletions
  1. 0 1
      .gitattributes
  2. 0 2
      compiler/x86/aasmcpu.pas
  3. 1 2
      compiler/x86/cgx86.pas
  4. 2 2
      compiler/x86_64/cpupara.pas
  5. 0 46
      tests/webtbs/tw23962.pp

+ 0 - 1
.gitattributes

@@ -12091,7 +12091,6 @@ tests/webtbs/tw2377.pp svneol=native#text/plain
 tests/webtbs/tw2378.pp svneol=native#text/plain
 tests/webtbs/tw2382.pp svneol=native#text/plain
 tests/webtbs/tw2388.pp svneol=native#text/plain
-tests/webtbs/tw23962.pp svneol=native#text/plain
 tests/webtbs/tw2397.pp svneol=native#text/plain
 tests/webtbs/tw24007.pp svneol=native#text/plain
 tests/webtbs/tw2409.pp svneol=native#text/plain

+ 0 - 2
compiler/x86/aasmcpu.pas

@@ -2511,7 +2511,6 @@ implementation
                 result:=taicpu.op_ref_reg(A_MOVSD,reg2opsize(r),ref,r);
               R_SUBMMS:
                 result:=taicpu.op_ref_reg(A_MOVSS,reg2opsize(r),ref,r);
-              R_SUBQ,
               R_SUBMMWHOLE:
                 result:=taicpu.op_ref_reg(A_MOVQ,S_NO,ref,r);
               else
@@ -2548,7 +2547,6 @@ implementation
                 result:=taicpu.op_reg_ref(A_MOVSD,reg2opsize(r),r,ref);
               R_SUBMMS:
                 result:=taicpu.op_reg_ref(A_MOVSS,reg2opsize(r),r,ref);
-              R_SUBQ,
               R_SUBMMWHOLE:
                 result:=taicpu.op_reg_ref(A_MOVQ,S_NO,r,ref);
               else

+ 1 - 2
compiler/x86/cgx86.pas

@@ -199,8 +199,7 @@ unit cgx86;
             result:=rg[R_MMREGISTER].getregister(list,R_SUBMMD);
           OS_F32:
             result:=rg[R_MMREGISTER].getregister(list,R_SUBMMS);
-          OS_M64:
-            result:=rg[R_MMREGISTER].getregister(list,R_SUBQ);
+          OS_M64,
           OS_M128:
             result:=rg[R_MMREGISTER].getregister(list,R_SUBMMWHOLE);
           else

+ 2 - 2
compiler/x86_64/cpupara.pas

@@ -935,7 +935,7 @@ unit cpupara;
                           end;
                         else
                           begin
-                            setsubreg(paraloc^.register,R_SUBQ);
+                            setsubreg(paraloc^.register,R_SUBMMWHOLE);
                             paraloc^.size:=OS_M64;
                           end;
                       end;
@@ -1124,7 +1124,7 @@ unit cpupara;
                               end;
                             else
                               begin
-                                subreg:=R_SUBQ;
+                                subreg:=R_SUBMMWHOLE;
                                 paraloc^.size:=OS_M64;
                               end;
                           end;

+ 0 - 46
tests/webtbs/tw23962.pp

@@ -1,46 +0,0 @@
-{$MODE ObjFpc}
-
-uses classes;
-
-type
-
-TVector3 = packed record
-  X, Y, Z: Single;
-end;
-
-TClassA = class
-protected
-  fVector: TVector3;
-public
-  procedure SetVector(AVector: TVector3); virtual; abstract;
-end;
-
-{ TClassB }
-
-TClassB = class(TClassA)
-public
-  procedure SetVector(AVector: TVector3); override;
-end;
-
-{ TClassB }
-
-procedure TClassB.SetVector(AVector: TVector3);
-begin
-  writeln('TClassB: ',AVector.X,',',AVector.Y,',',AVector.Z);
-  fVector:=AVector;
-end;
-
-var
-  MyVector: TVector3;
-  MyClassB: TClassB;
-begin
-  MyVector.X:=0;
-  MyVector.Y:=0;
-  MyVector.Z:=3;
-  MyClassB:=TClassB.Create;
-  MyClassB.SetVector(MyVector);
-  if (MyClassB.fvector.x<>0) or
-     (MyClassB.fvector.y<>0) or
-     (MyClassB.fvector.z<>3) then
-    halt(1);
-end.