Define int128_t and uint128_t in one place.

Change-Id: Ia93130aadf319eaba1b6f2ec2896a4c50d9e8ede
Reviewed-on: https://boringssl-review.googlesource.com/6975
Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
Brian Smith 2016-01-26 15:16:37 -10:00 committed by David Benjamin
parent f547007332
commit 24e428899b
5 changed files with 12 additions and 5 deletions

View File

@ -132,6 +132,8 @@
#pragma intrinsic(__umulh, _umul128)
#endif
#include "../internal.h"
#if defined(__cplusplus)
extern "C" {
#endif
@ -144,7 +146,7 @@ BIGNUM *bn_expand(BIGNUM *bn, size_t bits);
#if !defined(_MSC_VER)
/* MSVC doesn't support two-word integers on 64-bit. */
#define BN_ULLONG __uint128_t
#define BN_ULLONG uint128_t
#endif
#define BN_BITS2 64

View File

@ -31,6 +31,7 @@
#include <string.h>
#include "internal.h"
#include "../internal.h"
typedef uint8_t u8;
@ -50,7 +51,7 @@ typedef int64_t s64;
* to the unique minimal representation at the end of the computation. */
typedef uint64_t limb;
typedef __uint128_t widelimb;
typedef uint128_t widelimb;
typedef limb felem[4];
typedef widelimb widefelem[7];

View File

@ -32,13 +32,12 @@
#include <string.h>
#include "internal.h"
#include "../internal.h"
typedef uint8_t u8;
typedef uint64_t u64;
typedef int64_t s64;
typedef __uint128_t uint128_t;
typedef __int128_t int128_t;
/* The underlying field. P256 operates over GF(2^256-2^224+2^192+2^96-1). We
* can serialise an element of this field into 32 bytes. We call this an

View File

@ -188,6 +188,12 @@ void OPENSSL_cpuid_setup(void);
#endif
#if !defined(_MSC_VER)
typedef __int128_t int128_t;
typedef __uint128_t uint128_t;
#endif
/* Constant-time utility functions.
*
* The following methods return a bitmask of all ones (0xff...f) for true and 0

View File

@ -34,7 +34,6 @@
#define U64TO8_LE(m, v) (*(uint64_t *)(m)) = v
typedef __m128i xmmi;
typedef unsigned __int128 uint128_t;
static const alignas(16) uint32_t poly1305_x64_sse2_message_mask[4] = {
(1 << 26) - 1, 0, (1 << 26) - 1, 0};