add autogeneration header to output artifacts

This commit is contained in:
bunnie 2026-02-20 23:52:16 +08:00
parent 6176d3379d
commit 9e34da0bf7

View file

@ -22,7 +22,7 @@ import argparse
import re
import sys
import os
from datetime import datetime
# ============================================================================
# Register translation: x16-x31 ABI names -> raw xN form
@ -1301,6 +1301,7 @@ def format_output(fn_name, start_label, end_label, converted_lines, data_objects
# C-routines that are `static`-free could use `bio_code` and save the alignment
# overhead, but the cost of confusing new programmers is not worth the savings
# of a few kiB of code space.
parts.append(f"// AUTOGENERATED CODE on {datetime.now().isoformat()} - do not edit directly!\n")
parts.append("use bao1x_api::bio_code_aligned;\n")
parts.append("#[rustfmt::skip]")
parts.append(f"bio_code_aligned!({fn_name}, {start_label}, {end_label},")