std.Target: A bunch of C type size/alignment fixes#20960
Merged
andrewrk merged 14 commits intoziglang:masterfrom Aug 6, 2024
alexrp:size-align-fixes
Merged
std.Target: A bunch of C type size/alignment fixes#20960andrewrk merged 14 commits intoziglang:masterfrom alexrp:size-align-fixes
std.Target: A bunch of C type size/alignment fixes#20960andrewrk merged 14 commits intoziglang:masterfrom
alexrp:size-align-fixes
Conversation
The DXIL documentation claims 32-bit pointers: https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst#memory-accesses Despite this, Clang considers pointers 64-bit when targeting it.
CPU feature set has nothing to do with ABI choice; the pointer bit width is determined only by looking at the choice of sparc vs sparc64.
This value was correct for the old SPIR, but not for SPIR-V.
This value was correct for the old SPIR, but not for SPIR-V.
…t purposes. This is arbitrary since spirv (as opposed to spirv32/spirv64) refers to the version with logical memory layout, i.e. no 'real' pointers. This change at least matches what clang does.
Member
Author
Member
Author
|
By the way, the methodology here was just: |
Snektron
reviewed
Aug 6, 2024
Snektron
approved these changes
Aug 6, 2024
This was referenced Aug 8, 2024
andrewrk
added a commit
that referenced
this pull request
Aug 12, 2024
Follow-up on `std.Target` GPU changes in #20960
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a bunch of issues uncovered with the help of #20951.
short,long long, anddoublellvm/llvm-project#102172.m68k-linux-gnuare different from the ones that GCC does; in particular, Clang defaults to-malign-intwhile GCC does not. We'll stick with the Clang default for now, but this makes us incompatible with at least the Debian m68k port, which is fairly problematic since AFAIK that's the only active m68k Linux distro. (Obligatory plug for RFC/Proposal: Turning Zig target triples into quadruples #20690.)spir/spir64removal instd.Target: Remove more dead OS/architecture tags #20870 was too hasty. These tags are actually still used in target triples likespir-unknown-unknownwhich means to target the OpenCL SPIR environment and emit SPIR-V bytecode (no, not SPIR bytecode). This of course means that they really represent an environment/ABI now, not real "architectures". So the sensible thing to do is to reintroducespiras anAbitag that can be used asspirv[32,64]-opencl-spir. I'll do this in a follow-up PR.