Skip to content

Conversation

@alexrp
Copy link
Member

@alexrp alexrp commented Oct 20, 2025

With this, we have target info for all architectures currently supported by Linux (except nios2, but that's at death's door anyway).

@alexrp
Copy link
Member Author

alexrp commented Oct 20, 2025

@mlugg FYI ef5f413, e6ac67d :^)

You may also be delighted to know that PA-RISC has its own homegrown unwind info format like Arm.

@alexrp alexrp force-pushed the std-target-more-arches branch from ad038b3 to fa70110 Compare October 20, 2025 02:36
else => VaListPowerPc,
},
.s390x => VaListS390x,
.sh, .sheb => VaListSh, // TODO: This is wrong for `sh_renesas`.
Copy link
Member Author

Choose a reason for hiding this comment

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

@mlugg thoughts on this? GCC makes the definition of the type dependent on the enclosing function's calling convention, which seems clearly sensible to me. The idea that there is a single global VaList type is just kinda fundamentally flawed in a world where we support multiple calling conventions for one target.

I figure we could remove std.builtin.VaList and instead make Sema pick one of the more specific decls based on calling convention. It seems like moving that logic into the compiler will also let us get rid of a lot of special-casing we do around the resolution of VaList.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds like you're basically hitting #24692. I think what we wanted to do here was, yeah, have @cVaStart return a callconv-dependent type. Then, @cVaArg, @cVaCopy, and @cVaEnd could probably even become userland methods on the types; I would need to check some VA ABIs to check if that works, but I would assume that inline asm can represent all of those operations once you have the actual valist value? So in the best-case scenario, @cVaStart would be the only builtin we'd need.

@alexrp alexrp force-pushed the std-target-more-arches branch 3 times, most recently from 76f3e8d to 9b01f1d Compare October 21, 2025 04:11
@alexrp alexrp force-pushed the std-target-more-arches branch 5 times, most recently from b609bbc to ea14da0 Compare October 23, 2025 05:26
@alexrp alexrp force-pushed the std-target-more-arches branch from ea14da0 to 98bc5cc Compare October 23, 2025 07:27
@alexrp alexrp force-pushed the std-target-more-arches branch from 98bc5cc to 07d764d Compare October 23, 2025 17:34
@alexrp
Copy link
Member Author

alexrp commented Oct 23, 2025

Already passed CI and I just added a03b924 + 23b2990.

@alexrp alexrp merged commit 70206af into ziglang:master Oct 23, 2025
0 of 9 checks passed
@alexrp alexrp deleted the std-target-more-arches branch October 23, 2025 17:36
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