Support input/output in vector registers of PowerPC inline assembly by taiki-e · Pull Request #131551 · rust-lang/rust (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

taiki-e

@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.

O-PowerPC

Target: PowerPC processors

labels

Oct 11, 2024

This was referenced

Oct 11, 2024

@taiki-e taiki-e changed the titleSupport input/output #[repr(simd)] types in PowerPC inline assembly Support #[repr(simd)] types in input/output of PowerPC inline assembly

Oct 11, 2024

taiki-e

Comment on lines 53 to 57

tgross35 added a commit to tgross35/rust that referenced this pull request

Nov 5, 2024

@tgross35

…rkingjubilee

Support clobber_abi and vector registers (clobber-only) in PowerPC inline assembly

This supports clobber_abi which is one of the requirements of stabilization mentioned in rust-lang#93335.

This basically does a similar thing I did in rust-lang#130630 to implement clobber_abi for s390x, but for powerpc/powerpc64/powerpc64le.

Refs:

If I understand the above four ABI documentations correctly, except for the PPC32 SysV's VR (Vector Registers) and 32-bit AIX (currently not supported by rustc)'s r13, there does not appear to be important differences in terms of implementing clobber_abi:

We are currently treating r1-r2, r13 (non-32-bit-AIX), r29-r31, LR, CTR, and VRSAVE as reserved. We are currently not processing anything about FPSCR and VSCR, but I feel those are things that should be processed by preserves_flags rather than clobber_abi if we need to do something about them. (However, PPCRegisterInfo.td in LLVM does not seem to define anything about them.)

Replaces rust-lang#111335 and rust-lang#124279

cc @ecnelises @bzEq @lu-zero

r? @Amanieu

@rustbot label +O-PowerPC +A-inline-assembly

[^r13]: callee-saved, according to LLVM and GCC.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Nov 5, 2024

@bors

…ingjubilee

Support clobber_abi and vector registers (clobber-only) in PowerPC inline assembly

This supports clobber_abi which is one of the requirements of stabilization mentioned in rust-lang#93335.

This basically does a similar thing I did in rust-lang#130630 to implement clobber_abi for s390x, but for powerpc/powerpc64/powerpc64le.

Refs:

If I understand the above four ABI documentations correctly, except for the PPC32 SysV's VR (Vector Registers) and 32-bit AIX (currently not supported by rustc)'s r13, there does not appear to be important differences in terms of implementing clobber_abi:

We are currently treating r1-r2, r13 (non-32-bit-AIX), r29-r31, LR, CTR, and VRSAVE as reserved. We are currently not processing anything about FPSCR and VSCR, but I feel those are things that should be processed by preserves_flags rather than clobber_abi if we need to do something about them. (However, PPCRegisterInfo.td in LLVM does not seem to define anything about them.)

Replaces rust-lang#111335 and rust-lang#124279

cc @ecnelises @bzEq @lu-zero

r? @Amanieu

@rustbot label +O-PowerPC +A-inline-assembly

[^r13]: callee-saved, according to LLVM and GCC.

@taiki-e taiki-e marked this pull request as ready for review

November 5, 2024 12:35

Amanieu

@Amanieu Amanieu added S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Nov 28, 2024

lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request

Nov 28, 2024

@bors

Support clobber_abi and vector registers (clobber-only) in PowerPC inline assembly

This supports clobber_abi which is one of the requirements of stabilization mentioned in #93335.

This basically does a similar thing I did in rust-lang/rust#130630 to implement clobber_abi for s390x, but for powerpc/powerpc64/powerpc64le.

Refs:

If I understand the above four ABI documentations correctly, except for the PPC32 SysV's VR (Vector Registers) and 32-bit AIX (currently not supported by rustc)'s r13, there does not appear to be important differences in terms of implementing clobber_abi:

We are currently treating r1-r2, r13 (non-32-bit-AIX), r29-r31, LR, CTR, and VRSAVE as reserved. We are currently not processing anything about FPSCR and VSCR, but I feel those are things that should be processed by preserves_flags rather than clobber_abi if we need to do something about them. (However, PPCRegisterInfo.td in LLVM does not seem to define anything about them.)

Replaces #111335 and #124279

cc @ecnelises @bzEq @lu-zero

r? @Amanieu

@rustbot label +O-PowerPC +A-inline-assembly

[^r13]: callee-saved, according to LLVM and GCC.

@taiki-e

@taiki-e taiki-e changed the titleSupport #[repr(simd)] types in input/output of PowerPC inline assembly Support input/output in vector registers of PowerPC inline assembly

Nov 28, 2024

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

and removed S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Nov 28, 2024

@taiki-e

@bors bors 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

Nov 29, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Nov 30, 2024

@bors

Rollup of 6 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Nov 30, 2024

@bors

Rollup of 6 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Nov 30, 2024

@rust-timer

Rollup merge of rust-lang#131551 - taiki-e:ppc-asm-vreg-inout, r=Amanieu

Support input/output in vector registers of PowerPC inline assembly

This extends currently clobber-only vector registers (vreg) support to allow passing #[repr(simd)] types as input/output.

Architecture Register class Target feature Allowed types
PowerPC vreg altivec i8x16, i16x8, i32x4, f32x4
PowerPC vreg vsx f32, f64, i64x2, f64x2

In addition to floats and core::simd types listed above, core::arch types and custom #[repr(simd)] types of the same size and type are also allowed. All allowed types and relevant target features are currently unstable.

r? @Amanieu

@rustbot label +O-PowerPC +A-inline-assembly

@taiki-e taiki-e deleted the ppc-asm-vreg-inout branch

December 1, 2024 02:11

antoyo pushed a commit to rust-lang/rustc_codegen_gcc that referenced this pull request

Dec 11, 2024

@bors

Support clobber_abi and vector registers (clobber-only) in PowerPC inline assembly

This supports clobber_abi which is one of the requirements of stabilization mentioned in #93335.

This basically does a similar thing I did in rust-lang/rust#130630 to implement clobber_abi for s390x, but for powerpc/powerpc64/powerpc64le.

Refs:

If I understand the above four ABI documentations correctly, except for the PPC32 SysV's VR (Vector Registers) and 32-bit AIX (currently not supported by rustc)'s r13, there does not appear to be important differences in terms of implementing clobber_abi:

We are currently treating r1-r2, r13 (non-32-bit-AIX), r29-r31, LR, CTR, and VRSAVE as reserved. We are currently not processing anything about FPSCR and VSCR, but I feel those are things that should be processed by preserves_flags rather than clobber_abi if we need to do something about them. (However, PPCRegisterInfo.td in LLVM does not seem to define anything about them.)

Replaces #111335 and #124279

cc @ecnelises @bzEq @lu-zero

r? @Amanieu

@rustbot label +O-PowerPC +A-inline-assembly

[^r13]: callee-saved, according to LLVM and GCC.

github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request

Mar 11, 2025

@bors

Rollup of 6 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup