-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
std.Target: add tags and info for alpha, hppa, microblaze, sh + some bonus commits
#25640
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
Conversation
ad038b3 to
fa70110
Compare
lib/std/builtin.zig
Outdated
| else => VaListPowerPc, | ||
| }, | ||
| .s390x => VaListS390x, | ||
| .sh, .sheb => VaListSh, // TODO: This is wrong for `sh_renesas`. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
76f3e8d to
9b01f1d
Compare
b609bbc to
ea14da0
Compare
The value being computed here is almost always equal to the pointer bit width.
These are microcontroller architectures; none of the OSs in the outer switch run on them.
This was forgotten during the refactoring of std.builtin.CallingConvention. It mirrors mips64_n32 for MIPS.
Supported by LLVM and CBE.
Only supported in CBE.
Only supported in CBE.
This type has nothing to do with the language.
Implemented according to glibc because I'm pretty sure musl gets it wrong.
Turns out Linux on PA-RISC does system calls in a pretty fascinating way; see arch/parisc/kernel/syscall.S for details.
ea14da0 to
98bc5cc
Compare
98bc5cc to
07d764d
Compare
With this, we have target info for all architectures currently supported by Linux (except nios2, but that's at death's door anyway).