external gas-assembler - handling special opcodes with multiple memref-size e.g. vfpclassps/pd - if operand-opsize < S_XMM =>> use memref-min-size

git-svn-id: branches/tg74/avx512-0037785@47837 -
This commit is contained in:
tg74 2020-12-23 03:56:23 +00:00 committed by Michaël Van Canneyt
parent 75acaad121
commit 11c17a87de
6 changed files with 26 additions and 12 deletions

View File

@ -1241,8 +1241,8 @@ attsufNONE,
attsufNONE,
attsufNONE,
attsufNONE,
attsufINT,
attsufINT,
attsufMMS,
attsufMMS,
attsufNONE,
attsufNONE,
attsufNONE,

View File

@ -1255,8 +1255,8 @@ attsufNONE,
attsufNONE,
attsufNONE,
attsufNONE,
attsufINT,
attsufINT,
attsufMMS,
attsufMMS,
attsufNONE,
attsufNONE,
attsufNONE,

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<Version Value="11"/>
<PathDelim Value="\"/>
<General>
<Flags>
@ -22,14 +22,14 @@
</PublishOptions>
<RunParams>
<local>
<CommandLineParams Value="-O- \home\torsten\tmp\vpinsrb.pp -Fu\home\torsten\avx512\rtl\units\x86_64-linux"/>
<CommandLineParams Value="-O- \tmp\vaddpd.pp -Fu\home\torsten\avx512\rtl\units\x86_64-linux"/>
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
</local>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default">
<local>
<CommandLineParams Value="-O- \home\torsten\tmp\vpinsrb.pp -Fu\home\torsten\avx512\rtl\units\x86_64-linux"/>
<CommandLineParams Value="-O- \tmp\vaddpd.pp -Fu\home\torsten\avx512\rtl\units\x86_64-linux"/>
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
</local>
</Mode0>

View File

@ -1519,9 +1519,23 @@ procedure Tx86Instruction.SetInstructionOpsize;
if (gas_needsuffix[opcode] = AttSufMMS) and (ops > 0) then
begin
// special handling = use source operand for calculate instructions-opsize
// e.g. vcvtsi2sd, vcvtsi2ss, vcvtusi2sd, vcvtusi2ss
// e.g. vcvtsi2sd, vcvtsi2ss, vcvtusi2sd, vcvtusi2ss,
// vfpclass..
opsize:=tx86operand(operands[1]).opsize;
if (MemRefSize in [msiMultipleMinSize128, msiMultipleMinSize256, msiMultipleMinSize512]) and
(not(opsize in [S_XMM, S_YMM, S_ZMM])) then
begin
// special handling for external gas assembler, special opcodes (e.g. vfpclassps/pd)
case MemRefSize of
msiMultipleMinSize128: opsize := S_XMM;
msiMultipleMinSize256: opsize := S_YMM;
msiMultipleMinSize512: opsize := S_ZMM;
else;
end;
end;
result := true;
end
else if MemRefSize in MemRefMultiples - [msiVMemMultiple] then

View File

@ -7629,7 +7629,7 @@ xmmreg_mz,xmmreg,xmmreg_sae,imm8 \350\361\372\1\x55\75\120\27
; VFPCLASSPD kreg_m,mem256 and mem512 must come first - map MemRefSize 256,512bits correct
; map all other MemrefSize (without broasdcast MemRef) to kreg_m, xmmrm
[VFPCLASSPD,vfpclasspdX]
[VFPCLASSPD,vfpclasspdS]
(Ch_All)
kreg_m,mem256,imm8 \350\352\361\364\372\1\x66\110\26 AVX512,TFV
kreg_m,mem512,imm8 \350\351\352\361\372\1\x66\110\26 AVX512,TFV
@ -7642,7 +7642,7 @@ kreg_m,bmem64,imm8 \350\351\352\361\372\1\x66\110\26
; VFPCLASSPS kreg_m,mem256 and mem512 must come first - map MemRefSize 256,512bits correct
; map all other MemrefSize (without broasdcast MemRef) to kreg_m, xmmrm
[VFPCLASSPS,vfpclasspsX]
[VFPCLASSPS,vfpclasspsS]
(Ch_All)
kreg_m,mem256,imm8 \350\361\364\372\1\x66\110\26 AVX512,TFV
kreg_m,mem512,imm8 \350\351\361\372\1\x66\110\26 AVX512,TFV

View File

@ -1237,8 +1237,8 @@ attsufNONE,
attsufNONE,
attsufNONE,
attsufNONE,
attsufINT,
attsufINT,
attsufMMS,
attsufMMS,
attsufNONE,
attsufNONE,
attsufNONE,