Skip to content

Commit 466f629

Browse files
Merge pull request #852 from smowton/smowton/merge/master_2017_04_20
Merge master 2017/04/20
2 parents 7cbe566 + 9dea22a commit 466f629

File tree

382 files changed

+4448
-3322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

382 files changed

+4448
-3322
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ src/ansi-c/gcc_builtin_headers_ia32-2.inc
3131
src/ansi-c/gcc_builtin_headers_ia32.inc
3232
src/ansi-c/gcc_builtin_headers_mips.inc
3333
src/ansi-c/gcc_builtin_headers_power.inc
34-
src/util/irep_ids.h
35-
src/util/irep_ids.inc
3634

3735
# regression/test files
3836
*.out

CODING_STANDARD

+39
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,35 @@ Header files:
9292
of the header file rather than in line
9393
- Guard headers with #ifndef CPROVER_DIRECTORIES_FILE_H, etc
9494

95+
Make files
96+
- Each source file should appear on a separate line
97+
- The final source file should still be followed by a trailing slash
98+
- The last line should be a comment to not be deleted, i.e. should look like:
99+
```
100+
SRC = source_file.cpp \
101+
source_file2.cpp \
102+
# Empty last line
103+
```
104+
- This ensures the Makefiles can be easily merged.
105+
106+
Program Command Line Options
107+
- Each program contains a program_name_parse_optionst class which should
108+
contain a define PROGRAM_NAME_PARSE_OPTIONS which is a string of all the
109+
parse options in brackets (with a colon after the bracket if it takes a
110+
parameter)
111+
- Each parameter should be one per line to yield easy merging
112+
- If parameters are shared between programs, they should be pulled out into
113+
a common file and then included using a define
114+
- The defines should be OPT_FLAG_NAMES which should go into the OPTIONS define
115+
- The defines should include HELP_FLAG_NAMES which should contain the help
116+
output of the format:
117+
```
118+
" --flag explanations\n" \
119+
" --another flag more explanation\n" \
120+
<-------30 chars------>
121+
- The defines may include PARSE_OPTIONS_FLAG_NAMES which move the options
122+
from the command line into the options
123+
95124
C++ features:
96125
- Do not use namespaces.
97126
- Prefer use of 'typedef' insted of 'using'.
@@ -143,3 +172,13 @@ Output:
143172
- Use '\n' instead of std::endl
144173

145174
You are allowed to break rules if you have a good reason to do so.
175+
176+
Pre-commit hook to run cpplint locally
177+
--------------------------------------
178+
To install the hook
179+
cp .githooks/pre-commit .git/hooks/pre-commit
180+
or use a symbolic link.
181+
Then, when running git commit, you should get the linter output
182+
(if any) before being prompted to enter a commit message.
183+
To bypass the check (e.g. if there was a false positive),
184+
add the option --no-verify.

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status][build_img]][travis]
1+
[![Build Status][travis_img]][travis] [![Build Status][appveyor_img]][appveyor]
22

33
[CProver Wiki](http://www.cprover.org/wiki)
44

@@ -19,5 +19,7 @@ License
1919
=======
2020
4-clause BSD license, see `LICENSE` file.
2121

22-
[build_img]: https://travis-ci.org/diffblue/cbmc.svg?branch=master
2322
[travis]: https://travis-ci.org/diffblue/cbmc
23+
[travis_img]: https://travis-ci.org/diffblue/cbmc.svg?branch=master
24+
[appveyor]: https://ci.appveyor.com/project/diffblue/cbmc/
25+
[appveyor_img]: https://ci.appveyor.com/api/projects/status/github/diffblue/cbmc?svg=true&branch=master

appveyor.yml

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
version: 1.0.{build}
2+
image: Visual Studio 2013
3+
clone_depth: 50
4+
environment:
5+
BUILD_ENV: MSVC
6+
PATH: C:\projects\cbmc\deps\bin;%PATH%
7+
INCLUDE: C:\projects\cbmc\deps\include
8+
install:
9+
- ps: |
10+
#check if dependencies were copied from cache, if not, download them.
11+
if (!(Test-Path deps)) {
12+
md deps
13+
}
14+
cd deps
15+
if (!(Test-Path bin\bison.exe)) {
16+
& appveyor DownloadFile "https://storage.googleapis.com/diffblue-mirror/appveyor-deps/bison-2.4.1-bin.zip?GoogleAccessId=diffbluemaster@diffblue-cr.iam.gserviceaccount.com&Expires=1519839050&Signature=JAPFzNPMJDI4IViAVlJAEc6l8aHB3k17NpZRdoWDMLbALaJNX88vfwocuezU1tfhyrSJxfo2fTK4rgP5OULkikJs7MBZI9ovp2V%2BMT6yg87KDdH9EIOlMgltGfbP%2BoZkwBY7kXb3W5puSlt4OTE%2Bw7CRlHF9MNqFXVBqVBfa%2BGw0gXDe5Jd9qV%2BvUXZzRuBl9ERSQkSD%2B%2B%2BxFo24FZoOeYkgBHJz03%2BHuIMnlmcLgneTB2aiZZU3%2B6UTPceUxLus9%2Bksb5UbqEVaVE06TIXl76VKwqAgXM2LWaNyeJDog%2BT%2BhjW4v4ypxh6mIBo5KRNXVLPc1MxSPFQB3ITlIXv9Zg%3D%3D"
17+
& 7z x bison-2.4.1-bin.zip
18+
}
19+
if (!(Test-Path bin\flex.exe)) {
20+
& appveyor DownloadFile "https://storage.googleapis.com/diffblue-mirror/appveyor-deps/flex-2.5.4a-1-bin.zip?GoogleAccessId=diffbluemaster@diffblue-cr.iam.gserviceaccount.com&Expires=1519839050&Signature=WriP8S047Mmq271ZHWL0MCPGx1gEFsuc%2BKMmChoXhXFRkn0GlIgCxZEiOu52ke9fT1kAvycWXePNBFAyCHjpF%2BJkXCwisQ6FLIf3NL%2F92849YgQKdJkDUOcZ%2Bh82XVTwNBrljKIkExkak7QEyhOf3buTC1oeuatCUV5Ez42RZjgtRiJaqcFW6xLbhfuVONr39KxH5hGx%2FDUi2RRXPbgoKDwavc9s56NP1rNbWMTE6NdNHzJeaf43E%2BSMemlVO%2BhhIY6W0f%2FtaQ7fYF%2F6YaqxdQ0sB8W5DnG4Hb%2F0CyQlrTZpGDXGr301rV0M4WBkYLmfauq4IyJsBaR095tXGW%2BzmA%3D%3D"
21+
& 7z x flex-2.5.4a-1-bin.zip
22+
}
23+
if (!(Test-Path include\FlexLexer.h)) {
24+
& appveyor DownloadFile "https://storage.googleapis.com/diffblue-mirror/appveyor-deps/flex-2.5.4a-1-lib.zip?GoogleAccessId=diffbluemaster@diffblue-cr.iam.gserviceaccount.com&Expires=1519839050&Signature=H%2FLeKGv2QqKAGDTP%2F6TYPhDzuL6K%2F5dFOt61HfYBm1vUWVUNmAYVGvUAcvnUqBnhEHwZgtc8vZt1H7k3W8azxCUc7l6ZhlCDbqQ6Mg2VhfpBaQMbL1V%2BjSq5ePpWcuLMBntKk2br38PF1NtiAwCCpRTRPptaYPeGs%2BOjAH%2BN8aIIxjvj45QAgt9mcg6dfBsyfj5fdJmpHRQFuJ7%2FnsG50fmN5JDvdvmBWloB6rjxVWaN4XO6VTWZFZ34JWFyOqgWNEw9aDN3HdsSuJ0Uz19AbdwZBIWe5Elrl71rRJjn1lijCknDB7D4sAmP33k71e%2BB0qvsNl1Shuh9FkY8Z6y05Q%3D%3D"
25+
& 7z x flex-2.5.4a-1-lib.zip
26+
}
27+
if (!(Test-Path bin\iconv.exe)) {
28+
& appveyor DownloadFile "https://storage.googleapis.com/diffblue-mirror/appveyor-deps/libiconv-1.9.2-1-bin.zip?GoogleAccessId=diffbluemaster@diffblue-cr.iam.gserviceaccount.com&Expires=1519839050&Signature=sS3Y2lC1oWOhBDsL8C9ASuO4LOM%2BpB%2F8PwG5w5CdB9JnPfLqhb3FnA1zkkZJoSNuIYS3DM6CN2qxoWjpJbLEtVQe0PpxziQZjLpJw2MpxXdJiJHRDu8x9THgzwuZ3ze5BWHzPoCBQPdRkKzVPezf1HwptUsm3Y9c2jlWljQjhc8NVsI4iPmjEOwT8E%2BYpR5fsLs2GsRjuoyqKa%2Bi4JJ6MbpXVX1IgR4fzp1Li9SnE39ujHDb%2FyI3c96eCdVm1Oa6jNxzSJNfq%2FgOZM8BIxlR55a%2BtM3oBQhU0voEtDOABwuO7ZBay8dLt%2FG5vz1%2Bi%2FIlRLFxQfICaprPLzw6pXRm8Q%3D%3D"
29+
& 7z x libiconv-1.9.2-1-bin.zip
30+
}
31+
if (!(Test-Path bin\libintl3.dll)) {
32+
& appveyor DownloadFile "https://storage.googleapis.com/diffblue-mirror/appveyor-deps/libintl-0.14.4-bin.zip?GoogleAccessId=diffbluemaster@diffblue-cr.iam.gserviceaccount.com&Expires=1519839050&Signature=lJViGr6bl%2F4i%2B6nIfeYChreq%2FKfgid9QqGSq7Ie%2FMG%2Fmr9nPyPUA%2BLtT7jn1ogunTzQLZP%2FNxVFcYqyd8gyuT%2Bn2MF80Ds4Whw4cRYnXPb2LZg4%2FiEqZV6wgBMIQfq5v2l3lAsglISVErOik%2BQAHec5gZe2%2BKaVjRnJnhPRziZkQyzF9Xdf2xsPi28hBaX4RQx8XqSLcY1kQpY13PDBZDi9lmdKHf0pBKu%2F0WXspmRAU02HtleMk6Zeg5vEDFcwoe8C3fb4vwtpwGwN9TX5ddaq56yUVn70zh%2BH2KgKIsRl26avnrCpeWF9M5lLck0ngaqFX84w%2BgxmZu40IVU%2Ff0A%3D%3D"
33+
& 7z x libintl-0.14.4-bin.zip
34+
}
35+
if (!(Test-Path bin\make.exe)) {
36+
& appveyor DownloadFile "https://storage.googleapis.com/diffblue-mirror/appveyor-deps/make-3.81-bin.zip?GoogleAccessId=diffbluemaster@diffblue-cr.iam.gserviceaccount.com&Expires=1519839050&Signature=PRC97AWzJ2ZAyjEK4p7eCbA3RAEr8sTf8TUK5zoMBcrXPUHWYjnCwXRMnIxUUufBYjsAx8t1XnOQdlTuAPJYpcha%2FFJRlcxMmfQjNbpNEQFJuqEpA5c%2FGhFYxSD3a26vjpgReUW5MuQXeLeNh7PziLB0GP0sdRHN%2B1eDiHeCJWYNMYhrEY9BAkf5rXeRQWr1ZG0Hzq%2FxZEHceypx8xyaT%2BFzREYQOyKjGdre1QXtI%2FXo4ImA1xWt%2F8TnlGcAnCEaTltxuSRVB%2F7s1ShMr9KoagCb%2BjBWq6BgbcNGxyzyOZfi2Sjjo39mhudF9DNbKbkczes9Kp3ySgXmrXSWjIG4Iw%3D%3D"
37+
& 7z x make-3.81-bin.zip
38+
}
39+
if (!(Test-Path bin\regex2.dll)) {
40+
& appveyor DownloadFile "https://storage.googleapis.com/diffblue-mirror/appveyor-deps/regex-2.7-bin.zip?GoogleAccessId=diffbluemaster@diffblue-cr.iam.gserviceaccount.com&Expires=1519839050&Signature=bXRvFV%2Be4Dpm8vzp%2F1bJWwgkERE6WakcPTBN57n9vNh0dr42jDTXv8JF%2BWCmTIb%2Fy4XzxYl0faggt3g6TqTLYn5UDVUBYx%2FMLmNVVNEv%2BaBlDd87UAZGLi6fkEV5oAP4W4FYsqEnKRDfGPOBoL7D7CuW9Kcxy3Moubxdl%2Bmes%2BMI%2FzWJ6BgLD3Oj04GyD42zLCYVtAzkeDAX0UADoh06ExhpTjI4BNnQ%2FhzSlPtPG7mon4q81%2F2tDNskKVJS466eR%2F8XV6H4QT3LoCkh6dxQ9%2B9ZnkWJplundRbiIlpj43vmdvjIChczl4jbAgL6zFj5Gz6u58uvCV%2FbOuyx3Sw1fg%3D%3D"
41+
& 7z x regex-2.7-bin.zip
42+
}
43+
if (!(Test-Path minisat2-2.2.1)) {
44+
& appveyor DownloadFile http://ftp.debian.org/debian/pool/main/m/minisat2/minisat2_2.2.1.orig.tar.gz
45+
& 7z x minisat2_2.2.1.orig.tar.gz
46+
&7z x minisat2_2.2.1.orig.tar
47+
}
48+
cd ..
49+
50+
cache: deps
51+
52+
build_script:
53+
- cmd: |
54+
cp -r deps/minisat2-2.2.1 minisat-2.2.1
55+
patch -d minisat-2.2.1 -p1 < scripts/minisat-2.2.1-patch
56+
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
57+
sed -i "s/BUILD_ENV.*/BUILD_ENV = MSVC/" src/config.inc
58+
make -C src -j2
59+
60+
test_script:
61+
- cmd: |
62+
cd regression
63+
sed -i "s/goto-cc\/goto-cc/goto-cc\/goto-cl/" ansi-c/Makefile
64+
sed -i "s/goto-cc\/goto-cc/goto-cc\/goto-cl/" cpp/Makefile
65+
sed -i "s/goto-cc\/goto-cc/goto-cc\/goto-cl/" goto-instrument/chain.sh
66+
sed -i "15s/.*/$goto_cc $name.c/" goto-instrument/chain.sh
67+
sed -i "16i mv $name.exe $name.gb" goto-instrument/chain.sh
68+
sed -i "23s/.*/ $goto_cc ${name}-mod.c/" goto-instrument/chain.sh
69+
sed -i "24i mv ${name}-mod.exe $name-mod.gb" goto-instrument/chain.sh
70+
cat goto-instrument/chain.sh
71+
72+
sed -i "s/goto-cc\/goto-cc/goto-cc\/goto-cl/" goto-instrument-typedef/chain.sh || true
73+
sed -i "12s/.*/$GC $NAME.c --function fun/" goto-instrument-typedef/chain.sh || true
74+
sed -i "13i mv $NAME.exe $NAME.gb" goto-instrument-typedef/chain.sh || true
75+
cat goto-instrument-typedef/chain.sh || true
76+
77+
rem HACK disable failing tests
78+
rmdir /s /q ansi-c\Forward_Declaration2
79+
rmdir /s /q ansi-c\Incomplete_Type1
80+
rmdir /s /q ansi-c\Union_Padding1
81+
rmdir /s /q ansi-c\Universal_characters1
82+
rmdir /s /q ansi-c\function_return1
83+
rmdir /s /q ansi-c\gcc_attributes7
84+
rmdir /s /q ansi-c\struct6
85+
rmdir /s /q ansi-c\struct7
86+
rmdir /s /q cbmc\Malloc23
87+
rmdir /s /q cbmc\byte_update2
88+
rmdir /s /q cbmc\byte_update3
89+
rmdir /s /q cbmc\byte_update4
90+
rmdir /s /q cbmc\byte_update5
91+
rmdir /s /q cbmc\byte_update6
92+
rmdir /s /q cbmc\byte_update7
93+
rmdir /s /q cbmc\pipe1
94+
rmdir /s /q cbmc\unsigned___int128
95+
rmdir /s /q cpp\Decltype1
96+
rmdir /s /q cpp\Decltype2
97+
rmdir /s /q cpp\Function_Overloading1
98+
rmdir /s /q cpp\enum2
99+
rmdir /s /q cpp\enum7
100+
rmdir /s /q cpp\enum8
101+
rmdir /s /q cpp\nullptr1
102+
rmdir /s /q cpp\sizeof1
103+
rmdir /s /q cpp\static_assert1
104+
rmdir /s /q cbmc-java\VarLengthArrayTrace1
105+
rmdir /s /q cbmc-java\classpath1
106+
rmdir /s /q cbmc-java\jar-file3
107+
rmdir /s /q cbmc-java\tableswitch2
108+
rmdir /s /q goto-instrument\slice08
109+
110+
make test

regression/ansi-c/static1/main.c

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
static int fun(int a)
2+
{
3+
return a+1;
4+
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
KNOWNBUG
1+
CORE
22
main.c
33
--function fun
44
^EXIT=0$
55
^SIGNAL=0$
6-
^VERIFICATION SUCCESSFUL$
76
--
87
^warning: ignoring

regression/ansi-c/static2/main.c

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
int foo(int a)
2+
{
3+
return a+1;
4+
}

regression/ansi-c/static2/main2.c

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
static int foo(int a)
2+
{
3+
return a+1;
4+
}

regression/ansi-c/static2/test.desc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CORE
2+
main.c
3+
main2.c --function foo
4+
^main symbol `foo' is ambiguous$
5+
--
6+
^warning: ignoring

regression/ansi-c/static3/main.c

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
static int foo(int a)
2+
{
3+
return a+1;
4+
}

regression/ansi-c/static3/main2.c

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
static int foo(int a)
2+
{
3+
return a+1;
4+
}

regression/ansi-c/static3/test.desc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CORE
2+
main.c
3+
main2.c --function foo
4+
^main symbol `foo' is ambiguous$
5+
--
6+
^warning: ignoring
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
KNOWNBUG
1+
CORE
22
main.c
33

44
^EXIT=0$
55
^SIGNAL=0$
6-
^VERIFICATION SUCCESSFUL$
76
--
87
^warning: ignoring

regression/ansi-c/static_inline2/main.c

-4
This file was deleted.

regression/cbmc/Static4/main.c

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
static int foo(int a)
2+
{
3+
return a+1;
4+
}

regression/cbmc/Static4/test.desc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
main.c
3+
--show-symbol-table
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
^Symbol......: foo
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
int fun(int **a)
2+
{
3+
if(!a)
4+
{
5+
return 0;
6+
}
7+
if(!*a)
8+
{
9+
return 1;
10+
}
11+
if(**a==4)
12+
{
13+
return 2;
14+
}
15+
return 3;
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CORE
2+
main.c
3+
--function fun --cover branch
4+
^\*\* 7 of 7 covered \(100.0%\)$
5+
^\*\* Used 4 iterations$
6+
^Test suite:$
7+
^a=\(\(signed int \*\*\)NULL\), tmp\$1=[^,]*, tmp\$2=[^,]*$
8+
^a=&tmp\$1!0, tmp\$1=\(\(signed int \*\)NULL\), tmp\$2=[^,]*$
9+
^a=&tmp\$1!0, tmp\$1=&tmp\$2!0, tmp\$2=([012356789][0-9]*|4[0-9]+)$
10+
^a=&tmp\$1!0, tmp\$1=&tmp\$2!0, tmp\$2=4$
11+
--
12+
^warning: ignoring
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
int fun(int *a)
2+
{
3+
if(!a)
4+
{
5+
return 0;
6+
}
7+
if(*a==4)
8+
{
9+
return 1;
10+
}
11+
return 2;
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
main.c
3+
--function fun --cover branch
4+
^\*\* 5 of 5 covered \(100\.0%\)$
5+
^\*\* Used 3 iterations$
6+
^Test suite:$
7+
^a=\(\(signed int \*\)NULL\), tmp\$1=[^,]*$
8+
^a=&tmp\$1!0, tmp\$1=4$
9+
^a=&tmp\$1!0, tmp\$1=([012356789][0-9]*|4[0-9]+)$
10+
--
11+
^warning: ignoring

regression/cbmc/unsigned1/main.c

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
int main()
2+
{
3+
unsigned x;
4+
x=0u;
5+
return 0;
6+
}

regression/cbmc/unsigned1/test.desc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.c
3+
--show-goto-functions
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
00u
8+
^warning: ignoring

regression/cbmc/unsigned___int128/main.c

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,37 @@
11
# include <stdint.h>
22

3-
typedef unsigned __int128 uint128_t;
3+
typedef unsigned __int128 uint128_t;
44

55
typedef uint64_t limb;
66
typedef uint128_t widelimb;
77

88
typedef limb felem[4];
99
typedef widelimb widefelem[7];
1010

11-
felem p = {0x1FFFFFFFFFFFFFF,
12-
0xFFFFFFFFFFFFFF,
13-
0xFFFFE000000000,
11+
felem p = {0x1FFFFFFFFFFFFFF,
12+
0xFFFFFFFFFFFFFF,
13+
0xFFFFE000000000,
1414
0x00000000000002};
1515

1616

1717
/*-
1818
* Reduce seven 128-bit coefficients to four 64-bit coefficients.
1919
* Requires in[i] < 2^126,
2020
* ensures out[0] < 2^56, out[1] < 2^56, out[2] < 2^56, out[3] <= 2^56 + 2^16 */
21-
void reduce(felem out, const widefelem in)
21+
void reduce(
22+
limb out0, limb out1, limb out2, limb out3, widelimb in0, widelimb in1,
23+
widelimb in2, widelimb in3, widelimb in4, widelimb in5, widelimb in6)
2224
{
25+
felem out = {out0, out1, out2, out3};
26+
const widefelem in = {in0, in1, in2, in3, in4, in5, in6};
2327

2428
__CPROVER_assume(in[0]<(widelimb)((widelimb)1<<126));
2529
__CPROVER_assume(in[1]<((widelimb)1<<126));
2630
__CPROVER_assume(in[2]<((widelimb)1<<126));
2731
__CPROVER_assume(in[3]<((widelimb)1<<126));
32+
__CPROVER_assume(in[4]<((widelimb)1<<126));
33+
__CPROVER_assume(in[5]<((widelimb)1<<126));
34+
__CPROVER_assume(in[6]<((widelimb)1<<126));
2835

2936
static const widelimb two127p15 = (((widelimb) 1) << 127) +
3037
(((widelimb) 1) << 15);
@@ -75,9 +82,9 @@ void reduce(felem out, const widefelem in)
7582

7683
output[2] += output[1] >> 56;
7784
/* output[2] < 2^57 + 2^72 */
78-
85+
7986
assert(output[2] < (((widelimb)1)<<57)+(((widelimb)1)<<72));
80-
87+
8188
out[1] = output[1] & 0x00ffffffffffffff;
8289
output[3] += output[2] >> 56;
8390
/* output[3] <= 2^56 + 2^16 */

0 commit comments

Comments
 (0)