mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 17:29:10 +02:00
working on new testmethods and bug-fixing size of (memref-operands | global and local variable - append correct gas-suffix on any vcvt.. opcodes
git-svn-id: branches/tg74/avx512-0037785@47821 -
This commit is contained in:
parent
295e2d4dff
commit
75acaad121
@ -1494,8 +1494,10 @@ procedure Tx86Instruction.SetInstructionOpsize;
|
|||||||
function CheckSSEAVX: Boolean;
|
function CheckSSEAVX: Boolean;
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
|
iSizeMask: int64;
|
||||||
bBroadcastMemRef: boolean;
|
bBroadcastMemRef: boolean;
|
||||||
bExistMemRef: boolean;
|
bExistMemRef: boolean;
|
||||||
|
ValidOpSizes: Set of topsize;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
@ -1538,18 +1540,43 @@ procedure Tx86Instruction.SetInstructionOpsize;
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if result and (MemRefSize in [msiMultipleMinSize128, msiMultipleMinSize256, msiMultipleMinSize512]) then
|
if (result) and
|
||||||
|
(ops > 0) and
|
||||||
|
(MemRefSize in [msiMultipleMinSize128, msiMultipleMinSize256, msiMultipleMinSize512]) and
|
||||||
|
(gas_needsuffix[opcode] in [AttSufMMS, AttSufMMX]) then
|
||||||
begin
|
begin
|
||||||
|
// external gas assembler need suffix (different opsizes possible)
|
||||||
|
// - in fpc not exists datatypes for vector-variables
|
||||||
|
// =>> all memsize = ok, but any special opcodes (marked with attSufMMS,attSUFMMX) needed in any combination of operandtypes the exact opsize
|
||||||
|
// =>> check instructions-opsize and use the correct vector-mem-opsize
|
||||||
|
|
||||||
for i := 1 to ops do
|
for i := 1 to ops do
|
||||||
if tx86operand(operands[i]).opr.typ in [OPR_REGISTER] then
|
if tx86operand(operands[i]).opr.typ in [OPR_REGISTER] then
|
||||||
begin
|
begin
|
||||||
|
ValidOpSizes := [];
|
||||||
|
|
||||||
case tx86operand(operands[i]).opsize of
|
case tx86operand(operands[i]).opsize of
|
||||||
S_XMM: ;
|
S_XMM: iSizeMask := RegXMMSizeMask;
|
||||||
S_YMM:;
|
S_YMM: iSizeMask := RegYMMSizeMask;
|
||||||
S_ZMM:;
|
S_ZMM: iSizeMask := RegZMMSizeMask;
|
||||||
|
else iSizeMask := 0;
|
||||||
end;
|
end;
|
||||||
//opsize := tx86operand(operands[i]).opsize;
|
|
||||||
//result := true;
|
if iSizemask and OT_BITS128 = OT_BITS128 then include(ValidOpSizes, S_XMM);
|
||||||
|
if iSizemask and OT_BITS256 = OT_BITS256 then include(ValidOpSizes, S_YMM);
|
||||||
|
if iSizemask and OT_BITS512 = OT_BITS512 then include(ValidOpSizes, S_ZMM);
|
||||||
|
|
||||||
|
if (ValidOpsizes <> []) then
|
||||||
|
begin
|
||||||
|
if not(opsize in ValidOpSizes) then
|
||||||
|
begin
|
||||||
|
// instructions-opsize is invalid =>> use smallest valid opsize
|
||||||
|
if iSizemask and OT_BITS128 = OT_BITS128 then opsize := S_XMM
|
||||||
|
else if iSizemask and OT_BITS256 = OT_BITS256 then opsize := S_YMM
|
||||||
|
else if iSizemask and OT_BITS512 = OT_BITS512 then opsize := S_ZMM;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else ; // empty ValidOpsize =>> nothing todo???
|
||||||
|
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user