From d738599a2f7266480dbe9dda558d680f94d459f4 Mon Sep 17 00:00:00 2001 From: Mark Charney Date: Tue, 21 Jan 2020 10:57:01 -0500 Subject: [PATCH] enc2 tester: knobs --reps N, --emit ( __emit) and --byte (.bytes) stmts (cherry picked from commit 43653e40e995b8d696ff3acbb736928652dd151e) --- src/enc2test/test.c | 53 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/src/enc2test/test.c b/src/enc2test/test.c index beaaab5b..4c139130 100644 --- a/src/enc2test/test.c +++ b/src/enc2test/test.c @@ -1,6 +1,6 @@ /*BEGIN_LEGAL -Copyright (c) 2019 Intel Corporation +nCopyright (c) 2019 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ END_LEGAL */ #include #include #include +#include #include "xed-histogram.h" typedef xed_uint32_t (*test_func_t)(xed_uint8_t* output_buffer); @@ -43,6 +44,9 @@ xed_state_t dstate; xed_histogram_t histo; +int enable_emit=0; +int enable_emit_byte=0; + static void dump(xed_uint8_t* buf, xed_uint32_t len) { xed_uint_t i; for(i=0;i0) + printf(", "); + printf("0x%02x", buf[i]); + } + printf("\n"); +} + +static void dump_emit(xed_uint8_t* buf, xed_uint32_t len) { + xed_uint_t i; + for(i=0;i