mirror of
https://github.com/ziglang/zig.git
synced 2025-02-02 12:11:56 +00:00
std.Target: Treat spirv as identical to spirv64 for ABI size/alignment 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.
This commit is contained in:
parent
231f322a65
commit
23b5a6c71e
@ -1875,11 +1875,10 @@ pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 {
|
||||
.sparc64,
|
||||
.s390x,
|
||||
.ve,
|
||||
.spirv,
|
||||
.spirv64,
|
||||
.loongarch64,
|
||||
=> 64,
|
||||
|
||||
.spirv => @panic("TODO what should this value be?"),
|
||||
};
|
||||
}
|
||||
|
||||
@ -2359,6 +2358,7 @@ pub fn c_type_alignment(target: Target, c_type: CType) u16 {
|
||||
.nvptx,
|
||||
.nvptx64,
|
||||
.s390x,
|
||||
.spirv,
|
||||
.spirv32,
|
||||
.spirv64,
|
||||
=> 8,
|
||||
@ -2380,8 +2380,6 @@ pub fn c_type_alignment(target: Target, c_type: CType) u16 {
|
||||
.wasm32,
|
||||
.wasm64,
|
||||
=> 16,
|
||||
|
||||
.spirv => @panic("TODO what should this value be?"),
|
||||
}),
|
||||
);
|
||||
}
|
||||
@ -2471,6 +2469,7 @@ pub fn c_type_preferred_alignment(target: Target, c_type: CType) u16 {
|
||||
.nvptx,
|
||||
.nvptx64,
|
||||
.s390x,
|
||||
.spirv,
|
||||
.spirv32,
|
||||
.spirv64,
|
||||
=> 8,
|
||||
@ -2492,8 +2491,6 @@ pub fn c_type_preferred_alignment(target: Target, c_type: CType) u16 {
|
||||
.wasm32,
|
||||
.wasm64,
|
||||
=> 16,
|
||||
|
||||
.spirv => @panic("TODO what should this value be?"),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user