2017-12-02 02:12:25 +08:00
|
|
|
/*
|
2018-01-18 21:12:46 +08:00
|
|
|
* Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
|
2017-12-02 02:12:25 +08:00
|
|
|
* Copyright 2016 Cryptography Research, Inc.
|
|
|
|
*
|
2018-12-06 20:38:06 +08:00
|
|
|
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
2017-12-02 02:12:25 +08:00
|
|
|
* 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 23:27:21 +08:00
|
|
|
*/
|
|
|
|
|
2018-02-12 22:27:02 +08:00
|
|
|
#ifndef HEADER_ARCH_32_ARCH_INTRINSICS_H
|
|
|
|
# define HEADER_ARCH_32_ARCH_INTRINSICS_H
|
2018-02-01 21:53:56 +08:00
|
|
|
|
2019-09-28 06:45:40 +08:00
|
|
|
#include "internal/constant_time.h"
|
2017-11-15 23:27:21 +08:00
|
|
|
|
2017-12-04 19:38:58 +08:00
|
|
|
# define ARCH_WORD_BITS 32
|
2017-11-15 23:27:21 +08:00
|
|
|
|
2018-02-01 21:53:56 +08:00
|
|
|
#define word_is_zero(a) constant_time_is_zero_32(a)
|
2017-11-15 23:27:21 +08:00
|
|
|
|
2017-12-12 22:17:40 +08:00
|
|
|
static ossl_inline uint64_t widemul(uint32_t a, uint32_t b)
|
2017-12-04 19:38:58 +08:00
|
|
|
{
|
2017-11-15 23:27:21 +08:00
|
|
|
return ((uint64_t)a) * b;
|
|
|
|
}
|
|
|
|
|
2018-02-12 22:27:02 +08:00
|
|
|
#endif /* HEADER_ARCH_32_ARCH_INTRINSICS_H */
|