2017-12-01 18:12:25 +00:00
|
|
|
/*
|
2018-01-18 13:12:46 +00:00
|
|
|
* Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
|
2017-12-01 18:12:25 +00:00
|
|
|
* Copyright 2016 Cryptography Research, Inc.
|
|
|
|
*
|
|
|
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
|
|
|
* this file except in compliance with the License. You can obtain a copy
|
|
|
|
* in the file LICENSE in the source distribution or at
|
|
|
|
* https://www.openssl.org/source/license.html
|
|
|
|
*
|
|
|
|
* Originally written by Mike Hamburg
|
2017-11-15 15:27:21 +00:00
|
|
|
*/
|
|
|
|
|
2018-02-12 14:27:02 +00:00
|
|
|
#ifndef HEADER_ARCH_32_ARCH_INTRINSICS_H
|
|
|
|
# define HEADER_ARCH_32_ARCH_INTRINSICS_H
|
2018-02-01 13:53:56 +00:00
|
|
|
|
2018-02-12 14:27:02 +00:00
|
|
|
#include "internal/constant_time_locl.h"
|
2017-11-15 15:27:21 +00:00
|
|
|
|
2017-12-04 11:38:58 +00:00
|
|
|
# define ARCH_WORD_BITS 32
|
2017-11-15 15:27:21 +00:00
|
|
|
|
2018-02-01 13:53:56 +00:00
|
|
|
#define word_is_zero(a) constant_time_is_zero_32(a)
|
2017-11-15 15:27:21 +00:00
|
|
|
|
2017-12-12 14:17:40 +00:00
|
|
|
static ossl_inline uint64_t widemul(uint32_t a, uint32_t b)
|
2017-12-04 11:38:58 +00:00
|
|
|
{
|
2017-11-15 15:27:21 +00:00
|
|
|
return ((uint64_t)a) * b;
|
|
|
|
}
|
|
|
|
|
2018-02-12 14:27:02 +00:00
|
|
|
#endif /* HEADER_ARCH_32_ARCH_INTRINSICS_H */
|