diff options
author | Werner Koch <wk@gnupg.org> | 2011-02-16 18:31:31 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2011-02-16 18:31:31 +0100 |
commit | 364799200d1fa8bfa159b6941cb74156bbfa7ec1 (patch) | |
tree | 4ca0a2df8d79f33d64c0c912117fc1af92dbe6e8 /tests/benchmark.c | |
parent | d9795cfdd758e2aa22e7ab8a6790e2915d1f5334 (diff) | |
download | libgcrypt-364799200d1fa8bfa159b6941cb74156bbfa7ec1.tar.gz |
Add GCRYCTL_DISABLE_HWF
This option is useful to disable detected hardware features. It has
been implemented in benchmark, so that it is now possible to run
tests/benchmark --disable-hwf intel-aesni cipher aes aes192 aes256
to compare the use of AES-NI insns to the pure C code.
Diffstat (limited to 'tests/benchmark.c')
-rw-r--r-- | tests/benchmark.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/benchmark.c b/tests/benchmark.c index 536b76a6..cf78c76b 100644 --- a/tests/benchmark.c +++ b/tests/benchmark.c @@ -1177,6 +1177,17 @@ main( int argc, char **argv ) argc--; argv++; } } + else if (!strcmp (*argv, "--disable-hwf")) + { + argc--; argv++; + if (argc) + { + if (gcry_control (GCRYCTL_DISABLE_HWF, *argv, NULL)) + fprintf (stderr, PGM ": unknown hardware feature `%s'" + " - option ignored\n", *argv); + argc--; argv++; + } + } else if (!strcmp (*argv, "--fips")) { argc--; argv++; |