From aff1f4999c47aecd65f1f17bfe96e736a55b4ec7 Mon Sep 17 00:00:00 2001 From: tg74 Date: Mon, 8 Feb 2021 11:04:21 +0000 Subject: [PATCH] bugfix 0037785 cvtsi2sd,cvtsi2ss for platform i386 git-svn-id: branches/tg74/avx512-0037785@48526 - --- compiler/i386/i386atts.inc | 4 ++-- compiler/i8086/i8086atts.inc | 4 ++-- compiler/x86/aasmcpu.pas | 16 ++++++++++------ compiler/x86/rax86.pas | 3 ++- compiler/x86/x86ins.dat | 4 ++-- compiler/x86_64/x8664ats.inc | 4 ++-- 6 files changed, 20 insertions(+), 15 deletions(-) diff --git a/compiler/i386/i386atts.inc b/compiler/i386/i386atts.inc index 63fca4b4e3..ea6ae89703 100644 --- a/compiler/i386/i386atts.inc +++ b/compiler/i386/i386atts.inc @@ -424,7 +424,7 @@ attsufNONE, attsufNONE, attsufNONE, attsufNONE, -attsufINT, +attsufMMS, attsufNONE, attsufNONE, attsufNONE, @@ -541,7 +541,7 @@ attsufNONE, attsufNONE, attsufNONE, attsufNONE, -attsufINT, +attsufMMS, attsufNONE, attsufNONE, attsufNONE, diff --git a/compiler/i8086/i8086atts.inc b/compiler/i8086/i8086atts.inc index e7bef56dda..c016aa167a 100644 --- a/compiler/i8086/i8086atts.inc +++ b/compiler/i8086/i8086atts.inc @@ -424,7 +424,7 @@ attsufNONE, attsufNONE, attsufNONE, attsufNONE, -attsufINT, +attsufMMS, attsufNONE, attsufNONE, attsufNONE, @@ -541,7 +541,7 @@ attsufNONE, attsufNONE, attsufNONE, attsufNONE, -attsufINT, +attsufMMS, attsufNONE, attsufNONE, attsufNONE, diff --git a/compiler/x86/aasmcpu.pas b/compiler/x86/aasmcpu.pas index da0b9dd40f..f9eb31f760 100644 --- a/compiler/x86/aasmcpu.pas +++ b/compiler/x86/aasmcpu.pas @@ -5530,13 +5530,17 @@ implementation (gas_needsuffix[AsmOp] <> AttSufNONE) and (not(InsTabMemRefSizeInfoCache^[AsmOp].MemRefSize in MemRefMultiples)) then begin - // combination (attsuffix <> "AttSufNONE") and (MemRefSize is not in MemRefMultiples) is not supported =>> check opcode-definition in x86ins.dat'); + // combination (attsuffix <> "AttSufNONE") and (MemRefSize is not in MemRefMultiples) is not supported =>> check opcode-definition in x86ins.dat - inc(iCntOpcodeValError); - Str(gas_needsuffix[AsmOp],hs1); - Str(InsTabMemRefSizeInfoCache^[AsmOp].MemRefSize,hs2); - Message3(asmr_e_not_supported_combination_attsuffix_memrefsize_type, - std_op2str[AsmOp],hs1,hs2); + if (AsmOp <> A_CVTSI2SD) and + (AsmOp <> A_CVTSI2SS) then + begin + inc(iCntOpcodeValError); + Str(gas_needsuffix[AsmOp],hs1); + Str(InsTabMemRefSizeInfoCache^[AsmOp].MemRefSize,hs2); + Message3(asmr_e_not_supported_combination_attsuffix_memrefsize_type, + std_op2str[AsmOp],hs1,hs2); + end; end; end; end; diff --git a/compiler/x86/rax86.pas b/compiler/x86/rax86.pas index a0cfa731a0..7fbc06704c 100644 --- a/compiler/x86/rax86.pas +++ b/compiler/x86/rax86.pas @@ -2075,7 +2075,8 @@ begin end; 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; + ai.oper[i-1]^.ot:=(ai.oper[i-1]^.ot and OT_NON_SIZE) or asize; end; end; OPR_REFERENCE: diff --git a/compiler/x86/x86ins.dat b/compiler/x86/x86ins.dat index 9eed646fc2..cd298d5b87 100644 --- a/compiler/x86/x86ins.dat +++ b/compiler/x86/x86ins.dat @@ -2339,7 +2339,7 @@ xmmreg,mmxrm \331\2\x0F\x2A\110 KATMAI,SSE,MMX mmxreg,mem64 \331\2\x0F\x2D\110 KATMAI,SSE,MMX mmxreg,xmmreg \331\2\x0F\x2D\110 KATMAI,SSE,MMX -[CVTSI2SS,cvtsi2ssX] +[CVTSI2SS,cvtsi2ssS] (Ch_Wop2, Ch_Rop1) xmmreg,rm32 \333\321\2\x0F\x2A\110 KATMAI,SSE xmmreg,rm64 \333\321\2\x0F\x2A\110 KATMAI,SSE,X86_64 @@ -2878,7 +2878,7 @@ reg64,mem64 \334\320\2\x0F\x2D\110 WILLAMETTE,SSE2,X86_64 xmmreg,xmmreg \334\2\x0F\x5A\110 WILLAMETTE,SSE2 ;,SQ xmmreg,mem64 \334\2\x0F\x5A\110 WILLAMETTE,SSE2 ;,SQ -[CVTSI2SD,cvtsi2sdX] +[CVTSI2SD,cvtsi2sdS] (Ch_Wop2, Ch_Rop1) xmmreg,rm32 \334\2\x0F\x2A\110 WILLAMETTE,SSE2 xmmreg,rm64 \326\334\321\2\x0F\x2A\110 WILLAMETTE,SSE2,X86_64 diff --git a/compiler/x86_64/x8664ats.inc b/compiler/x86_64/x8664ats.inc index d68e5930ce..ac2ce4819f 100644 --- a/compiler/x86_64/x8664ats.inc +++ b/compiler/x86_64/x8664ats.inc @@ -410,7 +410,7 @@ attsufNONE, attsufNONE, attsufNONE, attsufNONE, -attsufINT, +attsufMMS, attsufNONE, attsufNONE, attsufNONE, @@ -527,7 +527,7 @@ attsufNONE, attsufNONE, attsufNONE, attsufNONE, -attsufINT, +attsufMMS, attsufNONE, attsufNONE, attsufNONE,