mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 09:59:08 +02:00
working on new testmethods (memref-operands)
git-svn-id: branches/tg74/avx512-0037785@47654 -
This commit is contained in:
parent
ae71ab7284
commit
84bf87b20d
@ -1437,6 +1437,7 @@ procedure Tx86Instruction.SetInstructionOpsize;
|
|||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
bBroadcastMemRef: boolean;
|
bBroadcastMemRef: boolean;
|
||||||
|
bExistMemRef: boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
@ -1450,7 +1451,12 @@ procedure Tx86Instruction.SetInstructionOpsize;
|
|||||||
|
|
||||||
if bBroadcastMemRef then
|
if bBroadcastMemRef then
|
||||||
begin
|
begin
|
||||||
opsize := S_NO;
|
case MemRefSizeBCST of
|
||||||
|
msbBCST32: opsize := S_L;
|
||||||
|
msbBCST64: opsize := S_Q;
|
||||||
|
else opsize := S_NO;
|
||||||
|
end;
|
||||||
|
|
||||||
result := true;
|
result := true;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -1477,6 +1483,18 @@ procedure Tx86Instruction.SetInstructionOpsize;
|
|||||||
result := true;
|
result := true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
end
|
||||||
|
else if not(MemRefSize in [msiMemRegSize]) then
|
||||||
|
begin
|
||||||
|
//bExistMemRef:=false;
|
||||||
|
|
||||||
|
for i := 1 to ops do
|
||||||
|
if tx86operand(operands[1]).opr.typ in [OPR_REFERENCE,OPR_LOCAL] then
|
||||||
|
begin
|
||||||
|
opsize := tx86operand(operands[1]).opsize;
|
||||||
|
result := true;
|
||||||
|
break;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1955,41 +1973,41 @@ begin
|
|||||||
localscale,localgetoffset,localforceref);
|
localscale,localgetoffset,localforceref);
|
||||||
ai.oper[i-1]^.localoper^.localsegment:=localsegment;
|
ai.oper[i-1]^.localoper^.localsegment:=localsegment;
|
||||||
|
|
||||||
if MemRefInfo(opcode).ExistsSSEAVX then
|
// if MemRefInfo(opcode).ExistsSSEAVX then
|
||||||
begin
|
// begin
|
||||||
asize := 0;
|
// asize := 0;
|
||||||
|
//
|
||||||
case operands[i].size of
|
// case operands[i].size of
|
||||||
OS_32,OS_M32: if (operands[i].HasType) or
|
// OS_32,OS_M32: if (operands[i].HasType) or
|
||||||
(MemRefInfo(opcode).MemRefSize = msiMem32) or
|
// (MemRefInfo(opcode).MemRefSize = msiMem32) or
|
||||||
(MemRefInfo(opcode).MemRefSizeBCST = msbBCST32)
|
// (MemRefInfo(opcode).MemRefSizeBCST = msbBCST32)
|
||||||
//(((tx86operand(operands[i]).vopext and OTVE_VECTOR_BCST) = OTVE_VECTOR_BCST) and
|
// //(((tx86operand(operands[i]).vopext and OTVE_VECTOR_BCST) = OTVE_VECTOR_BCST) and
|
||||||
// (MemRefInfo(opcode).MemRefSizeBCST = msbBCST32)
|
// // (MemRefInfo(opcode).MemRefSizeBCST = msbBCST32)
|
||||||
//)
|
// //)
|
||||||
then
|
// then
|
||||||
asize:=OT_BITS32;
|
// asize:=OT_BITS32;
|
||||||
OS_64,OS_M64: if (operands[i].HasType) or
|
// OS_64,OS_M64: if (operands[i].HasType) or
|
||||||
(MemRefInfo(opcode).MemRefSize = msiMem64) or
|
// (MemRefInfo(opcode).MemRefSize = msiMem64) or
|
||||||
//(((tx86operand(operands[i]).vopext and OTVE_VECTOR_BCST) = OTVE_VECTOR_BCST) and
|
// //(((tx86operand(operands[i]).vopext and OTVE_VECTOR_BCST) = OTVE_VECTOR_BCST) and
|
||||||
// (MemRefInfo(opcode).MemRefSizeBCST = msbBCST64)
|
// // (MemRefInfo(opcode).MemRefSizeBCST = msbBCST64)
|
||||||
//) then
|
// //) then
|
||||||
(MemRefInfo(opcode).MemRefSizeBCST = msbBCST64) then
|
// (MemRefInfo(opcode).MemRefSizeBCST = msbBCST64) then
|
||||||
asize:=OT_BITS64;
|
// asize:=OT_BITS64;
|
||||||
OS_M128: if (operands[i].HasType) or
|
// OS_M128: if (operands[i].HasType) or
|
||||||
(MemRefInfo(opcode).MemRefSize = msiMem128) then
|
// (MemRefInfo(opcode).MemRefSize = msiMem128) then
|
||||||
asize:=OT_BITS128;
|
//asize:=OT_BITS128;
|
||||||
OS_M256: if (operands[i].HasType) or
|
// OS_M256: if (operands[i].HasType) or
|
||||||
(MemRefInfo(opcode).MemRefSize = msiMem256) then
|
// (MemRefInfo(opcode).MemRefSize = msiMem256) then
|
||||||
asize:=OT_BITS256;
|
//asize:=OT_BITS256;
|
||||||
OS_M512: if (operands[i].HasType) or
|
// OS_M512: if (operands[i].HasType) or
|
||||||
(MemRefInfo(opcode).MemRefSize = msiMem512) then
|
// (MemRefInfo(opcode).MemRefSize = msiMem512) then
|
||||||
asize:=OT_BITS512;
|
//asize:=OT_BITS512;
|
||||||
else;
|
// else;
|
||||||
end;
|
// end;
|
||||||
|
//
|
||||||
if asize<>0 then
|
// if asize<>0 then
|
||||||
ai.oper[i-1]^.ot:=(ai.oper[i-1]^.ot and not OT_SIZE_MASK) or asize;
|
// ai.oper[i-1]^.ot:=(ai.oper[i-1]^.ot and not OT_SIZE_MASK) or asize;
|
||||||
end;
|
// end;
|
||||||
end;
|
end;
|
||||||
OPR_REFERENCE:
|
OPR_REFERENCE:
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user