From 329ec242cf6c5391861c7f6ba2f65990fe1a4669 Mon Sep 17 00:00:00 2001 From: tg74 Date: Fri, 27 Nov 2020 15:54:47 +0000 Subject: [PATCH] working on new testmethods (memref-operands) git-svn-id: branches/tg74/avx512-0037785@47608 - --- tests/utils/avx/avxopcodes.pas | 58 ++++++++++++++++------------ tests/utils/avx/avxtestgenerator.lpi | 10 ++--- 2 files changed, 39 insertions(+), 29 deletions(-) diff --git a/tests/utils/avx/avxopcodes.pas b/tests/utils/avx/avxopcodes.pas index 994f02cc9e..612426b8e5 100644 --- a/tests/utils/avx/avxopcodes.pas +++ b/tests/utils/avx/avxopcodes.pas @@ -3263,6 +3263,7 @@ var sLocalVarDataTyp: string; sl: TStringList; slAsm: TStringList; + slLocalHeader: TStringList; LastOpCode: String; NewOpCode: String; @@ -3305,31 +3306,40 @@ begin (aX64 and (sl[2] = '1')) then // x86_64 begin sDestFile := format('%s_%d%s', [NewOpcode, i, trim(copy(sl[4],1,1) + copy(sl[5],1,1) + copy(sl[6],1,1) + copy(sl[7],1,1))]); - - if (sl[4] = '') and - (sl[5] = '') and - (sl[6] = '') and - (sl[7] = '') then - begin // Opcode with no Params, e.g. VZEROALL - slAsm.Add(' ' + sl[0]); - end - else - begin - if aMREF then - begin - TAsmTestGenerator.CalcTestDataMREF(aX64, aAVX512 and (sl[3] = '1'), aSAE, sl[0], sl[4], sl[5], sl[6], sl[7], slAsm, sLocalVarDataTyp); - sDestFile := 'MREF_' + sDestFile; - - if trim(sLocalVarDataTyp) = '' then - sLocalVarDataTyp := 'byte'; - - aHeaderList.Text := StringReplace(aHeaderList.Text, '$$$LOCALVARDATATYP$$$', sLocalVarDataTyp, [rfReplaceAll]); - end - else TAsmTestGenerator.CalcTestData(aX64, aAVX512 and (sl[3] = '1'), aSAE, sl[0], sl[4], sl[5], sl[6], sl[7], slAsm); - end; - SaveFile(slAsm, sDestFile, aDestPath, aFileExt, aHeaderList, aFooterList); - writeln(format('%s%s%s', [aDestPath, sDestFile, aFileExt])); + slLocalHeader := TStringList.Create; + try + slLocalHeader.Text := aHeaderList.text; + + if (sl[4] = '') and + (sl[5] = '') and + (sl[6] = '') and + (sl[7] = '') then + begin // Opcode with no Params, e.g. VZEROALL + slAsm.Add(' ' + sl[0]); + end + else + begin + if aMREF then + begin + sLocalVarDataTyp := ''; + TAsmTestGenerator.CalcTestDataMREF(aX64, aAVX512 and (sl[3] = '1'), aSAE, sl[0], sl[4], sl[5], sl[6], sl[7], slAsm, sLocalVarDataTyp); + sDestFile := 'MREF_' + sDestFile; + + if trim(sLocalVarDataTyp) = '' then + sLocalVarDataTyp := 'byte'; + + slLocalHeader.Text := StringReplace(aHeaderList.Text, '$$$LOCALVARDATATYP$$$', sLocalVarDataTyp, [rfReplaceAll]); + end + else TAsmTestGenerator.CalcTestData(aX64, aAVX512 and (sl[3] = '1'), aSAE, sl[0], sl[4], sl[5], sl[6], sl[7], slAsm); + end; + + SaveFile(slAsm, sDestFile, aDestPath, aFileExt, slLocalHeader, aFooterList); + writeln(format('%s%s%s', [aDestPath, sDestFile, aFileExt])); + + finally + FreeAndNil(slLocalHeader); + end; slAsm.Clear; end; diff --git a/tests/utils/avx/avxtestgenerator.lpi b/tests/utils/avx/avxtestgenerator.lpi index c14694660c..6bf45626ec 100644 --- a/tests/utils/avx/avxtestgenerator.lpi +++ b/tests/utils/avx/avxtestgenerator.lpi @@ -1,13 +1,12 @@ - + - @@ -20,11 +19,12 @@ - - - + + + +