From 9baf452681c95173f6374faa95e2898fb8336041 Mon Sep 17 00:00:00 2001 From: tg74 Date: Sun, 18 Aug 2019 04:39:36 +0000 Subject: [PATCH] Bugfix GATHER/SCATTER memref git-svn-id: branches/tg74/avx512merge@42723 - --- compiler/x86/aasmcpu.pas | 2 +- compiler/x86/rax86.pas | 31 ++++++++++++++++++------------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/compiler/x86/aasmcpu.pas b/compiler/x86/aasmcpu.pas index c59d5db6c8..422ba3f1c8 100644 --- a/compiler/x86/aasmcpu.pas +++ b/compiler/x86/aasmcpu.pas @@ -1731,7 +1731,7 @@ implementation exit; // IGNORE VECTOR-MEMORY-SIZE - if insot and OT_MEMORY = OT_MEMORY then + if insot and OT_TYPE_MASK = OT_MEMORY then insot := insot and not(int64(OT_BITS128 or OT_BITS256 or OT_BITS512)); diff --git a/compiler/x86/rax86.pas b/compiler/x86/rax86.pas index 1cc12b8426..19bddb2fba 100644 --- a/compiler/x86/rax86.pas +++ b/compiler/x86/rax86.pas @@ -528,12 +528,10 @@ begin msiMem8: memrefsize := 8; msiMultiple16, msiMem16: memrefsize := 16; - msiXMem32, - msiYMem32, msiMultiple32, msiMem32: memrefsize := 32; - msiXMem64, - msiYMem64, + //msiXMem64, + //msiYMem64, msiMultiple64, msiMem64: memrefsize := 64; msiMultiple128, @@ -701,6 +699,13 @@ begin end; end; end; + msiXMem32, + msiYMem32, + msiZMem32, + msiXMem64, + msiYMem64, + msiZMem64: ; // ignore; gather/scatter opcodes haven a fixed element-size, not a fixed memory-size + // the vector-register have indices with base of the memory-address in the memory-operand msiNoSize, msiUnkown, msiUnsupported, @@ -835,8 +840,6 @@ begin Message2(asmr_w_check_mem_operand_automap_multiple_size, std_op2str[opcode], '"16 bit memory operand"'); end; - msiXMem32, - msiYMem32, msiMem32: begin tx86operand(operands[i]).opsize := S_L; @@ -849,8 +852,6 @@ begin Message2(asmr_w_check_mem_operand_automap_multiple_size, std_op2str[opcode], '"32 bit memory operand"'); end; - msiXMem64, - msiYMem64, msiMem64: begin tx86operand(operands[i]).opsize := S_Q; @@ -1173,14 +1174,18 @@ begin end; end; - - - + msiXMem32, + msiYMem32, + msiZMem32, + msiXMem64, + msiYMem64, + msiZMem64: ; // ignore; gather/scatter opcodes haven a fixed element-size, not a fixed memory-size + // the vector-register have indices with base of the memory-address in the memory-operand msiNoSize: ; // all memory-sizes are ok + msiVMemMultiple, + msiVMemRegSize: ; // ignore msiUnkown, msiUnsupported, - msiVMemMultiple, - msiVMemRegSize, msiMultiple: Message(asmr_e_unable_to_determine_reference_size); // TODO individual message else Internalerror(2019081008);