Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reveal nodes on demand rather than up-front #2059

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Makefile.examples
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,9 @@ include Makefile.test-amd64-files.mk
.PHONY: test-amd64-files-print-report test-amd64-files-lite-print-report only-test-amd64-files-print-report only-test-amd64-files-lite-print-report
.PHONY: test-amd64-files-print-report-after-make test-amd64-files-lite-print-report-after-make only-test-amd64-files-print-report-after-make only-test-amd64-files-lite-print-report-after-make

test-amd64-files-print-report:: STATUS_FILES=$(AMD64_ASM_STATUS_FILES)
test-amd64-files-print-report test-amd64-files-print-report-after-make:: STATUS_FILES=$(AMD64_ASM_STATUS_FILES)
only-test-amd64-files-print-report only-test-amd64-files-print-report-after-make:: STATUS_FILES=$(AMD64_ASM_ONLY_STATUS_FILES)
test-amd64-files-lite-print-report:: STATUS_FILES=$(AMD64_ASM_SMALL_STATUS_FILES)
test-amd64-files-lite-print-report test-amd64-files-lite-print-report-after-make:: STATUS_FILES=$(AMD64_ASM_SMALL_STATUS_FILES)
only-test-amd64-files-lite-print-report only-test-amd64-files-lite-print-report-after-make:: STATUS_FILES=$(AMD64_ASM_SMALL_ONLY_STATUS_FILES)
test-amd64-files-status: STATUS_FILES=$(AMD64_ASM_STATUS_FILES)
only-test-amd64-files-status: STATUS_FILES=$(AMD64_ASM_ONLY_STATUS_FILES)
Expand All @@ -366,6 +366,8 @@ only-test-amd64-files-lite-status: STATUS_FILES=$(AMD64_ASM_SMALL_ONLY_STATUS_FI

only-test-amd64-files-print-report-after-make:: | only-test-amd64-files-status
only-test-amd64-files-lite-print-report-after-make:: | only-test-amd64-files-lite-status
test-amd64-files-print-report-after-make:: | test-amd64-files-status
test-amd64-files-lite-print-report-after-make:: | test-amd64-files-lite-status

test-amd64-files-print-report only-test-amd64-files-print-report test-amd64-files-lite-print-report only-test-amd64-files-lite-print-report test-amd64-files-print-report-after-make only-test-amd64-files-print-report-after-make test-amd64-files-lite-print-report-after-make only-test-amd64-files-lite-print-report-after-make::
@ export passed=$$(cat $(STATUS_FILES) 2>/dev/null | grep -c '^0$$'); \
Expand All @@ -385,13 +387,11 @@ test-amd64-files-status only-test-amd64-files-status test-amd64-files-lite-statu

test-amd64-files test-amd64-files-lite: $(UNSATURATED_SOLINAS) $(WORD_BY_WORD_MONTGOMERY) $(SOLINAS_REDUCTION) $(DETTMAN_MULTIPLICATION)

test-amd64-files: test-amd64-files-print-report test-amd64-files-status

only-test-amd64-files: only-test-amd64-files-print-report-after-make only-test-amd64-files-status

test-amd64-files-lite: test-amd64-files-lite-print-report test-amd64-files-lite-status

only-test-amd64-files-lite: only-test-amd64-files-lite-print-report-after-make only-test-amd64-files-lite-status
test-amd64-files only-test-amd64-files test-amd64-files-lite only-test-amd64-files-lite:
+$(MAKE) $@-status; \
RV=$$?; \
$(MAKE) $@-print-report; \
exit $$RV

etc/tscfreq: etc/tscfreq.c
$(CC) etc/tscfreq.c -s -Os -o etc/tscfreq
Expand Down
54 changes: 54 additions & 0 deletions fiat-amd64/fiat_curve25519_sub/clang_19_1_0_O0.asm.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.globl _Z14fiat_25519_subPmPKmS1_
_Z14fiat_25519_subPmPKmS1_:
push rbp
mov rbp, rsp
mov qword ptr [rbp - 8], rdi
mov qword ptr [rbp - 16], rsi
mov qword ptr [rbp - 24], rdx
mov rcx, qword ptr [rbp - 16]
movabs rax, 4503599627370458
add rax, qword ptr [rcx]
mov rcx, qword ptr [rbp - 24]
sub rax, qword ptr [rcx]
mov qword ptr [rbp - 32], rax
mov rcx, qword ptr [rbp - 16]
movabs rax, 4503599627370494
add rax, qword ptr [rcx + 8]
mov rcx, qword ptr [rbp - 24]
sub rax, qword ptr [rcx + 8]
mov qword ptr [rbp - 40], rax
mov rcx, qword ptr [rbp - 16]
movabs rax, 4503599627370494
add rax, qword ptr [rcx + 16]
mov rcx, qword ptr [rbp - 24]
sub rax, qword ptr [rcx + 16]
mov qword ptr [rbp - 48], rax
mov rcx, qword ptr [rbp - 16]
movabs rax, 4503599627370494
add rax, qword ptr [rcx + 24]
mov rcx, qword ptr [rbp - 24]
sub rax, qword ptr [rcx + 24]
mov qword ptr [rbp - 56], rax
mov rcx, qword ptr [rbp - 16]
movabs rax, 4503599627370494
add rax, qword ptr [rcx + 32]
mov rcx, qword ptr [rbp - 24]
sub rax, qword ptr [rcx + 32]
mov qword ptr [rbp - 64], rax
mov rcx, qword ptr [rbp - 32]
mov rax, qword ptr [rbp - 8]
mov qword ptr [rax], rcx
mov rcx, qword ptr [rbp - 40]
mov rax, qword ptr [rbp - 8]
mov qword ptr [rax + 8], rcx
mov rcx, qword ptr [rbp - 48]
mov rax, qword ptr [rbp - 8]
mov qword ptr [rax + 16], rcx
mov rcx, qword ptr [rbp - 56]
mov rax, qword ptr [rbp - 8]
mov qword ptr [rax + 24], rcx
mov rcx, qword ptr [rbp - 64]
mov rax, qword ptr [rbp - 8]
mov qword ptr [rax + 32], rcx
pop rbp
ret
77 changes: 77 additions & 0 deletions fiat-amd64/fiat_curve25519_sub/gcc_14_1_0.asm.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
.globl _Z14fiat_25519_subPmPKmS1_
_Z14fiat_25519_subPmPKmS1_:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-56], rdi
mov QWORD PTR [rbp-64], rsi
mov QWORD PTR [rbp-72], rdx
mov rax, QWORD PTR [rbp-64]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-72]
mov rax, QWORD PTR [rax]
sub rdx, rax
movabs rax, 4503599627370458
add rax, rdx
mov QWORD PTR [rbp-8], rax
mov rax, QWORD PTR [rbp-64]
add rax, 8
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-72]
add rax, 8
mov rax, QWORD PTR [rax]
sub rdx, rax
movabs rax, 4503599627370494
add rax, rdx
mov QWORD PTR [rbp-16], rax
mov rax, QWORD PTR [rbp-64]
add rax, 16
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-72]
add rax, 16
mov rax, QWORD PTR [rax]
sub rdx, rax
movabs rax, 4503599627370494
add rax, rdx
mov QWORD PTR [rbp-24], rax
mov rax, QWORD PTR [rbp-64]
add rax, 24
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-72]
add rax, 24
mov rax, QWORD PTR [rax]
sub rdx, rax
movabs rax, 4503599627370494
add rax, rdx
mov QWORD PTR [rbp-32], rax
mov rax, QWORD PTR [rbp-64]
add rax, 32
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-72]
add rax, 32
mov rax, QWORD PTR [rax]
sub rdx, rax
movabs rax, 4503599627370494
add rax, rdx
mov QWORD PTR [rbp-40], rax
mov rax, QWORD PTR [rbp-56]
mov rdx, QWORD PTR [rbp-8]
mov QWORD PTR [rax], rdx
mov rax, QWORD PTR [rbp-56]
lea rdx, [rax+8]
mov rax, QWORD PTR [rbp-16]
mov QWORD PTR [rdx], rax
mov rax, QWORD PTR [rbp-56]
lea rdx, [rax+16]
mov rax, QWORD PTR [rbp-24]
mov QWORD PTR [rdx], rax
mov rax, QWORD PTR [rbp-56]
lea rdx, [rax+24]
mov rax, QWORD PTR [rbp-32]
mov QWORD PTR [rdx], rax
mov rax, QWORD PTR [rbp-56]
lea rdx, [rax+32]
mov rax, QWORD PTR [rbp-40]
mov QWORD PTR [rdx], rax
nop
pop rbp
ret
12 changes: 7 additions & 5 deletions fiat-amd64/gentest.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ def removeprefix(s, prefix):
m = regex.match(os.path.basename(dirname))
if m:
for fname in os.listdir(dirname):
groups = m.groupdict()
asm_op_names.setdefault((groups["name"], groups["op"]), []).append(
os.path.join(dirname, fname)
)
if fname.endswith(".asm") or fname.endswith(".s"):
groups = m.groupdict()
asm_op_names.setdefault((groups["name"], groups["op"]), []).append(
os.path.join(dirname, fname)
)


def asm_op_names_key(val):
Expand Down Expand Up @@ -221,7 +222,8 @@ def is_small(val):
assert False, name
if output_makefile:
short_fnames = [
removesuffix(os.path.basename(fname), ".asm") for fname in fnames
removesuffix(removesuffix(os.path.basename(fname), ".asm"), ".s")
for fname in fnames
]
description = f'{name} {prime.replace(" ", "")} ({op}) ({binary_descr}) ({" ".join(short_fnames)})'
output_name = f"fiat-amd64/{name}-{op}"
Expand Down
Loading
Loading