From 6d7f0b0a746b06a903ec8e14fe14cd0605fb210f Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 16 Jun 2018 04:52:35 +0200 Subject: simd: encapsulate fpu amortization into nice functions --- src/selftest/poly1305.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/selftest/poly1305.h') diff --git a/src/selftest/poly1305.h b/src/selftest/poly1305.h index 41acf7c..b3b74e1 100644 --- a/src/selftest/poly1305.h +++ b/src/selftest/poly1305.h @@ -7,6 +7,7 @@ #ifdef DEBUG #include "../crypto/chacha20poly1305.h" +#include "../crypto/simd.h" struct poly1305_testdata { size_t size; @@ -1489,7 +1490,7 @@ static const struct poly1305_testvec poly1305_testvecs[] = { bool __init poly1305_selftest(void) { - bool have_simd = chacha20poly1305_init_simd(); + bool have_simd = simd_get(); bool success = true; size_t i; @@ -1558,7 +1559,7 @@ bool __init poly1305_selftest(void) } } } - chacha20poly1305_deinit_simd(have_simd); + simd_put(have_simd); if (success) pr_info("poly1305 self-tests: pass\n"); -- cgit v1.2.3-59-g8ed1b