Skip to content

Merge stdarch-gen-hexagon-scalar into stdarch-gen-hexagon#2175

Open
xonx4l wants to merge 1 commit into
rust-lang:mainfrom
xonx4l:merge-hexagon-generators
Open

Merge stdarch-gen-hexagon-scalar into stdarch-gen-hexagon#2175
xonx4l wants to merge 1 commit into
rust-lang:mainfrom
xonx4l:merge-hexagon-generators

Conversation

@xonx4l

@xonx4l xonx4l commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

This PR merges stdarch-gen-hexagon-scalar into stdarch-gen-hexagon .

Merges stdarch-gen-hexagon-scalar into stdarch-gen-hexagon as new scalar module so a single binary produces every file under core_arch/src/hexagon/ in one bless run.

So main.rs is now a tiny orchestrator that calls scalar::generate then hvx::generate inside one run_generator call. Also scalar.rs now also writes GENERATED_MARKER so the harness sees it as owned.

r? @folkertdev

@xonx4l xonx4l force-pushed the merge-hexagon-generators branch from 1012847 to bcb8a41 Compare June 27, 2026 06:06

@folkertdev folkertdev Jun 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file move is kind of tough to review, are there any noteworthy changes here?

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only Two changes -:

  1. In imports dropped run_generator and Mode kept GENERATED_MARKER.
  2. The old fn main() is replaced by a small pub fn generate() that just does the header read, parse, and writes v64.rs / v128.rs. Everything in between parse_header, intrinsic model, generate_module_file etc.is identical to the prior file.

Comment on lines -1698 to -1699
// Either "check" to check the output versus the committed output, or "bless"
// to update the output.

@folkertdev folkertdev Jun 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to keep the comment.

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok.

println!(" Output: {}", hexagon_dir.join(filename).display());
}
scalar::generate(&crate_dir, out_dir)?;
hvx::generate(&crate_dir, out_dir)?;

@folkertdev folkertdev Jun 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe also comment here what files we expect these to create/update?

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah will add .

}

/// Parse the HVX header in `crate_dir` and write `v64.rs` and `v128.rs` into `out_dir`.
pub fn generate(crate_dir: &std::path::Path, out_dir: &std::path::Path) -> Result<(), String> {

@xonx4l xonx4l Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The major change to review in this file .

View changes since the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants