Skip to content

Commit

Permalink
add non adx version of Montgomery modular multiplication/squaring and to
Browse files Browse the repository at this point in the history
add non adx version of Montgomery modular multiplication/squaring and to

fix stack allcoation and de-allocation

correct flag no_adx condition

fix no_adx flag propagation

add adx detection support via /proc/cpuinfo

perform detection only if flag was not explicitely specified
  • Loading branch information
zkbitcoin.com committed May 24, 2024
1 parent 3ea01c8 commit 1001a84
Show file tree
Hide file tree
Showing 8 changed files with 11,430 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ tmp

# bazel
/bazel-*

.idea
.clwb
7 changes: 6 additions & 1 deletion build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ def generate_prime_field(
element_h_out = None,
generic_c_out = None,
raw_generic_c_out = None,
arm64_s_out = None):
arm64_s_out = None,
no_adx = None):
args = [
"-q={}".format(modulus),
"-n={}".format(name),
Expand Down Expand Up @@ -56,6 +57,10 @@ def generate_prime_field(
else:
arm64_s_out = name + "_raw_arm64.s"

if no_adx != None:
if no_adx == True:
args.append("--no_adx")

js_run_binary(
name = name,
outs = [
Expand Down
Loading

0 comments on commit 1001a84

Please sign in to comment.