aboutsummaryrefslogtreecommitdiff
path: root/src/CLI.v
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2019-01-24 15:35:49 -0500
committerGravatar Jason Gross <jasongross9@gmail.com>2019-01-26 18:12:06 -0500
commit9b9adfa6437439cf133da6f062b0b6050a691cdf (patch)
tree7440a07ff5cad7936fb56dc6ae4cea2fc2dc05b2 /src/CLI.v
parentef14767f91007ebf506f45f8d669a00f0b332345 (diff)
Also display the carry chain in a comment
Diffstat (limited to 'src/CLI.v')
-rw-r--r--src/CLI.v17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/CLI.v b/src/CLI.v
index 32cc3fd1e..41a705cc2 100644
--- a/src/CLI.v
+++ b/src/CLI.v
@@ -222,7 +222,7 @@ Module ForExtraction.
; ("c", c, parse_c c:Dyn)] with
| inr errs => inr errs
| inl (n, machine_wordsize, s, c)
- => let '(res, types_used)
+ => let '(extra_comment_header, res, types_used)
:= UnsaturatedSolinas.Synthesize n s c machine_wordsize prefix requests in
let header :=
((["/* Autogenerated */";
@@ -233,8 +233,9 @@ Module ForExtraction.
"/* c = " ++ show false c ++ " (from """ ++ str_c ++ """) */";
"/* machine_wordsize = " ++ show false machine_wordsize ++ " (from """ ++ str_machine_wordsize ++ """) */";
""]%string)
- ++ ToString.C.String.typedef_header prefix types_used
- ++ [""])%list in
+ ++ extra_comment_header
+ ++ ToString.C.String.typedef_header prefix types_used
+ ++ [""])%list in
inl
([("check_args" ++ NewLine ++ String.concat NewLine header,
UnsaturatedSolinas.check_args
@@ -323,7 +324,7 @@ Module ForExtraction.
("m", m, parse_m m:Dyn)] with
| inr errs => inr errs
| inl (machine_wordsize, m)
- => let '(res, types_used)
+ => let '(extra_comment_header, res, types_used)
:= WordByWordMontgomery.Synthesize m machine_wordsize prefix requests in
let header :=
((["/* Autogenerated */";
@@ -339,8 +340,9 @@ Module ForExtraction.
"/* All functions also ensure that these two properties are true of */";
"/* return values. */";
""]%string)
- ++ ToString.C.String.typedef_header prefix types_used
- ++ [""])%list in
+ ++ extra_comment_header
+ ++ ToString.C.String.typedef_header prefix types_used
+ ++ [""])%list in
inl
([("check_args" ++ NewLine ++ String.concat NewLine header,
WordByWordMontgomery.check_args
@@ -424,7 +426,7 @@ Module ForExtraction.
; ("c", c, parse_c c:Dyn)] with
| inr errs => inr errs
| inl (machine_wordsize, s, c)
- => let '(res, types_used)
+ => let '(extra_comment_header, res, types_used)
:= SaturatedSolinas.Synthesize s c machine_wordsize prefix requests in
let header :=
((["/* Autogenerated */";
@@ -434,6 +436,7 @@ Module ForExtraction.
"/* c = " ++ show false c ++ " (from """ ++ str_c ++ """) */";
"/* machine_wordsize = " ++ show false machine_wordsize ++ " (from """ ++ str_machine_wordsize ++ """) */";
""]%string)
+ ++ extra_comment_header
++ ToString.C.String.typedef_header prefix types_used
++ [""])%list in
inl