mirror of
https://github.com/ziglang/zig.git
synced 2024-11-14 16:13:24 +00:00
llvm: Update the list of address spaces for LLVM 19.
Mainly affects amdgcn.
This commit is contained in:
parent
53d7a7b3c0
commit
947b7195bf
@ -11853,7 +11853,7 @@ fn llvmAddrSpaceInfo(target: std.Target) []const AddrSpaceInfo {
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.x86.ptr64, .size = 64, .abi = 64, .force_in_data_layout = true },
|
||||
},
|
||||
.nvptx, .nvptx64 => &.{
|
||||
.{ .zig = .generic, .llvm = .default },
|
||||
.{ .zig = .generic, .llvm = Builder.AddrSpace.nvptx.generic },
|
||||
.{ .zig = .global, .llvm = Builder.AddrSpace.nvptx.global },
|
||||
.{ .zig = .constant, .llvm = Builder.AddrSpace.nvptx.constant },
|
||||
.{ .zig = .param, .llvm = Builder.AddrSpace.nvptx.param },
|
||||
@ -11870,9 +11870,27 @@ fn llvmAddrSpaceInfo(target: std.Target) []const AddrSpaceInfo {
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_32bit, .size = 32, .abi = 32 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.buffer_fat_pointer, .non_integral = true, .size = 160, .abi = 256, .idx = 32 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.buffer_resource, .non_integral = true, .size = 128, .abi = 128 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.buffer_strided_pointer, .non_integral = true, .size = 192, .abi = 256, .idx = 32 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_0 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_1 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_2 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_3 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_4 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_5 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_6 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_7 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_8 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_9 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_10 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_11 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_12 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_13 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_14 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.constant_buffer_15 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.amdgpu.streamout_register },
|
||||
},
|
||||
.avr => &.{
|
||||
.{ .zig = .generic, .llvm = .default, .abi = 8 },
|
||||
.{ .zig = .generic, .llvm = Builder.AddrSpace.avr.data, .abi = 8 },
|
||||
.{ .zig = .flash, .llvm = Builder.AddrSpace.avr.program, .abi = 8 },
|
||||
.{ .zig = .flash1, .llvm = Builder.AddrSpace.avr.program1, .abi = 8 },
|
||||
.{ .zig = .flash2, .llvm = Builder.AddrSpace.avr.program2, .abi = 8 },
|
||||
@ -11881,7 +11899,7 @@ fn llvmAddrSpaceInfo(target: std.Target) []const AddrSpaceInfo {
|
||||
.{ .zig = .flash5, .llvm = Builder.AddrSpace.avr.program5, .abi = 8 },
|
||||
},
|
||||
.wasm32, .wasm64 => &.{
|
||||
.{ .zig = .generic, .llvm = .default, .force_in_data_layout = true },
|
||||
.{ .zig = .generic, .llvm = Builder.AddrSpace.wasm.default, .force_in_data_layout = true },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.wasm.variable, .non_integral = true },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.wasm.externref, .non_integral = true, .size = 8, .abi = 8 },
|
||||
.{ .zig = null, .llvm = Builder.AddrSpace.wasm.funcref, .non_integral = true, .size = 8, .abi = 8 },
|
||||
|
@ -1932,6 +1932,7 @@ pub const AddrSpace = enum(u24) {
|
||||
pub const constant_32bit: AddrSpace = @enumFromInt(6);
|
||||
pub const buffer_fat_pointer: AddrSpace = @enumFromInt(7);
|
||||
pub const buffer_resource: AddrSpace = @enumFromInt(8);
|
||||
pub const buffer_strided_pointer: AddrSpace = @enumFromInt(9);
|
||||
pub const param_d: AddrSpace = @enumFromInt(6);
|
||||
pub const param_i: AddrSpace = @enumFromInt(7);
|
||||
pub const constant_buffer_0: AddrSpace = @enumFromInt(8);
|
||||
@ -1950,10 +1951,23 @@ pub const AddrSpace = enum(u24) {
|
||||
pub const constant_buffer_13: AddrSpace = @enumFromInt(21);
|
||||
pub const constant_buffer_14: AddrSpace = @enumFromInt(22);
|
||||
pub const constant_buffer_15: AddrSpace = @enumFromInt(23);
|
||||
pub const streamout_register: AddrSpace = @enumFromInt(128);
|
||||
};
|
||||
|
||||
pub const spirv = struct {
|
||||
pub const function: AddrSpace = @enumFromInt(0);
|
||||
pub const cross_workgroup: AddrSpace = @enumFromInt(1);
|
||||
pub const uniform_constant: AddrSpace = @enumFromInt(2);
|
||||
pub const workgroup: AddrSpace = @enumFromInt(3);
|
||||
pub const generic: AddrSpace = @enumFromInt(4);
|
||||
pub const device_only_intel: AddrSpace = @enumFromInt(5);
|
||||
pub const host_only_intel: AddrSpace = @enumFromInt(6);
|
||||
pub const input: AddrSpace = @enumFromInt(7);
|
||||
};
|
||||
|
||||
// See llvm/include/llvm/CodeGen/WasmAddressSpaces.h
|
||||
pub const wasm = struct {
|
||||
pub const default: AddrSpace = @enumFromInt(0);
|
||||
pub const variable: AddrSpace = @enumFromInt(1);
|
||||
pub const externref: AddrSpace = @enumFromInt(10);
|
||||
pub const funcref: AddrSpace = @enumFromInt(20);
|
||||
|
Loading…
Reference in New Issue
Block a user