Skip to content

Remove fixme comment about clobber_abi on PowerPC #132638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions compiler/rustc_target/src/asm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,21 @@ impl InlineAsmClobberAbi {
},
InlineAsmClobberAbi::PowerPC => clobbered_regs! {
PowerPC PowerPCInlineAsmReg {
// Refs:
// - PPC32 SysV: "3.2. Function Calling Sequence" in Power Architecture® 32-bit Application Binary Interface Supplement 1.0 - Linux® & Embedded
// https://web.archive.org/web/20120608163804/https://www.power.org/resources/downloads/Power-Arch-32-bit-ABI-supp-1.0-Unified.pdf
// - PPC64 ELFv1: "3.2. Function Calling Sequence" in 64-bit PowerPC ELF Application Binary Interface Supplement 1.9
// https://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#FUNC-CALL
// - PPC64 ELFv2: "2.2 Function Calling Sequence" in 64-Bit ELF V2 ABI Specification: Power Architecture, Revision 1.5
// https://openpowerfoundation.org/specifications/64bitelfabi/
// - AIX:
// - Register usage and conventions
// https://www.ibm.com/docs/en/aix/7.3?topic=overview-register-usage-conventions
// - Special registers in the PowerPC®
// https://www.ibm.com/docs/en/aix/7.3?topic=overview-special-registers-in-powerpc
// - AIX vector programming
// https://www.ibm.com/docs/en/aix/7.3?topic=concepts-aix-vector-programming

// r0, r3-r12
r0,
r3, r4, r5, r6, r7,
Expand All @@ -1138,8 +1153,6 @@ impl InlineAsmClobberAbi {
f8, f9, f10, f11, f12, f13,

// v0-v19
// FIXME: PPC32 SysV ABI does not mention vector registers processing.
// https://refspecs.linuxfoundation.org/elf/elfspec_ppc.pdf
Comment on lines -1141 to -1142
Copy link
Member

@jieyouxu jieyouxu Nov 5, 2024

Choose a reason for hiding this comment

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

Suggestion: can you replace this with the link in the PR description? Can't hurt to have some useful links here :3 (unless this is already linked in the module)

Copy link
Member Author

@taiki-e taiki-e Nov 7, 2024

Choose a reason for hiding this comment

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

Added links (there are six links).

// Refs:
// - PPC32 SysV: "3.2. Function Calling Sequence" in Power Architecture® 32-bit Application Binary Interface Supplement 1.0 - Linux® & Embedded
// https://web.archive.org/web/20120608163804/https://www.power.org/resources/downloads/Power-Arch-32-bit-ABI-supp-1.0-Unified.pdf
// - PPC64 ELFv1: "3.2. Function Calling Sequence" in 64-bit PowerPC ELF Application Binary Interface Supplement 1.9
// https://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#FUNC-CALL
// - PPC64 ELFv2: "2.2 Function Calling Sequence" in 64-Bit ELF V2 ABI Specification: Power Architecture, Revision 1.5
// https://openpowerfoundation.org/specifications/64bitelfabi/
// - AIX:
// - Register usage and conventions
// https://www.ibm.com/docs/en/aix/7.3?topic=overview-register-usage-conventions
// - Special registers in the PowerPC®
// https://www.ibm.com/docs/en/aix/7.3?topic=overview-special-registers-in-powerpc
// - AIX vector programming
// https://www.ibm.com/docs/en/aix/7.3?topic=concepts-aix-vector-programming

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that's very nice, thank you!

v0, v1, v2, v3, v4, v5, v6, v7,
v8, v9, v10, v11, v12, v13, v14,
v15, v16, v17, v18, v19,
Expand Down
Loading