mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 21:07:58 +02:00

differentiate between 64 bit and 128 bit (R_SUBMMWHOLE) SSE vector regs, and support spilling/assembling for R_SUBQ SSE registers (8 bytes) (mantis #23962) We currently never use the full 128 bit of an SSE register, and spilling for those hasn't been implemented yet either (R_SUBMMWHOLE SSE regs are spilled into a 4-byte temp currently -> can overwrite data) git-svn-id: trunk@23700 -
47 lines
746 B
ObjectPascal
47 lines
746 B
ObjectPascal
{$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.
|