Skip to content

Conversation

@androm3da
Copy link
Contributor

This will be used in order to emit HVX intrinsics

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 22, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 22, 2026

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-log-analyzer

This comment has been minimized.

This will be used in order to emit HVX intrinsics
@jieyouxu
Copy link
Member

@rustbot reroll

@rustbot rustbot assigned mati865 and unassigned jieyouxu Jan 23, 2026
@mati865
Copy link
Member

mati865 commented Jan 23, 2026

@rustbot reroll

@rustbot rustbot assigned SparrowLii and unassigned mati865 Jan 23, 2026
@folkertdev
Copy link
Contributor

r? me

@rustbot rustbot assigned folkertdev and unassigned SparrowLii Jan 23, 2026
@folkertdev
Copy link
Contributor

These are added for use in stdarch, see rust-lang/stdarch#1999.

We've had some trouble with feature flags that influence ABI in the past (e.g. vector registers, softfloat). Do any of these features change the ABI at all? (doesn't look like it, just checking)

@androm3da
Copy link
Contributor Author

We've had some trouble with feature flags that influence ABI in the past (e.g. vector registers, softfloat). Do any of these features change the ABI at all? (doesn't look like it, just checking)

The existing +hvx feature does impact the ABI - vector registers and pairs are used as params/retvals, but these new hvxv* subtarget features (which imply hvx) do not impact it beyond that.

Not sure if I covered the concern but I can clarify in more detail and refer to the ABI spec and the backend behavior to help cover anything I left out.

@folkertdev
Copy link
Contributor

Right, that one's already in.

A different way to phrase what I'm asking: for each of these new features, if I had an object that was compiled with the feature, and one without (but it still enables implied features), and linked them together, would that cause UB?

For vector registers that is the case, because the two sides would disagree on how vector values are passed. But it sounds like hvxv* are just further extensions on top of hvx that themselves cause no such issues.

@androm3da
Copy link
Contributor Author

Right, that one's already in.

A different way to phrase what I'm asking: for each of these new features, if I had an object that was compiled with the feature, and one without (but it still enables implied features), and linked them together, would that cause UB?

It's safe to mix object files of varying hvxv* codegen. The linker will promote the .hexagon.attributes to the highest one when merging, each one is a superset of its predecessors -- just new opcodes.

For vector registers that is the case, because the two sides would disagree on how vector values are passed. But it sounds like hvxv* are just further extensions on top of hvx that themselves cause no such issues.

Yes, exactly.

Footnote/aside - there's a clang feature that's pending that will distinguish between some of the HVX Vector types, it rejects assignments among float/integer types because of some precision loss when they're used with certain opcodes. The precision that's lost in this case is uarch state beyond the scope of the architecturally-visible vector register, so again here should be no impact to the ABI. I'll see about making a corresponding Rust feature and types when that lands in clang.

@folkertdev
Copy link
Contributor

Cool, this should be good then

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 23, 2026

📌 Commit 8c1e51f has been approved by folkertdev

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 23, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jan 24, 2026
…r=folkertdev

hexagon: Add HVX target features

This will be used in order to emit HVX intrinsics
rust-bors bot pushed a commit that referenced this pull request Jan 24, 2026
Rollup of 8 pull requests

Successful merges:

 - #150556 (Add Tier 3 Thumb-mode targets for Armv7-A, Armv7-R and Armv8-R)
 - #151346 (add `simd_splat` intrinsic)
 - #151500 (hexagon: Add HVX target features)
 - #151505 (Various refactors to the proc_macro bridge)
 - #151517 (Enable reproducible binary builds with debuginfo on Linux)
 - #151482 (Add "Skip to main content" link for keyboard navigation in rustdoc)
 - #151489 (constify boolean methods)
 - #151551 (Don't use default build-script fingerprinting in `test`)

r? @ghost
jhpratt added a commit to jhpratt/rust that referenced this pull request Jan 24, 2026
…r=folkertdev

hexagon: Add HVX target features

This will be used in order to emit HVX intrinsics
rust-bors bot pushed a commit that referenced this pull request Jan 24, 2026
Rollup of 8 pull requests

Successful merges:

 - #150556 (Add Tier 3 Thumb-mode targets for Armv7-A, Armv7-R and Armv8-R)
 - #151500 (hexagon: Add HVX target features)
 - #151505 (Various refactors to the proc_macro bridge)
 - #151517 (Enable reproducible binary builds with debuginfo on Linux)
 - #151482 (Add "Skip to main content" link for keyboard navigation in rustdoc)
 - #151489 (constify boolean methods)
 - #151551 (Don't use default build-script fingerprinting in `test`)
 - #151555 (Fix compilation of std/src/sys/pal/uefi/tests.rs)

r? @ghost
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jan 24, 2026
…r=folkertdev

hexagon: Add HVX target features

This will be used in order to emit HVX intrinsics
rust-bors bot pushed a commit that referenced this pull request Jan 24, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #150556 (Add Tier 3 Thumb-mode targets for Armv7-A, Armv7-R and Armv8-R)
 - #151259 (Fix is_ascii performance regression on AVX-512 CPUs when compiling with -C target-cpu=native)
 - #151500 (hexagon: Add HVX target features)
 - #151517 (Enable reproducible binary builds with debuginfo on Linux)
 - #151482 (Add "Skip to main content" link for keyboard navigation in rustdoc)
 - #151489 (constify boolean methods)
 - #151551 (Don't use default build-script fingerprinting in `test`)
 - #151555 (Fix compilation of std/src/sys/pal/uefi/tests.rs)

r? @ghost
@rust-bors rust-bors bot merged commit 43b20c6 into rust-lang:main Jan 24, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Jan 24, 2026
rust-timer added a commit that referenced this pull request Jan 24, 2026
Rollup merge of #151500 - androm3da:bcain/hexagon_hvx_feat, r=folkertdev

hexagon: Add HVX target features

This will be used in order to emit HVX intrinsics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants