From 0d7727f95e52d99c13f55c64e9d1f799ba7d7967 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 10 Aug 2020 14:32:28 -0700 Subject: [PATCH] Add SECP256K1_FE_STORAGE_CONST_GET to 5x52 field So far this has not been needed, as it's only used by the static precomputation which always builds with 32-bit fields. This prepares for the ability to have __int128 detected on the C side, breaking that restriction. --- src/field_5x52.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/field_5x52.h b/src/field_5x52.h index fc5bfe357..6a068484c 100644 --- a/src/field_5x52.h +++ b/src/field_5x52.h @@ -46,4 +46,10 @@ typedef struct { (d6) | (((uint64_t)(d7)) << 32) \ }} +#define SECP256K1_FE_STORAGE_CONST_GET(d) \ + (uint32_t)(d.n[3] >> 32), (uint32_t)d.n[3], \ + (uint32_t)(d.n[2] >> 32), (uint32_t)d.n[2], \ + (uint32_t)(d.n[1] >> 32), (uint32_t)d.n[1], \ + (uint32_t)(d.n[0] >> 32), (uint32_t)d.n[0] + #endif /* SECP256K1_FIELD_REPR_H */