mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 00:09:31 +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
|
||||
i: integer;
|
||||
bBroadcastMemRef: boolean;
|
||||
bExistMemRef: boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
@ -1450,7 +1451,12 @@ procedure Tx86Instruction.SetInstructionOpsize;
|
||||
|
||||
if bBroadcastMemRef then
|
||||
begin
|
||||
opsize := S_NO;
|
||||
case MemRefSizeBCST of
|
||||
msbBCST32: opsize := S_L;
|
||||
msbBCST64: opsize := S_Q;
|
||||
else opsize := S_NO;
|
||||
end;
|
||||
|
||||
result := true;
|
||||
end
|
||||
else
|
||||
@ -1477,6 +1483,18 @@ procedure Tx86Instruction.SetInstructionOpsize;
|
||||
result := true;
|
||||
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;
|
||||
@ -1955,41 +1973,41 @@ begin
|
||||
localscale,localgetoffset,localforceref);
|
||||
ai.oper[i-1]^.localoper^.localsegment:=localsegment;
|
||||
|
||||
if MemRefInfo(opcode).ExistsSSEAVX then
|
||||
begin
|
||||
asize := 0;
|
||||
|
||||
case operands[i].size of
|
||||
OS_32,OS_M32: if (operands[i].HasType) or
|
||||
(MemRefInfo(opcode).MemRefSize = msiMem32) or
|
||||
(MemRefInfo(opcode).MemRefSizeBCST = msbBCST32)
|
||||
//(((tx86operand(operands[i]).vopext and OTVE_VECTOR_BCST) = OTVE_VECTOR_BCST) and
|
||||
// (MemRefInfo(opcode).MemRefSizeBCST = msbBCST32)
|
||||
//)
|
||||
then
|
||||
asize:=OT_BITS32;
|
||||
OS_64,OS_M64: if (operands[i].HasType) or
|
||||
(MemRefInfo(opcode).MemRefSize = msiMem64) or
|
||||
//(((tx86operand(operands[i]).vopext and OTVE_VECTOR_BCST) = OTVE_VECTOR_BCST) and
|
||||
// (MemRefInfo(opcode).MemRefSizeBCST = msbBCST64)
|
||||
//) then
|
||||
(MemRefInfo(opcode).MemRefSizeBCST = msbBCST64) then
|
||||
asize:=OT_BITS64;
|
||||
OS_M128: if (operands[i].HasType) or
|
||||
(MemRefInfo(opcode).MemRefSize = msiMem128) then
|
||||
asize:=OT_BITS128;
|
||||
OS_M256: if (operands[i].HasType) or
|
||||
(MemRefInfo(opcode).MemRefSize = msiMem256) then
|
||||
asize:=OT_BITS256;
|
||||
OS_M512: if (operands[i].HasType) or
|
||||
(MemRefInfo(opcode).MemRefSize = msiMem512) then
|
||||
asize:=OT_BITS512;
|
||||
else;
|
||||
end;
|
||||
|
||||
if asize<>0 then
|
||||
ai.oper[i-1]^.ot:=(ai.oper[i-1]^.ot and not OT_SIZE_MASK) or asize;
|
||||
end;
|
||||
// if MemRefInfo(opcode).ExistsSSEAVX then
|
||||
// begin
|
||||
// asize := 0;
|
||||
//
|
||||
// case operands[i].size of
|
||||
// OS_32,OS_M32: if (operands[i].HasType) or
|
||||
// (MemRefInfo(opcode).MemRefSize = msiMem32) or
|
||||
// (MemRefInfo(opcode).MemRefSizeBCST = msbBCST32)
|
||||
// //(((tx86operand(operands[i]).vopext and OTVE_VECTOR_BCST) = OTVE_VECTOR_BCST) and
|
||||
// // (MemRefInfo(opcode).MemRefSizeBCST = msbBCST32)
|
||||
// //)
|
||||
// then
|
||||
// asize:=OT_BITS32;
|
||||
// OS_64,OS_M64: if (operands[i].HasType) or
|
||||
// (MemRefInfo(opcode).MemRefSize = msiMem64) or
|
||||
// //(((tx86operand(operands[i]).vopext and OTVE_VECTOR_BCST) = OTVE_VECTOR_BCST) and
|
||||
// // (MemRefInfo(opcode).MemRefSizeBCST = msbBCST64)
|
||||
// //) then
|
||||
// (MemRefInfo(opcode).MemRefSizeBCST = msbBCST64) then
|
||||
// asize:=OT_BITS64;
|
||||
// OS_M128: if (operands[i].HasType) or
|
||||
// (MemRefInfo(opcode).MemRefSize = msiMem128) then
|
||||
//asize:=OT_BITS128;
|
||||
// OS_M256: if (operands[i].HasType) or
|
||||
// (MemRefInfo(opcode).MemRefSize = msiMem256) then
|
||||
//asize:=OT_BITS256;
|
||||
// OS_M512: if (operands[i].HasType) or
|
||||
// (MemRefInfo(opcode).MemRefSize = msiMem512) then
|
||||
//asize:=OT_BITS512;
|
||||
// else;
|
||||
// end;
|
||||
//
|
||||
// if asize<>0 then
|
||||
// ai.oper[i-1]^.ot:=(ai.oper[i-1]^.ot and not OT_SIZE_MASK) or asize;
|
||||
// end;
|
||||
end;
|
||||
OPR_REFERENCE:
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user