From 2e370d1d3288b3dca6c7b20cdd81a376724276a7 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Fri, 3 Nov 2017 13:08:41 -0400 Subject: fibe: Only define bitwidth on the command line We generate the PRI macros and the limb_t type from the bitwidth in the C preprocessor My reasoning here is that generate_parameters.py and the generated *.json files are more user-facing than fibe.c, so we should optimize for cleanliness of that user-facing code. If this is the wrong direction to go in, then this commit should be reverted. --- src/Specific/CurveParameters/montgomery32_2e256m88x2e240m1.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Specific/CurveParameters/montgomery32_2e256m88x2e240m1.json') diff --git a/src/Specific/CurveParameters/montgomery32_2e256m88x2e240m1.json b/src/Specific/CurveParameters/montgomery32_2e256m88x2e240m1.json index 7d6a9d5fb..15f8ff2d5 100644 --- a/src/Specific/CurveParameters/montgomery32_2e256m88x2e240m1.json +++ b/src/Specific/CurveParameters/montgomery32_2e256m88x2e240m1.json @@ -1,7 +1,7 @@ { "base": "32", - "compiler": "gcc -fno-peephole2 `#GCC BUG 81300` -march=native -mtune=native -std=gnu11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -Wno-incompatible-pointer-types -fno-strict-aliasing -DPRIulimb=PRIu32 -Da24_val='12345' -Dq_mpz='(1_mpz<<256) - 88*(1_mpz<<240) - 1' -Dlimb_t=uint32_t -Dmodulus_bytes_val='32' -Dlimb_weight_gaps_array='{32,32,32,32,32,32,32,32}' -Dmodulus_limbs='8' -Dmodulus_array='{0xff,0xa7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}' -DPRIxlimb=PRIx32 -Da24_hex='0x3039' -Da_minus_two_over_four_array='{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x39}'", - "compilerxx": "g++ -fno-peephole2 `#GCC BUG 81300` -march=native -mtune=native -std=gnu++11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -fno-strict-aliasing -DPRIulimb=PRIu32 -Da24_val='12345' -Dq_mpz='(1_mpz<<256) - 88*(1_mpz<<240) - 1' -Dlimb_t=uint32_t -Dmodulus_bytes_val='32' -Dlimb_weight_gaps_array='{32,32,32,32,32,32,32,32}' -Dmodulus_limbs='8' -Dmodulus_array='{0xff,0xa7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}' -DPRIxlimb=PRIx32 -Da24_hex='0x3039' -Da_minus_two_over_four_array='{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x39}'", + "compiler": "gcc -fno-peephole2 `#GCC BUG 81300` -march=native -mtune=native -std=gnu11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -Wno-incompatible-pointer-types -fno-strict-aliasing -Da_minus_two_over_four_array='{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x39}' -Dmodulus_limbs='8' -Da24_val='12345' -Dbitwidth='32' -Dq_mpz='(1_mpz<<256) - 88*(1_mpz<<240) - 1' -Dlimb_weight_gaps_array='{32,32,32,32,32,32,32,32}' -Da24_hex='0x3039' -Dmodulus_bytes_val='32' -Dmodulus_array='{0xff,0xa7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}'", + "compilerxx": "g++ -fno-peephole2 `#GCC BUG 81300` -march=native -mtune=native -std=gnu++11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -fno-strict-aliasing -Da_minus_two_over_four_array='{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x39}' -Dmodulus_limbs='8' -Da24_val='12345' -Dbitwidth='32' -Dq_mpz='(1_mpz<<256) - 88*(1_mpz<<240) - 1' -Dlimb_weight_gaps_array='{32,32,32,32,32,32,32,32}' -Da24_hex='0x3039' -Dmodulus_bytes_val='32' -Dmodulus_array='{0xff,0xa7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}'", "extra_files": [ "montgomery32/fesquare.c" ], -- cgit v1.2.3