Skip to content
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
20 changes: 20 additions & 0 deletions proofs/hol_light/aarch64/proofs/dump_bytecode.ml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,23 @@ print_string "==== bytecode end =====================================\n\n";;
print_string "=== bytecode start: aarch64/mldsa/mldsa_rej_uniform_eta4_aarch64_asm.o ===\n";;
print_literal_from_elf "aarch64/mldsa/mldsa_rej_uniform_eta4_aarch64_asm.o";;
print_string "==== bytecode end =====================================\n\n";;

print_string "=== bytecode start: aarch64/mldsa/keccak_f1600_x1_scalar_aarch64_asm.o ===\n";;
print_literal_from_elf "aarch64/mldsa/keccak_f1600_x1_scalar_aarch64_asm.o";;
print_string "==== bytecode end =====================================\n\n";;

print_string "=== bytecode start: aarch64/mldsa/keccak_f1600_x1_v84a_aarch64_asm.o ===\n";;
print_literal_from_elf "aarch64/mldsa/keccak_f1600_x1_v84a_aarch64_asm.o";;
print_string "==== bytecode end =====================================\n\n";;

print_string "=== bytecode start: aarch64/mldsa/keccak_f1600_x2_v84a_aarch64_asm.o ===\n";;
print_literal_from_elf "aarch64/mldsa/keccak_f1600_x2_v84a_aarch64_asm.o";;
print_string "==== bytecode end =====================================\n\n";;

print_string "=== bytecode start: aarch64/mldsa/keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm.o ===\n";;
print_literal_from_elf "aarch64/mldsa/keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm.o";;
print_string "==== bytecode end =====================================\n\n";;

print_string "=== bytecode start: aarch64/mldsa/keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm.o ===\n";;
print_literal_from_elf "aarch64/mldsa/keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm.o";;
print_string "==== bytecode end =====================================\n\n";;
14 changes: 11 additions & 3 deletions scripts/autogen
Original file line number Diff line number Diff line change
Expand Up @@ -4145,9 +4145,17 @@ def update_hol_light_bytecode_for_arch(arch, force_cross=()):
bytecode_dict = extract_bytecode_from_output(output_text)

# Update each .ml file
for obj_name, bytecode in bytecode_dict.items():
ml_file = "proofs/hol_light/" + arch + "/proofs/" + obj_name + ".ml"
update_bytecode_in_proof_script(ml_file, bytecode)
proof_dir = "proofs/hol_light/" + arch + "/proofs"
asm_dir = "proofs/hol_light/" + arch + "/mldsa"
for asm_file in sorted(pathlib.Path(asm_dir).glob("*.S")):
ml_file = f"{proof_dir}/{asm_file.stem}.ml"
if not os.path.isfile(ml_file):
raise Exception(f"{asm_file} has no proof {ml_file}")
if asm_file.stem not in bytecode_dict:
raise Exception(
f"{proof_dir}/dump_bytecode.ml does not dump {asm_file.stem}.o"
)
update_bytecode_in_proof_script(ml_file, bytecode_dict[asm_file.stem])


def update_hol_light_bytecode(force_cross=()):
Expand Down
Loading