diff --git a/examples/cpp/bit_operations/shift_left.cpp b/examples/cpp/bit_operations/shift_left.cpp index be01f9f67..31e2ae230 100644 --- a/examples/cpp/bit_operations/shift_left.cpp +++ b/examples/cpp/bit_operations/shift_left.cpp @@ -1,8 +1,8 @@ #include -[[circuit]] uint32_t shl(uint32_t a, - uint32_t b) { - - - return a << b; // shl +[[circuit]] uint64_t shl(uint64_t value, uint64_t shift, uint64_t expected_shifted) +{ + uint64_t shifted = value << shift; + __builtin_assigner_exit_check(shifted == expected_shifted); + return shifted; } diff --git a/examples/inputs/bit_operations/shift_left.inp b/examples/inputs/bit_operations/shift_left.inp index 7724b63a4..332af220b 100644 --- a/examples/inputs/bit_operations/shift_left.inp +++ b/examples/inputs/bit_operations/shift_left.inp @@ -1,4 +1,5 @@ [ - {"int": 11}, - {"int": 2} -] \ No newline at end of file + {"int": 1}, + {"int": 2}, + {"int": 4} +] diff --git a/libs/assigner b/libs/assigner index bf7ba65b6..3721cfed7 160000 --- a/libs/assigner +++ b/libs/assigner @@ -1 +1 @@ -Subproject commit bf7ba65b63a99593c73d80c8cf84fb854fc9ef76 +Subproject commit 3721cfed7bcbf54afea4b0bf45ec5904ffc652f4 diff --git a/libs/circifier b/libs/circifier index 734d087a3..80a8e0f62 160000 --- a/libs/circifier +++ b/libs/circifier @@ -1 +1 @@ -Subproject commit 734d087a3eadc7fefd275eef04f158fb4fb3e0a7 +Subproject commit 80a8e0f62fa21657c80df72d57a035255a0a4f23