Skip to content

Commit

Permalink
Eliminate addcarryx/subborrowx wrappers in Go
Browse files Browse the repository at this point in the history
This is a partial fix for item 1 of
mit-plv#949 (comment) also
mentioned at golang/go#40171 (comment)

Unfortunately, we still cast the arguments to uint1 because we don't
have enough information in the right places to relax the casts.  We
really want a fused absint/rewriting pass, where we get access to true
bounds information rather than just casts.
  • Loading branch information
JasonGross committed Aug 4, 2021
1 parent c1abeae commit 694b927
Show file tree
Hide file tree
Showing 44 changed files with 16,156 additions and 15,805 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ BEDROCK2_EXTRA_CFLAGS := -Wno-error=unused-but-set-variable

RUST_EXTRA_ARGS := --inline

GO_EXTRA_ARGS_ALL := --cmovznz-by-mul --internal-static --package-case flatcase --public-function-case UpperCamelCase --private-function-case camelCase --public-type-case UpperCamelCase --private-type-case camelCase --no-prefix-fiat --doc-newline-in-typedef-bounds --doc-prepend-header 'Code generated by Fiat Cryptography. DO NOT EDIT.' --doc-text-before-function-name '' --doc-text-before-type-name ''
GO_EXTRA_ARGS_ALL := --relax-primitive-carry-to-bitwidth 32,64 --cmovznz-by-mul --internal-static --package-case flatcase --public-function-case UpperCamelCase --private-function-case camelCase --public-type-case UpperCamelCase --private-type-case camelCase --no-prefix-fiat --doc-newline-in-typedef-bounds --doc-prepend-header 'Code generated by Fiat Cryptography. DO NOT EDIT.' --doc-text-before-function-name '' --doc-text-before-type-name ''
GO_EXTRA_ARGS_64 := --no-wide-int $(GO_EXTRA_ARGS_ALL)
GO_EXTRA_ARGS_32 := $(GO_EXTRA_ARGS_ALL)

Expand Down
1 change: 1 addition & 0 deletions _CoqProject.in
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ src/Rewriter/Passes/MulSplit.v
src/Rewriter/Passes/MultiRetSplit.v
src/Rewriter/Passes/NBE.v
src/Rewriter/Passes/NoSelect.v
src/Rewriter/Passes/RelaxBitwidthAdcSbb.v
src/Rewriter/Passes/StripLiteralCasts.v
src/Rewriter/Passes/Test.v
src/Rewriter/Passes/ToFancy.v
Expand Down
2 changes: 1 addition & 1 deletion fiat-go/32/curve25519/curve25519.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 694b927

Please sign in to comment.