summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortg74 <tg74@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-12-28 05:00:58 +0000
committertg74 <tg74@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-12-28 05:00:58 +0000
commit59effc00ff8ea2aed33b1be267379c320c5e9085 (patch)
treecb703be58fb8ceb2aec5c0e45e04cbcd48a2c25f
parent4d53d1723a9a1947b77684b5560039e27686f22b (diff)
downloadfpc-59effc00ff8ea2aed33b1be267379c320c5e9085.tar.gz
external gas assembler: special handling for correct suffix in vfpclass-opcodes
git-svn-id: https://svn.freepascal.org/svn/fpc/branches/tg74@47865 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--avx512-0037785/compiler/x86/rax86.pas7
1 files changed, 5 insertions, 2 deletions
diff --git a/avx512-0037785/compiler/x86/rax86.pas b/avx512-0037785/compiler/x86/rax86.pas
index 7845429bfe..3cbac44ed9 100644
--- a/avx512-0037785/compiler/x86/rax86.pas
+++ b/avx512-0037785/compiler/x86/rax86.pas
@@ -1521,8 +1521,11 @@ procedure Tx86Instruction.SetInstructionOpsize;
// special handling = use source operand for calculate instructions-opsize
// e.g. vcvtsi2sd, vcvtsi2ss, vcvtusi2sd, vcvtusi2ss,
// vfpclass..
-
- opsize:=tx86operand(operands[1]).opsize;
+
+ if (ops > 2) and
+ (tx86operand(operands[1]).opr.typ = OPR_CONSTANT) then
+ opsize:=tx86operand(operands[2]).opsize
+ else opsize:=tx86operand(operands[1]).opsize;
if (MemRefSize in [msiMultipleMinSize128, msiMultipleMinSize256, msiMultipleMinSize512]) and
(not(opsize in [S_XMM, S_YMM, S_ZMM])) then