Repository navigation
Description
This is a tracking issue for powerpc_target_feature, guarding target features on powerpc.
This is a catch-all issue for all target features on that target. See this file for a list of target features currently guarded by this feature gate.
See #44839 for discussion from before this feature got its own tracking issue.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
- Figure out ABI interactions and other possible blockers/concerns
- Move target features that should not be part of the initial stabilization under separate feature gates
- Final Comment Period (FCP)
- Stabilization PR (see instructions on rustc-dev-guide)
Unresolved Questions
none at the moment
Activity
Rollup merge of rust-lang#150264 - RalfJung:target-feature-tracking-s…
Unrolled build for #150264
tgross35 commentedon Oct 9, 2026
I think it may be possible to stabilize the features that aren't internal-only. Currently we have:
That hierarchy seems pretty reasonable, but some notes:
-Ctarget-cpu=pwrN. I think "powerN" is fine since it matches the C defines like__POWER9_VECTOR__quadword-atomicsquad-memory-atomic/__QUAD_MEMORY_ATOMIC__msyncandpartword-atomics?(Referencing https://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.html and https://gcc.godbolt.org/z/rz9oTG99b for GCC)
@Gelbpunkt @pmur @daltenty any thoughts?
tgross35 commentedon Oct 9, 2026
See also #111191 for the macros
taiki-e commentedon Oct 9, 2026
See #130873 (partword-atomics/quadword-atomics) and #137860 (msync).
taiki-e commentedon Oct 9, 2026
msync(which indicates thatlwsync(sync 1) is not available) is a feature in the same category as RISC-Ve, so I think it should probably be discussed separately from the others.tgross35 commentedon Oct 9, 2026
Does the remaining list seem reasonable then?
altivecvsxpartword-atomicsquadword-atomicspower8-altivecpower8-cryptopower8-vectorpower9-altivecpower9-vectorpower10-vectortaiki-e commentedon Oct 9, 2026
It seems reasonable to me.
RalfJung commentedon Oct 9, 2026
Do any of these have ABI effects, other than availability of vector registers as reflected in
POWERPC_FEATURES_FOR_CORRECT_FIXED_LENGTH_VECTOR_ABI?This means: SIMD vectors up to 128 bit are allowed in
extern "C"when "altivec" is enabled.RalfJung commentedon Oct 9, 2026
For these "atomic" target features, what effect do they have? If some part of the code has those features and some part does not, and they share access to the same
&Atomic*, will they use different instructions? Will they still interoperate correctly?pmur commentedon Oct 9, 2026
What is the reason for keeping
-vectorand/or-altivecon the powerx targets? I would think onlypowerxis needed for 8/9/10 these days, with implied vsx/altivec/crypto support.I also suspect the
power8-cryptofeature should be implied by any newer powerx cpu (did I misread the source?).15 remaining items
tgross35 commentedon Oct 19, 2026
Sorry, misclicked.
Transforming that file a bit, the list is:
So as I understand it, the features we have now like
power9-vectorare already just implying ISA 3.0 with VSX and Altivec. I think it would be fine to replace those.tgross35 commentedon Oct 20, 2026
I think there are some things worth getting agreement on, so opened an MCP for updating the features rust-lang/compiler-team#1046
Rollup merge of rust-lang#164612 - tgross35:ppc-feature-detect-combin…
Rollup merge of rust-lang#164612 - tgross35:ppc-feature-detect-combin…
Rollup merge of rust-lang#164612 - tgross35:ppc-feature-detect-combin…
Rollup merge of rust-lang#164612 - tgross35:ppc-feature-detect-combin…
Rollup merge of rust-lang#164612 - tgross35:ppc-feature-detect-combin…
Rollup merge of rust-lang#164612 - tgross35:ppc-feature-detect-combin…
Rollup merge of rust-lang#164612 - tgross35:ppc-feature-detect-combin…
Unrolled build for #164612 in rollup 164662
Rollup merge of #164612 - tgross35:ppc-feature-detect-combine, r=prog…
Rollup merge of #164612 - tgross35:ppc-feature-detect-combine, r=prog…
Rollup merge of #164612 - tgross35:ppc-feature-detect-combine, r=prog…