Skip to content

Commit

Permalink
update gentest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenConoly committed Jun 5, 2023
1 parent 0660683 commit 964bce1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fiat-amd64/gentest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def removeprefix(s, prefix):
saturatedsolinasprimes = dict(
curve25519_solinas=('2^255 - 19'))

dettmanprimes = dict( # last limb width, limbs, prime
secp256k1_dettman=('48', '5', '2^256 - 4294968273'))
dettmanprimes = dict( # last limb width, limbs, last reduction, prime
secp256k1_dettman=('48', '5', '2', '2^256 - 4294968273'))

output_makefile = ('--makefile' in sys.argv[1:])
directories = tuple(i for i in sys.argv[1:] if i not in ('--makefile',))
Expand All @@ -60,7 +60,7 @@ def asm_op_names_key(val):

if name in dettmanprimes.keys():
kind = 0
limbwidth, n, prime = dettmanprimes[name]
limbwidth, n, last_reduction, prime = dettmanprimes[name]

elif name in saturatedsolinasprimes.keys():
kind = 1
Expand Down Expand Up @@ -113,8 +113,8 @@ def is_small(val):
if kind == 0:
binary = 'src/ExtractionOCaml/dettman_multiplication'
binary_descr = 'Dettman Multiplication'
limbwidth, _n, _prime = dettmanprimes[name]
invocation = ' '.join([binary, name, '64', n, limbwidth, shlex.quote(prime), op, '--no-wide-int', '--shiftr-avoid-uint1'] + [item for fname in fnames for item in ('--hints-file', shlex.quote(fname))])
limbwidth, _n, last_reduction, _prime = dettmanprimes[name]
invocation = ' '.join([binary, name, '64', n, limbwidth, last_reduction, shlex.quote(prime), op, '--no-wide-int', '--shiftr-avoid-uint1'] + [item for fname in fnames for item in ('--hints-file', shlex.quote(fname))])
elif kind == 1:
binary = 'src/ExtractionOCaml/solinas_reduction'
binary_descr = 'Saturated Solinas'
Expand Down

0 comments on commit 964bce1

Please sign in to comment.