| author | |
| committer | |
| log | 3054486d1dedd49553680da2c074d1ab413797fd |
| tree | 79c3d4e9b417d14ddb11a47e26da083d5e06e8aa |
| parent | 2f003f39b28176f08de51271eb66b5f3a54c7aae |
| parent | e4e3d7ab4140ae6f078d3ffd72fce4c0a5e6e59f |
| signature |
Some follow-up work for #2169725 files changed, 3148 insertions(+), 3062 deletions(-)
CMakeLists.txt+1-1| ... | ... | @@ -376,7 +376,7 @@ set(ZIG_STAGE2_SOURCES |
| 376 | 376 | lib/std/Target.zig |
| 377 | 377 | lib/std/Target/Query.zig |
| 378 | 378 | lib/std/Target/aarch64.zig |
| 379 | lib/std/Target/amdgpu.zig | |
| 379 | lib/std/Target/amdgcn.zig | |
| 380 | 380 | lib/std/Target/arm.zig |
| 381 | 381 | lib/std/Target/avr.zig |
| 382 | 382 | lib/std/Target/bpf.zig |
lib/compiler_rt/atomics.zig+1-1| ... | ... | @@ -42,7 +42,7 @@ const largest_atomic_size = switch (arch) { |
| 42 | 42 | // Objects smaller than this threshold are implemented in terms of compare-exchange |
| 43 | 43 | // of a larger value. |
| 44 | 44 | const smallest_atomic_fetch_exch_size = switch (arch) { |
| 45 | // On AMDGPU, there are no instructions for atomic operations other than load and store | |
| 45 | // On AMDGCN, there are no instructions for atomic operations other than load and store | |
| 46 | 46 | // (as of LLVM 15), and so these need to be implemented in terms of atomic CAS. |
| 47 | 47 | .amdgcn => @sizeOf(u32), |
| 48 | 48 | else => @sizeOf(u8), |
lib/std/Target.zig+6-6| ... | ... | @@ -719,7 +719,7 @@ pub const Os = struct { |
| 719 | 719 | |
| 720 | 720 | pub const aarch64 = @import("Target/aarch64.zig"); |
| 721 | 721 | pub const arc = @import("Target/arc.zig"); |
| 722 | pub const amdgpu = @import("Target/amdgpu.zig"); | |
| 722 | pub const amdgcn = @import("Target/amdgcn.zig"); | |
| 723 | 723 | pub const arm = @import("Target/arm.zig"); |
| 724 | 724 | pub const avr = @import("Target/avr.zig"); |
| 725 | 725 | pub const bpf = @import("Target/bpf.zig"); |
| ... | ... | @@ -1592,7 +1592,6 @@ pub const Cpu = struct { |
| 1592 | 1592 | .loongarch32, .loongarch64 => "loongarch", |
| 1593 | 1593 | .mips, .mipsel, .mips64, .mips64el => "mips", |
| 1594 | 1594 | .powerpc, .powerpcle, .powerpc64, .powerpc64le => "powerpc", |
| 1595 | .amdgcn => "amdgpu", | |
| 1596 | 1595 | .riscv32, .riscv64 => "riscv", |
| 1597 | 1596 | .sparc, .sparc64 => "sparc", |
| 1598 | 1597 | .s390x => "s390x", |
| ... | ... | @@ -1621,7 +1620,7 @@ pub const Cpu = struct { |
| 1621 | 1620 | .mips, .mipsel, .mips64, .mips64el => &mips.all_features, |
| 1622 | 1621 | .msp430 => &msp430.all_features, |
| 1623 | 1622 | .powerpc, .powerpcle, .powerpc64, .powerpc64le => &powerpc.all_features, |
| 1624 | .amdgcn => &amdgpu.all_features, | |
| 1623 | .amdgcn => &amdgcn.all_features, | |
| 1625 | 1624 | .riscv32, .riscv64 => &riscv.all_features, |
| 1626 | 1625 | .sparc, .sparc64 => &sparc.all_features, |
| 1627 | 1626 | .spirv, .spirv32, .spirv64 => &spirv.all_features, |
| ... | ... | @@ -1653,7 +1652,7 @@ pub const Cpu = struct { |
| 1653 | 1652 | .mips, .mipsel, .mips64, .mips64el => comptime allCpusFromDecls(mips.cpu), |
| 1654 | 1653 | .msp430 => comptime allCpusFromDecls(msp430.cpu), |
| 1655 | 1654 | .powerpc, .powerpcle, .powerpc64, .powerpc64le => comptime allCpusFromDecls(powerpc.cpu), |
| 1656 | .amdgcn => comptime allCpusFromDecls(amdgpu.cpu), | |
| 1655 | .amdgcn => comptime allCpusFromDecls(amdgcn.cpu), | |
| 1657 | 1656 | .riscv32, .riscv64 => comptime allCpusFromDecls(riscv.cpu), |
| 1658 | 1657 | .sparc, .sparc64 => comptime allCpusFromDecls(sparc.cpu), |
| 1659 | 1658 | .spirv, .spirv32, .spirv64 => comptime allCpusFromDecls(spirv.cpu), |
| ... | ... | @@ -1891,7 +1890,7 @@ pub const Cpu = struct { |
| 1891 | 1890 | }; |
| 1892 | 1891 | }; |
| 1893 | 1892 | return switch (arch) { |
| 1894 | .amdgcn => &amdgpu.cpu.gfx600, | |
| 1893 | .amdgcn => &amdgcn.cpu.gfx600, | |
| 1895 | 1894 | .arc => &arc.cpu.generic, |
| 1896 | 1895 | .arm, .armeb, .thumb, .thumbeb => &arm.cpu.generic, |
| 1897 | 1896 | .aarch64, .aarch64_be => &aarch64.cpu.generic, |
| ... | ... | @@ -1940,7 +1939,7 @@ pub const Cpu = struct { |
| 1940 | 1939 | /// `Os.Tag.freestanding`. |
| 1941 | 1940 | pub fn baseline(arch: Arch, os: Os) *const Model { |
| 1942 | 1941 | return switch (arch) { |
| 1943 | .amdgcn => &amdgpu.cpu.gfx906, | |
| 1942 | .amdgcn => &amdgcn.cpu.gfx906, | |
| 1944 | 1943 | .arm, .armeb, .thumb, .thumbeb => &arm.cpu.baseline, |
| 1945 | 1944 | .aarch64 => switch (os.tag) { |
| 1946 | 1945 | .bridgeos, .driverkit, .macos => &aarch64.cpu.apple_m1, |
| ... | ... | @@ -3308,6 +3307,7 @@ pub fn cCallingConvention(target: Target) ?std.builtin.CallingConvention { |
| 3308 | 3307 | }, |
| 3309 | 3308 | .arm, .armeb, .thumb, .thumbeb => switch (target.os.tag) { |
| 3310 | 3309 | .netbsd => .{ .arm_apcs = .{} }, |
| 3310 | .watchos => .{ .arm_aapcs16_vfp = .{} }, | |
| 3311 | 3311 | else => switch (target.abi.floatAbi()) { |
| 3312 | 3312 | .soft => .{ .arm_aapcs = .{} }, |
| 3313 | 3313 | .hard => .{ .arm_aapcs_vfp = .{} }, |
lib/std/Target/amdgcn.zig created+2728| ... | ... | @@ -0,0 +1,2728 @@ |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 3 | const std = @import("../std.zig"); | |
| 4 | const CpuFeature = std.Target.Cpu.Feature; | |
| 5 | const CpuModel = std.Target.Cpu.Model; | |
| 6 | ||
| 7 | pub const Feature = enum { | |
| 8 | @"16_bit_insts", | |
| 9 | a16, | |
| 10 | add_no_carry_insts, | |
| 11 | agent_scope_fine_grained_remote_memory_atomics, | |
| 12 | allocate1_5xvgprs, | |
| 13 | aperture_regs, | |
| 14 | architected_flat_scratch, | |
| 15 | architected_sgprs, | |
| 16 | atomic_buffer_global_pk_add_f16_insts, | |
| 17 | atomic_buffer_global_pk_add_f16_no_rtn_insts, | |
| 18 | atomic_buffer_pk_add_bf16_inst, | |
| 19 | atomic_csub_no_rtn_insts, | |
| 20 | atomic_ds_pk_add_16_insts, | |
| 21 | atomic_fadd_no_rtn_insts, | |
| 22 | atomic_fadd_rtn_insts, | |
| 23 | atomic_flat_pk_add_16_insts, | |
| 24 | atomic_fmin_fmax_flat_f32, | |
| 25 | atomic_fmin_fmax_flat_f64, | |
| 26 | atomic_fmin_fmax_global_f32, | |
| 27 | atomic_fmin_fmax_global_f64, | |
| 28 | atomic_global_pk_add_bf16_inst, | |
| 29 | auto_waitcnt_before_barrier, | |
| 30 | back_off_barrier, | |
| 31 | ci_insts, | |
| 32 | cumode, | |
| 33 | default_component_broadcast, | |
| 34 | default_component_zero, | |
| 35 | dl_insts, | |
| 36 | dot10_insts, | |
| 37 | dot11_insts, | |
| 38 | dot1_insts, | |
| 39 | dot2_insts, | |
| 40 | dot3_insts, | |
| 41 | dot4_insts, | |
| 42 | dot5_insts, | |
| 43 | dot6_insts, | |
| 44 | dot7_insts, | |
| 45 | dot8_insts, | |
| 46 | dot9_insts, | |
| 47 | dpp, | |
| 48 | dpp8, | |
| 49 | dpp_64bit, | |
| 50 | dpp_src1_sgpr, | |
| 51 | ds128, | |
| 52 | ds_src2_insts, | |
| 53 | extended_image_insts, | |
| 54 | fast_denormal_f32, | |
| 55 | fast_fmaf, | |
| 56 | flat_address_space, | |
| 57 | flat_atomic_fadd_f32_inst, | |
| 58 | flat_buffer_global_fadd_f64_inst, | |
| 59 | flat_for_global, | |
| 60 | flat_global_insts, | |
| 61 | flat_inst_offsets, | |
| 62 | flat_scratch, | |
| 63 | flat_scratch_insts, | |
| 64 | flat_segment_offset_bug, | |
| 65 | fma_mix_insts, | |
| 66 | fmacf64_inst, | |
| 67 | fmaf, | |
| 68 | force_store_sc0_sc1, | |
| 69 | fp64, | |
| 70 | fp8_conversion_insts, | |
| 71 | fp8_insts, | |
| 72 | full_rate_64_ops, | |
| 73 | g16, | |
| 74 | gcn3_encoding, | |
| 75 | gds, | |
| 76 | get_wave_id_inst, | |
| 77 | gfx10, | |
| 78 | gfx10_3_insts, | |
| 79 | gfx10_a_encoding, | |
| 80 | gfx10_b_encoding, | |
| 81 | gfx10_insts, | |
| 82 | gfx11, | |
| 83 | gfx11_insts, | |
| 84 | gfx12, | |
| 85 | gfx12_insts, | |
| 86 | gfx7_gfx8_gfx9_insts, | |
| 87 | gfx8_insts, | |
| 88 | gfx9, | |
| 89 | gfx90a_insts, | |
| 90 | gfx940_insts, | |
| 91 | gfx9_insts, | |
| 92 | gws, | |
| 93 | half_rate_64_ops, | |
| 94 | image_gather4_d16_bug, | |
| 95 | image_insts, | |
| 96 | image_store_d16_bug, | |
| 97 | inst_fwd_prefetch_bug, | |
| 98 | int_clamp_insts, | |
| 99 | inv_2pi_inline_imm, | |
| 100 | kernarg_preload, | |
| 101 | lds_branch_vmem_war_hazard, | |
| 102 | lds_misaligned_bug, | |
| 103 | ldsbankcount16, | |
| 104 | ldsbankcount32, | |
| 105 | load_store_opt, | |
| 106 | localmemorysize32768, | |
| 107 | localmemorysize65536, | |
| 108 | mad_intra_fwd_bug, | |
| 109 | mad_mac_f32_insts, | |
| 110 | mad_mix_insts, | |
| 111 | mai_insts, | |
| 112 | max_hard_clause_length_32, | |
| 113 | max_hard_clause_length_63, | |
| 114 | max_private_element_size_16, | |
| 115 | max_private_element_size_4, | |
| 116 | max_private_element_size_8, | |
| 117 | memory_atomic_fadd_f32_denormal_support, | |
| 118 | mfma_inline_literal_bug, | |
| 119 | mimg_r128, | |
| 120 | movrel, | |
| 121 | msaa_load_dst_sel_bug, | |
| 122 | negative_scratch_offset_bug, | |
| 123 | negative_unaligned_scratch_offset_bug, | |
| 124 | no_data_dep_hazard, | |
| 125 | no_sdst_cmpx, | |
| 126 | nsa_clause_bug, | |
| 127 | nsa_encoding, | |
| 128 | nsa_to_vmem_bug, | |
| 129 | offset_3f_bug, | |
| 130 | packed_fp32_ops, | |
| 131 | packed_tid, | |
| 132 | partial_nsa_encoding, | |
| 133 | pk_fmac_f16_inst, | |
| 134 | precise_memory, | |
| 135 | priv_enabled_trap2_nop_bug, | |
| 136 | promote_alloca, | |
| 137 | prt_strict_null, | |
| 138 | pseudo_scalar_trans, | |
| 139 | r128_a16, | |
| 140 | real_true16, | |
| 141 | required_export_priority, | |
| 142 | requires_cov6, | |
| 143 | restricted_soffset, | |
| 144 | s_memrealtime, | |
| 145 | s_memtime_inst, | |
| 146 | salu_float, | |
| 147 | scalar_atomics, | |
| 148 | scalar_dwordx3_loads, | |
| 149 | scalar_flat_scratch_insts, | |
| 150 | scalar_stores, | |
| 151 | sdwa, | |
| 152 | sdwa_mav, | |
| 153 | sdwa_omod, | |
| 154 | sdwa_out_mods_vopc, | |
| 155 | sdwa_scalar, | |
| 156 | sdwa_sdst, | |
| 157 | sea_islands, | |
| 158 | sgpr_init_bug, | |
| 159 | shader_cycles_hi_lo_registers, | |
| 160 | shader_cycles_register, | |
| 161 | si_scheduler, | |
| 162 | smem_to_vector_write_hazard, | |
| 163 | southern_islands, | |
| 164 | sramecc, | |
| 165 | sramecc_support, | |
| 166 | tgsplit, | |
| 167 | trap_handler, | |
| 168 | trig_reduced_range, | |
| 169 | true16, | |
| 170 | unaligned_access_mode, | |
| 171 | unaligned_buffer_access, | |
| 172 | unaligned_ds_access, | |
| 173 | unaligned_scratch_access, | |
| 174 | unpacked_d16_vmem, | |
| 175 | unsafe_ds_offset_folding, | |
| 176 | user_sgpr_init16_bug, | |
| 177 | valu_trans_use_hazard, | |
| 178 | vcmpx_exec_war_hazard, | |
| 179 | vcmpx_permlane_hazard, | |
| 180 | vgpr_index_mode, | |
| 181 | vgpr_singleuse_hint, | |
| 182 | vmem_to_scalar_write_hazard, | |
| 183 | vmem_write_vgpr_in_order, | |
| 184 | volcanic_islands, | |
| 185 | vop3_literal, | |
| 186 | vop3p, | |
| 187 | vopd, | |
| 188 | vscnt, | |
| 189 | wavefrontsize16, | |
| 190 | wavefrontsize32, | |
| 191 | wavefrontsize64, | |
| 192 | xnack, | |
| 193 | xnack_support, | |
| 194 | }; | |
| 195 | ||
| 196 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; | |
| 197 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; | |
| 198 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; | |
| 199 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; | |
| 200 | ||
| 201 | pub const all_features = blk: { | |
| 202 | const len = @typeInfo(Feature).@"enum".fields.len; | |
| 203 | std.debug.assert(len <= CpuFeature.Set.needed_bit_count); | |
| 204 | var result: [len]CpuFeature = undefined; | |
| 205 | result[@intFromEnum(Feature.@"16_bit_insts")] = .{ | |
| 206 | .llvm_name = "16-bit-insts", | |
| 207 | .description = "Has i16/f16 instructions", | |
| 208 | .dependencies = featureSet(&[_]Feature{}), | |
| 209 | }; | |
| 210 | result[@intFromEnum(Feature.a16)] = .{ | |
| 211 | .llvm_name = "a16", | |
| 212 | .description = "Support A16 for 16-bit coordinates/gradients/lod/clamp/mip image operands", | |
| 213 | .dependencies = featureSet(&[_]Feature{}), | |
| 214 | }; | |
| 215 | result[@intFromEnum(Feature.add_no_carry_insts)] = .{ | |
| 216 | .llvm_name = "add-no-carry-insts", | |
| 217 | .description = "Have VALU add/sub instructions without carry out", | |
| 218 | .dependencies = featureSet(&[_]Feature{}), | |
| 219 | }; | |
| 220 | result[@intFromEnum(Feature.agent_scope_fine_grained_remote_memory_atomics)] = .{ | |
| 221 | .llvm_name = "agent-scope-fine-grained-remote-memory-atomics", | |
| 222 | .description = "Agent (device) scoped atomic operations, excluding those directly supported by PCIe (i.e. integer atomic add, exchange, and compare-and-swap), are functional for allocations in host or peer device memory.", | |
| 223 | .dependencies = featureSet(&[_]Feature{}), | |
| 224 | }; | |
| 225 | result[@intFromEnum(Feature.allocate1_5xvgprs)] = .{ | |
| 226 | .llvm_name = "allocate1_5xvgprs", | |
| 227 | .description = "Has 50% more physical VGPRs and 50% larger allocation granule", | |
| 228 | .dependencies = featureSet(&[_]Feature{}), | |
| 229 | }; | |
| 230 | result[@intFromEnum(Feature.aperture_regs)] = .{ | |
| 231 | .llvm_name = "aperture-regs", | |
| 232 | .description = "Has Memory Aperture Base and Size Registers", | |
| 233 | .dependencies = featureSet(&[_]Feature{}), | |
| 234 | }; | |
| 235 | result[@intFromEnum(Feature.architected_flat_scratch)] = .{ | |
| 236 | .llvm_name = "architected-flat-scratch", | |
| 237 | .description = "Flat Scratch register is a readonly SPI initialized architected register", | |
| 238 | .dependencies = featureSet(&[_]Feature{}), | |
| 239 | }; | |
| 240 | result[@intFromEnum(Feature.architected_sgprs)] = .{ | |
| 241 | .llvm_name = "architected-sgprs", | |
| 242 | .description = "Enable the architected SGPRs", | |
| 243 | .dependencies = featureSet(&[_]Feature{}), | |
| 244 | }; | |
| 245 | result[@intFromEnum(Feature.atomic_buffer_global_pk_add_f16_insts)] = .{ | |
| 246 | .llvm_name = "atomic-buffer-global-pk-add-f16-insts", | |
| 247 | .description = "Has buffer_atomic_pk_add_f16 and global_atomic_pk_add_f16 instructions that can return original value", | |
| 248 | .dependencies = featureSet(&[_]Feature{ | |
| 249 | .flat_global_insts, | |
| 250 | }), | |
| 251 | }; | |
| 252 | result[@intFromEnum(Feature.atomic_buffer_global_pk_add_f16_no_rtn_insts)] = .{ | |
| 253 | .llvm_name = "atomic-buffer-global-pk-add-f16-no-rtn-insts", | |
| 254 | .description = "Has buffer_atomic_pk_add_f16 and global_atomic_pk_add_f16 instructions that don't return original value", | |
| 255 | .dependencies = featureSet(&[_]Feature{ | |
| 256 | .flat_global_insts, | |
| 257 | }), | |
| 258 | }; | |
| 259 | result[@intFromEnum(Feature.atomic_buffer_pk_add_bf16_inst)] = .{ | |
| 260 | .llvm_name = "atomic-buffer-pk-add-bf16-inst", | |
| 261 | .description = "Has buffer_atomic_pk_add_bf16 instruction", | |
| 262 | .dependencies = featureSet(&[_]Feature{}), | |
| 263 | }; | |
| 264 | result[@intFromEnum(Feature.atomic_csub_no_rtn_insts)] = .{ | |
| 265 | .llvm_name = "atomic-csub-no-rtn-insts", | |
| 266 | .description = "Has buffer_atomic_csub and global_atomic_csub instructions that don't return original value", | |
| 267 | .dependencies = featureSet(&[_]Feature{}), | |
| 268 | }; | |
| 269 | result[@intFromEnum(Feature.atomic_ds_pk_add_16_insts)] = .{ | |
| 270 | .llvm_name = "atomic-ds-pk-add-16-insts", | |
| 271 | .description = "Has ds_pk_add_bf16, ds_pk_add_f16, ds_pk_add_rtn_bf16, ds_pk_add_rtn_f16 instructions", | |
| 272 | .dependencies = featureSet(&[_]Feature{}), | |
| 273 | }; | |
| 274 | result[@intFromEnum(Feature.atomic_fadd_no_rtn_insts)] = .{ | |
| 275 | .llvm_name = "atomic-fadd-no-rtn-insts", | |
| 276 | .description = "Has buffer_atomic_add_f32 and global_atomic_add_f32 instructions that don't return original value", | |
| 277 | .dependencies = featureSet(&[_]Feature{ | |
| 278 | .flat_global_insts, | |
| 279 | }), | |
| 280 | }; | |
| 281 | result[@intFromEnum(Feature.atomic_fadd_rtn_insts)] = .{ | |
| 282 | .llvm_name = "atomic-fadd-rtn-insts", | |
| 283 | .description = "Has buffer_atomic_add_f32 and global_atomic_add_f32 instructions that return original value", | |
| 284 | .dependencies = featureSet(&[_]Feature{ | |
| 285 | .flat_global_insts, | |
| 286 | }), | |
| 287 | }; | |
| 288 | result[@intFromEnum(Feature.atomic_flat_pk_add_16_insts)] = .{ | |
| 289 | .llvm_name = "atomic-flat-pk-add-16-insts", | |
| 290 | .description = "Has flat_atomic_pk_add_f16 and flat_atomic_pk_add_bf16 instructions", | |
| 291 | .dependencies = featureSet(&[_]Feature{}), | |
| 292 | }; | |
| 293 | result[@intFromEnum(Feature.atomic_fmin_fmax_flat_f32)] = .{ | |
| 294 | .llvm_name = "atomic-fmin-fmax-flat-f32", | |
| 295 | .description = "Has flat memory instructions for atomicrmw fmin/fmax for float", | |
| 296 | .dependencies = featureSet(&[_]Feature{}), | |
| 297 | }; | |
| 298 | result[@intFromEnum(Feature.atomic_fmin_fmax_flat_f64)] = .{ | |
| 299 | .llvm_name = "atomic-fmin-fmax-flat-f64", | |
| 300 | .description = "Has flat memory instructions for atomicrmw fmin/fmax for double", | |
| 301 | .dependencies = featureSet(&[_]Feature{}), | |
| 302 | }; | |
| 303 | result[@intFromEnum(Feature.atomic_fmin_fmax_global_f32)] = .{ | |
| 304 | .llvm_name = "atomic-fmin-fmax-global-f32", | |
| 305 | .description = "Has global/buffer instructions for atomicrmw fmin/fmax for float", | |
| 306 | .dependencies = featureSet(&[_]Feature{}), | |
| 307 | }; | |
| 308 | result[@intFromEnum(Feature.atomic_fmin_fmax_global_f64)] = .{ | |
| 309 | .llvm_name = "atomic-fmin-fmax-global-f64", | |
| 310 | .description = "Has global/buffer instructions for atomicrmw fmin/fmax for float", | |
| 311 | .dependencies = featureSet(&[_]Feature{}), | |
| 312 | }; | |
| 313 | result[@intFromEnum(Feature.atomic_global_pk_add_bf16_inst)] = .{ | |
| 314 | .llvm_name = "atomic-global-pk-add-bf16-inst", | |
| 315 | .description = "Has global_atomic_pk_add_bf16 instruction", | |
| 316 | .dependencies = featureSet(&[_]Feature{ | |
| 317 | .flat_global_insts, | |
| 318 | }), | |
| 319 | }; | |
| 320 | result[@intFromEnum(Feature.auto_waitcnt_before_barrier)] = .{ | |
| 321 | .llvm_name = "auto-waitcnt-before-barrier", | |
| 322 | .description = "Hardware automatically inserts waitcnt before barrier", | |
| 323 | .dependencies = featureSet(&[_]Feature{}), | |
| 324 | }; | |
| 325 | result[@intFromEnum(Feature.back_off_barrier)] = .{ | |
| 326 | .llvm_name = "back-off-barrier", | |
| 327 | .description = "Hardware supports backing off s_barrier if an exception occurs", | |
| 328 | .dependencies = featureSet(&[_]Feature{}), | |
| 329 | }; | |
| 330 | result[@intFromEnum(Feature.ci_insts)] = .{ | |
| 331 | .llvm_name = "ci-insts", | |
| 332 | .description = "Additional instructions for CI+", | |
| 333 | .dependencies = featureSet(&[_]Feature{}), | |
| 334 | }; | |
| 335 | result[@intFromEnum(Feature.cumode)] = .{ | |
| 336 | .llvm_name = "cumode", | |
| 337 | .description = "Enable CU wavefront execution mode", | |
| 338 | .dependencies = featureSet(&[_]Feature{}), | |
| 339 | }; | |
| 340 | result[@intFromEnum(Feature.default_component_broadcast)] = .{ | |
| 341 | .llvm_name = "default-component-broadcast", | |
| 342 | .description = "BUFFER/IMAGE store instructions set unspecified components to x component (GFX12)", | |
| 343 | .dependencies = featureSet(&[_]Feature{}), | |
| 344 | }; | |
| 345 | result[@intFromEnum(Feature.default_component_zero)] = .{ | |
| 346 | .llvm_name = "default-component-zero", | |
| 347 | .description = "BUFFER/IMAGE store instructions set unspecified components to zero (before GFX12)", | |
| 348 | .dependencies = featureSet(&[_]Feature{}), | |
| 349 | }; | |
| 350 | result[@intFromEnum(Feature.dl_insts)] = .{ | |
| 351 | .llvm_name = "dl-insts", | |
| 352 | .description = "Has v_fmac_f32 and v_xnor_b32 instructions", | |
| 353 | .dependencies = featureSet(&[_]Feature{}), | |
| 354 | }; | |
| 355 | result[@intFromEnum(Feature.dot10_insts)] = .{ | |
| 356 | .llvm_name = "dot10-insts", | |
| 357 | .description = "Has v_dot2_f32_f16 instruction", | |
| 358 | .dependencies = featureSet(&[_]Feature{}), | |
| 359 | }; | |
| 360 | result[@intFromEnum(Feature.dot11_insts)] = .{ | |
| 361 | .llvm_name = "dot11-insts", | |
| 362 | .description = "Has v_dot4_f32_fp8_fp8, v_dot4_f32_fp8_bf8, v_dot4_f32_bf8_fp8, v_dot4_f32_bf8_bf8 instructions", | |
| 363 | .dependencies = featureSet(&[_]Feature{}), | |
| 364 | }; | |
| 365 | result[@intFromEnum(Feature.dot1_insts)] = .{ | |
| 366 | .llvm_name = "dot1-insts", | |
| 367 | .description = "Has v_dot4_i32_i8 and v_dot8_i32_i4 instructions", | |
| 368 | .dependencies = featureSet(&[_]Feature{}), | |
| 369 | }; | |
| 370 | result[@intFromEnum(Feature.dot2_insts)] = .{ | |
| 371 | .llvm_name = "dot2-insts", | |
| 372 | .description = "Has v_dot2_i32_i16, v_dot2_u32_u16 instructions", | |
| 373 | .dependencies = featureSet(&[_]Feature{}), | |
| 374 | }; | |
| 375 | result[@intFromEnum(Feature.dot3_insts)] = .{ | |
| 376 | .llvm_name = "dot3-insts", | |
| 377 | .description = "Has v_dot8c_i32_i4 instruction", | |
| 378 | .dependencies = featureSet(&[_]Feature{}), | |
| 379 | }; | |
| 380 | result[@intFromEnum(Feature.dot4_insts)] = .{ | |
| 381 | .llvm_name = "dot4-insts", | |
| 382 | .description = "Has v_dot2c_i32_i16 instruction", | |
| 383 | .dependencies = featureSet(&[_]Feature{}), | |
| 384 | }; | |
| 385 | result[@intFromEnum(Feature.dot5_insts)] = .{ | |
| 386 | .llvm_name = "dot5-insts", | |
| 387 | .description = "Has v_dot2c_f32_f16 instruction", | |
| 388 | .dependencies = featureSet(&[_]Feature{}), | |
| 389 | }; | |
| 390 | result[@intFromEnum(Feature.dot6_insts)] = .{ | |
| 391 | .llvm_name = "dot6-insts", | |
| 392 | .description = "Has v_dot4c_i32_i8 instruction", | |
| 393 | .dependencies = featureSet(&[_]Feature{}), | |
| 394 | }; | |
| 395 | result[@intFromEnum(Feature.dot7_insts)] = .{ | |
| 396 | .llvm_name = "dot7-insts", | |
| 397 | .description = "Has v_dot4_u32_u8, v_dot8_u32_u4 instructions", | |
| 398 | .dependencies = featureSet(&[_]Feature{}), | |
| 399 | }; | |
| 400 | result[@intFromEnum(Feature.dot8_insts)] = .{ | |
| 401 | .llvm_name = "dot8-insts", | |
| 402 | .description = "Has v_dot4_i32_iu8, v_dot8_i32_iu4 instructions", | |
| 403 | .dependencies = featureSet(&[_]Feature{}), | |
| 404 | }; | |
| 405 | result[@intFromEnum(Feature.dot9_insts)] = .{ | |
| 406 | .llvm_name = "dot9-insts", | |
| 407 | .description = "Has v_dot2_f16_f16, v_dot2_bf16_bf16, v_dot2_f32_bf16 instructions", | |
| 408 | .dependencies = featureSet(&[_]Feature{}), | |
| 409 | }; | |
| 410 | result[@intFromEnum(Feature.dpp)] = .{ | |
| 411 | .llvm_name = "dpp", | |
| 412 | .description = "Support DPP (Data Parallel Primitives) extension", | |
| 413 | .dependencies = featureSet(&[_]Feature{}), | |
| 414 | }; | |
| 415 | result[@intFromEnum(Feature.dpp8)] = .{ | |
| 416 | .llvm_name = "dpp8", | |
| 417 | .description = "Support DPP8 (Data Parallel Primitives) extension", | |
| 418 | .dependencies = featureSet(&[_]Feature{}), | |
| 419 | }; | |
| 420 | result[@intFromEnum(Feature.dpp_64bit)] = .{ | |
| 421 | .llvm_name = "dpp-64bit", | |
| 422 | .description = "Support DPP (Data Parallel Primitives) extension in DP ALU", | |
| 423 | .dependencies = featureSet(&[_]Feature{}), | |
| 424 | }; | |
| 425 | result[@intFromEnum(Feature.dpp_src1_sgpr)] = .{ | |
| 426 | .llvm_name = "dpp-src1-sgpr", | |
| 427 | .description = "Support SGPR for Src1 of DPP instructions", | |
| 428 | .dependencies = featureSet(&[_]Feature{}), | |
| 429 | }; | |
| 430 | result[@intFromEnum(Feature.ds128)] = .{ | |
| 431 | .llvm_name = "enable-ds128", | |
| 432 | .description = "Use ds_{read|write}_b128", | |
| 433 | .dependencies = featureSet(&[_]Feature{}), | |
| 434 | }; | |
| 435 | result[@intFromEnum(Feature.ds_src2_insts)] = .{ | |
| 436 | .llvm_name = "ds-src2-insts", | |
| 437 | .description = "Has ds_*_src2 instructions", | |
| 438 | .dependencies = featureSet(&[_]Feature{}), | |
| 439 | }; | |
| 440 | result[@intFromEnum(Feature.extended_image_insts)] = .{ | |
| 441 | .llvm_name = "extended-image-insts", | |
| 442 | .description = "Support mips != 0, lod != 0, gather4, and get_lod", | |
| 443 | .dependencies = featureSet(&[_]Feature{}), | |
| 444 | }; | |
| 445 | result[@intFromEnum(Feature.fast_denormal_f32)] = .{ | |
| 446 | .llvm_name = "fast-denormal-f32", | |
| 447 | .description = "Enabling denormals does not cause f32 instructions to run at f64 rates", | |
| 448 | .dependencies = featureSet(&[_]Feature{}), | |
| 449 | }; | |
| 450 | result[@intFromEnum(Feature.fast_fmaf)] = .{ | |
| 451 | .llvm_name = "fast-fmaf", | |
| 452 | .description = "Assuming f32 fma is at least as fast as mul + add", | |
| 453 | .dependencies = featureSet(&[_]Feature{}), | |
| 454 | }; | |
| 455 | result[@intFromEnum(Feature.flat_address_space)] = .{ | |
| 456 | .llvm_name = "flat-address-space", | |
| 457 | .description = "Support flat address space", | |
| 458 | .dependencies = featureSet(&[_]Feature{}), | |
| 459 | }; | |
| 460 | result[@intFromEnum(Feature.flat_atomic_fadd_f32_inst)] = .{ | |
| 461 | .llvm_name = "flat-atomic-fadd-f32-inst", | |
| 462 | .description = "Has flat_atomic_add_f32 instruction", | |
| 463 | .dependencies = featureSet(&[_]Feature{}), | |
| 464 | }; | |
| 465 | result[@intFromEnum(Feature.flat_buffer_global_fadd_f64_inst)] = .{ | |
| 466 | .llvm_name = "flat-buffer-global-fadd-f64-inst", | |
| 467 | .description = "Has flat, buffer, and global instructions for f64 atomic fadd", | |
| 468 | .dependencies = featureSet(&[_]Feature{}), | |
| 469 | }; | |
| 470 | result[@intFromEnum(Feature.flat_for_global)] = .{ | |
| 471 | .llvm_name = "flat-for-global", | |
| 472 | .description = "Force to generate flat instruction for global", | |
| 473 | .dependencies = featureSet(&[_]Feature{}), | |
| 474 | }; | |
| 475 | result[@intFromEnum(Feature.flat_global_insts)] = .{ | |
| 476 | .llvm_name = "flat-global-insts", | |
| 477 | .description = "Have global_* flat memory instructions", | |
| 478 | .dependencies = featureSet(&[_]Feature{}), | |
| 479 | }; | |
| 480 | result[@intFromEnum(Feature.flat_inst_offsets)] = .{ | |
| 481 | .llvm_name = "flat-inst-offsets", | |
| 482 | .description = "Flat instructions have immediate offset addressing mode", | |
| 483 | .dependencies = featureSet(&[_]Feature{}), | |
| 484 | }; | |
| 485 | result[@intFromEnum(Feature.flat_scratch)] = .{ | |
| 486 | .llvm_name = "enable-flat-scratch", | |
| 487 | .description = "Use scratch_* flat memory instructions to access scratch", | |
| 488 | .dependencies = featureSet(&[_]Feature{}), | |
| 489 | }; | |
| 490 | result[@intFromEnum(Feature.flat_scratch_insts)] = .{ | |
| 491 | .llvm_name = "flat-scratch-insts", | |
| 492 | .description = "Have scratch_* flat memory instructions", | |
| 493 | .dependencies = featureSet(&[_]Feature{}), | |
| 494 | }; | |
| 495 | result[@intFromEnum(Feature.flat_segment_offset_bug)] = .{ | |
| 496 | .llvm_name = "flat-segment-offset-bug", | |
| 497 | .description = "GFX10 bug where inst_offset is ignored when flat instructions access global memory", | |
| 498 | .dependencies = featureSet(&[_]Feature{}), | |
| 499 | }; | |
| 500 | result[@intFromEnum(Feature.fma_mix_insts)] = .{ | |
| 501 | .llvm_name = "fma-mix-insts", | |
| 502 | .description = "Has v_fma_mix_f32, v_fma_mixlo_f16, v_fma_mixhi_f16 instructions", | |
| 503 | .dependencies = featureSet(&[_]Feature{}), | |
| 504 | }; | |
| 505 | result[@intFromEnum(Feature.fmacf64_inst)] = .{ | |
| 506 | .llvm_name = "fmacf64-inst", | |
| 507 | .description = "Has v_fmac_f64 instruction", | |
| 508 | .dependencies = featureSet(&[_]Feature{}), | |
| 509 | }; | |
| 510 | result[@intFromEnum(Feature.fmaf)] = .{ | |
| 511 | .llvm_name = "fmaf", | |
| 512 | .description = "Enable single precision FMA (not as fast as mul+add, but fused)", | |
| 513 | .dependencies = featureSet(&[_]Feature{}), | |
| 514 | }; | |
| 515 | result[@intFromEnum(Feature.force_store_sc0_sc1)] = .{ | |
| 516 | .llvm_name = "force-store-sc0-sc1", | |
| 517 | .description = "Has SC0 and SC1 on stores", | |
| 518 | .dependencies = featureSet(&[_]Feature{}), | |
| 519 | }; | |
| 520 | result[@intFromEnum(Feature.fp64)] = .{ | |
| 521 | .llvm_name = "fp64", | |
| 522 | .description = "Enable double precision operations", | |
| 523 | .dependencies = featureSet(&[_]Feature{}), | |
| 524 | }; | |
| 525 | result[@intFromEnum(Feature.fp8_conversion_insts)] = .{ | |
| 526 | .llvm_name = "fp8-conversion-insts", | |
| 527 | .description = "Has fp8 and bf8 conversion instructions", | |
| 528 | .dependencies = featureSet(&[_]Feature{}), | |
| 529 | }; | |
| 530 | result[@intFromEnum(Feature.fp8_insts)] = .{ | |
| 531 | .llvm_name = "fp8-insts", | |
| 532 | .description = "Has fp8 and bf8 instructions", | |
| 533 | .dependencies = featureSet(&[_]Feature{}), | |
| 534 | }; | |
| 535 | result[@intFromEnum(Feature.full_rate_64_ops)] = .{ | |
| 536 | .llvm_name = "full-rate-64-ops", | |
| 537 | .description = "Most fp64 instructions are full rate", | |
| 538 | .dependencies = featureSet(&[_]Feature{}), | |
| 539 | }; | |
| 540 | result[@intFromEnum(Feature.g16)] = .{ | |
| 541 | .llvm_name = "g16", | |
| 542 | .description = "Support G16 for 16-bit gradient image operands", | |
| 543 | .dependencies = featureSet(&[_]Feature{}), | |
| 544 | }; | |
| 545 | result[@intFromEnum(Feature.gcn3_encoding)] = .{ | |
| 546 | .llvm_name = "gcn3-encoding", | |
| 547 | .description = "Encoding format for VI", | |
| 548 | .dependencies = featureSet(&[_]Feature{}), | |
| 549 | }; | |
| 550 | result[@intFromEnum(Feature.gds)] = .{ | |
| 551 | .llvm_name = "gds", | |
| 552 | .description = "Has Global Data Share", | |
| 553 | .dependencies = featureSet(&[_]Feature{}), | |
| 554 | }; | |
| 555 | result[@intFromEnum(Feature.get_wave_id_inst)] = .{ | |
| 556 | .llvm_name = "get-wave-id-inst", | |
| 557 | .description = "Has s_get_waveid_in_workgroup instruction", | |
| 558 | .dependencies = featureSet(&[_]Feature{}), | |
| 559 | }; | |
| 560 | result[@intFromEnum(Feature.gfx10)] = .{ | |
| 561 | .llvm_name = "gfx10", | |
| 562 | .description = "GFX10 GPU generation", | |
| 563 | .dependencies = featureSet(&[_]Feature{ | |
| 564 | .@"16_bit_insts", | |
| 565 | .a16, | |
| 566 | .add_no_carry_insts, | |
| 567 | .aperture_regs, | |
| 568 | .atomic_fmin_fmax_flat_f32, | |
| 569 | .atomic_fmin_fmax_flat_f64, | |
| 570 | .atomic_fmin_fmax_global_f32, | |
| 571 | .atomic_fmin_fmax_global_f64, | |
| 572 | .ci_insts, | |
| 573 | .default_component_zero, | |
| 574 | .dpp, | |
| 575 | .dpp8, | |
| 576 | .extended_image_insts, | |
| 577 | .fast_denormal_f32, | |
| 578 | .fast_fmaf, | |
| 579 | .flat_address_space, | |
| 580 | .flat_global_insts, | |
| 581 | .flat_inst_offsets, | |
| 582 | .flat_scratch_insts, | |
| 583 | .fma_mix_insts, | |
| 584 | .fp64, | |
| 585 | .g16, | |
| 586 | .gds, | |
| 587 | .gfx10_insts, | |
| 588 | .gfx8_insts, | |
| 589 | .gfx9_insts, | |
| 590 | .gws, | |
| 591 | .image_insts, | |
| 592 | .int_clamp_insts, | |
| 593 | .inv_2pi_inline_imm, | |
| 594 | .localmemorysize65536, | |
| 595 | .max_hard_clause_length_63, | |
| 596 | .mimg_r128, | |
| 597 | .movrel, | |
| 598 | .no_data_dep_hazard, | |
| 599 | .no_sdst_cmpx, | |
| 600 | .pk_fmac_f16_inst, | |
| 601 | .s_memrealtime, | |
| 602 | .s_memtime_inst, | |
| 603 | .sdwa, | |
| 604 | .sdwa_omod, | |
| 605 | .sdwa_scalar, | |
| 606 | .sdwa_sdst, | |
| 607 | .unaligned_buffer_access, | |
| 608 | .unaligned_ds_access, | |
| 609 | .vmem_write_vgpr_in_order, | |
| 610 | .vop3_literal, | |
| 611 | .vop3p, | |
| 612 | .vscnt, | |
| 613 | }), | |
| 614 | }; | |
| 615 | result[@intFromEnum(Feature.gfx10_3_insts)] = .{ | |
| 616 | .llvm_name = "gfx10-3-insts", | |
| 617 | .description = "Additional instructions for GFX10.3", | |
| 618 | .dependencies = featureSet(&[_]Feature{}), | |
| 619 | }; | |
| 620 | result[@intFromEnum(Feature.gfx10_a_encoding)] = .{ | |
| 621 | .llvm_name = "gfx10_a-encoding", | |
| 622 | .description = "Has BVH ray tracing instructions", | |
| 623 | .dependencies = featureSet(&[_]Feature{}), | |
| 624 | }; | |
| 625 | result[@intFromEnum(Feature.gfx10_b_encoding)] = .{ | |
| 626 | .llvm_name = "gfx10_b-encoding", | |
| 627 | .description = "Encoding format GFX10_B", | |
| 628 | .dependencies = featureSet(&[_]Feature{}), | |
| 629 | }; | |
| 630 | result[@intFromEnum(Feature.gfx10_insts)] = .{ | |
| 631 | .llvm_name = "gfx10-insts", | |
| 632 | .description = "Additional instructions for GFX10+", | |
| 633 | .dependencies = featureSet(&[_]Feature{}), | |
| 634 | }; | |
| 635 | result[@intFromEnum(Feature.gfx11)] = .{ | |
| 636 | .llvm_name = "gfx11", | |
| 637 | .description = "GFX11 GPU generation", | |
| 638 | .dependencies = featureSet(&[_]Feature{ | |
| 639 | .@"16_bit_insts", | |
| 640 | .a16, | |
| 641 | .add_no_carry_insts, | |
| 642 | .aperture_regs, | |
| 643 | .atomic_fmin_fmax_flat_f32, | |
| 644 | .atomic_fmin_fmax_global_f32, | |
| 645 | .ci_insts, | |
| 646 | .default_component_zero, | |
| 647 | .dpp, | |
| 648 | .dpp8, | |
| 649 | .extended_image_insts, | |
| 650 | .fast_denormal_f32, | |
| 651 | .fast_fmaf, | |
| 652 | .flat_address_space, | |
| 653 | .flat_global_insts, | |
| 654 | .flat_inst_offsets, | |
| 655 | .flat_scratch_insts, | |
| 656 | .fma_mix_insts, | |
| 657 | .fp64, | |
| 658 | .g16, | |
| 659 | .gds, | |
| 660 | .gfx10_3_insts, | |
| 661 | .gfx10_a_encoding, | |
| 662 | .gfx10_b_encoding, | |
| 663 | .gfx10_insts, | |
| 664 | .gfx11_insts, | |
| 665 | .gfx8_insts, | |
| 666 | .gfx9_insts, | |
| 667 | .gws, | |
| 668 | .int_clamp_insts, | |
| 669 | .inv_2pi_inline_imm, | |
| 670 | .localmemorysize65536, | |
| 671 | .max_hard_clause_length_32, | |
| 672 | .mimg_r128, | |
| 673 | .movrel, | |
| 674 | .no_data_dep_hazard, | |
| 675 | .no_sdst_cmpx, | |
| 676 | .pk_fmac_f16_inst, | |
| 677 | .true16, | |
| 678 | .unaligned_buffer_access, | |
| 679 | .unaligned_ds_access, | |
| 680 | .vmem_write_vgpr_in_order, | |
| 681 | .vop3_literal, | |
| 682 | .vop3p, | |
| 683 | .vopd, | |
| 684 | .vscnt, | |
| 685 | }), | |
| 686 | }; | |
| 687 | result[@intFromEnum(Feature.gfx11_insts)] = .{ | |
| 688 | .llvm_name = "gfx11-insts", | |
| 689 | .description = "Additional instructions for GFX11+", | |
| 690 | .dependencies = featureSet(&[_]Feature{}), | |
| 691 | }; | |
| 692 | result[@intFromEnum(Feature.gfx12)] = .{ | |
| 693 | .llvm_name = "gfx12", | |
| 694 | .description = "GFX12 GPU generation", | |
| 695 | .dependencies = featureSet(&[_]Feature{ | |
| 696 | .@"16_bit_insts", | |
| 697 | .a16, | |
| 698 | .add_no_carry_insts, | |
| 699 | .agent_scope_fine_grained_remote_memory_atomics, | |
| 700 | .aperture_regs, | |
| 701 | .atomic_fmin_fmax_flat_f32, | |
| 702 | .atomic_fmin_fmax_global_f32, | |
| 703 | .ci_insts, | |
| 704 | .default_component_broadcast, | |
| 705 | .dpp, | |
| 706 | .dpp8, | |
| 707 | .fast_denormal_f32, | |
| 708 | .fast_fmaf, | |
| 709 | .flat_address_space, | |
| 710 | .flat_global_insts, | |
| 711 | .flat_inst_offsets, | |
| 712 | .flat_scratch_insts, | |
| 713 | .fma_mix_insts, | |
| 714 | .fp64, | |
| 715 | .g16, | |
| 716 | .gfx10_3_insts, | |
| 717 | .gfx10_a_encoding, | |
| 718 | .gfx10_b_encoding, | |
| 719 | .gfx10_insts, | |
| 720 | .gfx11_insts, | |
| 721 | .gfx12_insts, | |
| 722 | .gfx8_insts, | |
| 723 | .gfx9_insts, | |
| 724 | .int_clamp_insts, | |
| 725 | .inv_2pi_inline_imm, | |
| 726 | .localmemorysize65536, | |
| 727 | .max_hard_clause_length_32, | |
| 728 | .mimg_r128, | |
| 729 | .movrel, | |
| 730 | .no_data_dep_hazard, | |
| 731 | .no_sdst_cmpx, | |
| 732 | .pk_fmac_f16_inst, | |
| 733 | .true16, | |
| 734 | .unaligned_buffer_access, | |
| 735 | .unaligned_ds_access, | |
| 736 | .vop3_literal, | |
| 737 | .vop3p, | |
| 738 | .vopd, | |
| 739 | .vscnt, | |
| 740 | }), | |
| 741 | }; | |
| 742 | result[@intFromEnum(Feature.gfx12_insts)] = .{ | |
| 743 | .llvm_name = "gfx12-insts", | |
| 744 | .description = "Additional instructions for GFX12+", | |
| 745 | .dependencies = featureSet(&[_]Feature{}), | |
| 746 | }; | |
| 747 | result[@intFromEnum(Feature.gfx7_gfx8_gfx9_insts)] = .{ | |
| 748 | .llvm_name = "gfx7-gfx8-gfx9-insts", | |
| 749 | .description = "Instructions shared in GFX7, GFX8, GFX9", | |
| 750 | .dependencies = featureSet(&[_]Feature{}), | |
| 751 | }; | |
| 752 | result[@intFromEnum(Feature.gfx8_insts)] = .{ | |
| 753 | .llvm_name = "gfx8-insts", | |
| 754 | .description = "Additional instructions for GFX8+", | |
| 755 | .dependencies = featureSet(&[_]Feature{}), | |
| 756 | }; | |
| 757 | result[@intFromEnum(Feature.gfx9)] = .{ | |
| 758 | .llvm_name = "gfx9", | |
| 759 | .description = "GFX9 GPU generation", | |
| 760 | .dependencies = featureSet(&[_]Feature{ | |
| 761 | .@"16_bit_insts", | |
| 762 | .a16, | |
| 763 | .add_no_carry_insts, | |
| 764 | .aperture_regs, | |
| 765 | .ci_insts, | |
| 766 | .default_component_zero, | |
| 767 | .dpp, | |
| 768 | .fast_denormal_f32, | |
| 769 | .fast_fmaf, | |
| 770 | .flat_address_space, | |
| 771 | .flat_global_insts, | |
| 772 | .flat_inst_offsets, | |
| 773 | .flat_scratch_insts, | |
| 774 | .fp64, | |
| 775 | .gcn3_encoding, | |
| 776 | .gfx7_gfx8_gfx9_insts, | |
| 777 | .gfx8_insts, | |
| 778 | .gfx9_insts, | |
| 779 | .gws, | |
| 780 | .int_clamp_insts, | |
| 781 | .inv_2pi_inline_imm, | |
| 782 | .localmemorysize65536, | |
| 783 | .negative_scratch_offset_bug, | |
| 784 | .r128_a16, | |
| 785 | .s_memrealtime, | |
| 786 | .s_memtime_inst, | |
| 787 | .scalar_atomics, | |
| 788 | .scalar_flat_scratch_insts, | |
| 789 | .scalar_stores, | |
| 790 | .sdwa, | |
| 791 | .sdwa_omod, | |
| 792 | .sdwa_scalar, | |
| 793 | .sdwa_sdst, | |
| 794 | .unaligned_buffer_access, | |
| 795 | .unaligned_ds_access, | |
| 796 | .vgpr_index_mode, | |
| 797 | .vmem_write_vgpr_in_order, | |
| 798 | .vop3p, | |
| 799 | .wavefrontsize64, | |
| 800 | .xnack_support, | |
| 801 | }), | |
| 802 | }; | |
| 803 | result[@intFromEnum(Feature.gfx90a_insts)] = .{ | |
| 804 | .llvm_name = "gfx90a-insts", | |
| 805 | .description = "Additional instructions for GFX90A+", | |
| 806 | .dependencies = featureSet(&[_]Feature{}), | |
| 807 | }; | |
| 808 | result[@intFromEnum(Feature.gfx940_insts)] = .{ | |
| 809 | .llvm_name = "gfx940-insts", | |
| 810 | .description = "Additional instructions for GFX940+", | |
| 811 | .dependencies = featureSet(&[_]Feature{}), | |
| 812 | }; | |
| 813 | result[@intFromEnum(Feature.gfx9_insts)] = .{ | |
| 814 | .llvm_name = "gfx9-insts", | |
| 815 | .description = "Additional instructions for GFX9+", | |
| 816 | .dependencies = featureSet(&[_]Feature{}), | |
| 817 | }; | |
| 818 | result[@intFromEnum(Feature.gws)] = .{ | |
| 819 | .llvm_name = "gws", | |
| 820 | .description = "Has Global Wave Sync", | |
| 821 | .dependencies = featureSet(&[_]Feature{}), | |
| 822 | }; | |
| 823 | result[@intFromEnum(Feature.half_rate_64_ops)] = .{ | |
| 824 | .llvm_name = "half-rate-64-ops", | |
| 825 | .description = "Most fp64 instructions are half rate instead of quarter", | |
| 826 | .dependencies = featureSet(&[_]Feature{}), | |
| 827 | }; | |
| 828 | result[@intFromEnum(Feature.image_gather4_d16_bug)] = .{ | |
| 829 | .llvm_name = "image-gather4-d16-bug", | |
| 830 | .description = "Image Gather4 D16 hardware bug", | |
| 831 | .dependencies = featureSet(&[_]Feature{}), | |
| 832 | }; | |
| 833 | result[@intFromEnum(Feature.image_insts)] = .{ | |
| 834 | .llvm_name = "image-insts", | |
| 835 | .description = "Support image instructions", | |
| 836 | .dependencies = featureSet(&[_]Feature{}), | |
| 837 | }; | |
| 838 | result[@intFromEnum(Feature.image_store_d16_bug)] = .{ | |
| 839 | .llvm_name = "image-store-d16-bug", | |
| 840 | .description = "Image Store D16 hardware bug", | |
| 841 | .dependencies = featureSet(&[_]Feature{}), | |
| 842 | }; | |
| 843 | result[@intFromEnum(Feature.inst_fwd_prefetch_bug)] = .{ | |
| 844 | .llvm_name = "inst-fwd-prefetch-bug", | |
| 845 | .description = "S_INST_PREFETCH instruction causes shader to hang", | |
| 846 | .dependencies = featureSet(&[_]Feature{}), | |
| 847 | }; | |
| 848 | result[@intFromEnum(Feature.int_clamp_insts)] = .{ | |
| 849 | .llvm_name = "int-clamp-insts", | |
| 850 | .description = "Support clamp for integer destination", | |
| 851 | .dependencies = featureSet(&[_]Feature{}), | |
| 852 | }; | |
| 853 | result[@intFromEnum(Feature.inv_2pi_inline_imm)] = .{ | |
| 854 | .llvm_name = "inv-2pi-inline-imm", | |
| 855 | .description = "Has 1 / (2 * pi) as inline immediate", | |
| 856 | .dependencies = featureSet(&[_]Feature{}), | |
| 857 | }; | |
| 858 | result[@intFromEnum(Feature.kernarg_preload)] = .{ | |
| 859 | .llvm_name = "kernarg-preload", | |
| 860 | .description = "Hardware supports preloading of kernel arguments in user SGPRs.", | |
| 861 | .dependencies = featureSet(&[_]Feature{}), | |
| 862 | }; | |
| 863 | result[@intFromEnum(Feature.lds_branch_vmem_war_hazard)] = .{ | |
| 864 | .llvm_name = "lds-branch-vmem-war-hazard", | |
| 865 | .description = "Switching between LDS and VMEM-tex not waiting VM_VSRC=0", | |
| 866 | .dependencies = featureSet(&[_]Feature{}), | |
| 867 | }; | |
| 868 | result[@intFromEnum(Feature.lds_misaligned_bug)] = .{ | |
| 869 | .llvm_name = "lds-misaligned-bug", | |
| 870 | .description = "Some GFX10 bug with multi-dword LDS and flat access that is not naturally aligned in WGP mode", | |
| 871 | .dependencies = featureSet(&[_]Feature{}), | |
| 872 | }; | |
| 873 | result[@intFromEnum(Feature.ldsbankcount16)] = .{ | |
| 874 | .llvm_name = "ldsbankcount16", | |
| 875 | .description = "The number of LDS banks per compute unit.", | |
| 876 | .dependencies = featureSet(&[_]Feature{}), | |
| 877 | }; | |
| 878 | result[@intFromEnum(Feature.ldsbankcount32)] = .{ | |
| 879 | .llvm_name = "ldsbankcount32", | |
| 880 | .description = "The number of LDS banks per compute unit.", | |
| 881 | .dependencies = featureSet(&[_]Feature{}), | |
| 882 | }; | |
| 883 | result[@intFromEnum(Feature.load_store_opt)] = .{ | |
| 884 | .llvm_name = "load-store-opt", | |
| 885 | .description = "Enable SI load/store optimizer pass", | |
| 886 | .dependencies = featureSet(&[_]Feature{}), | |
| 887 | }; | |
| 888 | result[@intFromEnum(Feature.localmemorysize32768)] = .{ | |
| 889 | .llvm_name = "localmemorysize32768", | |
| 890 | .description = "The size of local memory in bytes", | |
| 891 | .dependencies = featureSet(&[_]Feature{}), | |
| 892 | }; | |
| 893 | result[@intFromEnum(Feature.localmemorysize65536)] = .{ | |
| 894 | .llvm_name = "localmemorysize65536", | |
| 895 | .description = "The size of local memory in bytes", | |
| 896 | .dependencies = featureSet(&[_]Feature{}), | |
| 897 | }; | |
| 898 | result[@intFromEnum(Feature.mad_intra_fwd_bug)] = .{ | |
| 899 | .llvm_name = "mad-intra-fwd-bug", | |
| 900 | .description = "MAD_U64/I64 intra instruction forwarding bug", | |
| 901 | .dependencies = featureSet(&[_]Feature{}), | |
| 902 | }; | |
| 903 | result[@intFromEnum(Feature.mad_mac_f32_insts)] = .{ | |
| 904 | .llvm_name = "mad-mac-f32-insts", | |
| 905 | .description = "Has v_mad_f32/v_mac_f32/v_madak_f32/v_madmk_f32 instructions", | |
| 906 | .dependencies = featureSet(&[_]Feature{}), | |
| 907 | }; | |
| 908 | result[@intFromEnum(Feature.mad_mix_insts)] = .{ | |
| 909 | .llvm_name = "mad-mix-insts", | |
| 910 | .description = "Has v_mad_mix_f32, v_mad_mixlo_f16, v_mad_mixhi_f16 instructions", | |
| 911 | .dependencies = featureSet(&[_]Feature{}), | |
| 912 | }; | |
| 913 | result[@intFromEnum(Feature.mai_insts)] = .{ | |
| 914 | .llvm_name = "mai-insts", | |
| 915 | .description = "Has mAI instructions", | |
| 916 | .dependencies = featureSet(&[_]Feature{}), | |
| 917 | }; | |
| 918 | result[@intFromEnum(Feature.max_hard_clause_length_32)] = .{ | |
| 919 | .llvm_name = "max-hard-clause-length-32", | |
| 920 | .description = "Maximum number of instructions in an explicit S_CLAUSE is 32", | |
| 921 | .dependencies = featureSet(&[_]Feature{}), | |
| 922 | }; | |
| 923 | result[@intFromEnum(Feature.max_hard_clause_length_63)] = .{ | |
| 924 | .llvm_name = "max-hard-clause-length-63", | |
| 925 | .description = "Maximum number of instructions in an explicit S_CLAUSE is 63", | |
| 926 | .dependencies = featureSet(&[_]Feature{}), | |
| 927 | }; | |
| 928 | result[@intFromEnum(Feature.max_private_element_size_16)] = .{ | |
| 929 | .llvm_name = "max-private-element-size-16", | |
| 930 | .description = "Maximum private access size may be 16", | |
| 931 | .dependencies = featureSet(&[_]Feature{}), | |
| 932 | }; | |
| 933 | result[@intFromEnum(Feature.max_private_element_size_4)] = .{ | |
| 934 | .llvm_name = "max-private-element-size-4", | |
| 935 | .description = "Maximum private access size may be 4", | |
| 936 | .dependencies = featureSet(&[_]Feature{}), | |
| 937 | }; | |
| 938 | result[@intFromEnum(Feature.max_private_element_size_8)] = .{ | |
| 939 | .llvm_name = "max-private-element-size-8", | |
| 940 | .description = "Maximum private access size may be 8", | |
| 941 | .dependencies = featureSet(&[_]Feature{}), | |
| 942 | }; | |
| 943 | result[@intFromEnum(Feature.memory_atomic_fadd_f32_denormal_support)] = .{ | |
| 944 | .llvm_name = "memory-atomic-fadd-f32-denormal-support", | |
| 945 | .description = "global/flat/buffer atomic fadd for float supports denormal handling", | |
| 946 | .dependencies = featureSet(&[_]Feature{}), | |
| 947 | }; | |
| 948 | result[@intFromEnum(Feature.mfma_inline_literal_bug)] = .{ | |
| 949 | .llvm_name = "mfma-inline-literal-bug", | |
| 950 | .description = "MFMA cannot use inline literal as SrcC", | |
| 951 | .dependencies = featureSet(&[_]Feature{}), | |
| 952 | }; | |
| 953 | result[@intFromEnum(Feature.mimg_r128)] = .{ | |
| 954 | .llvm_name = "mimg-r128", | |
| 955 | .description = "Support 128-bit texture resources", | |
| 956 | .dependencies = featureSet(&[_]Feature{}), | |
| 957 | }; | |
| 958 | result[@intFromEnum(Feature.movrel)] = .{ | |
| 959 | .llvm_name = "movrel", | |
| 960 | .description = "Has v_movrel*_b32 instructions", | |
| 961 | .dependencies = featureSet(&[_]Feature{}), | |
| 962 | }; | |
| 963 | result[@intFromEnum(Feature.msaa_load_dst_sel_bug)] = .{ | |
| 964 | .llvm_name = "msaa-load-dst-sel-bug", | |
| 965 | .description = "MSAA loads not honoring dst_sel bug", | |
| 966 | .dependencies = featureSet(&[_]Feature{}), | |
| 967 | }; | |
| 968 | result[@intFromEnum(Feature.negative_scratch_offset_bug)] = .{ | |
| 969 | .llvm_name = "negative-scratch-offset-bug", | |
| 970 | .description = "Negative immediate offsets in scratch instructions with an SGPR offset page fault on GFX9", | |
| 971 | .dependencies = featureSet(&[_]Feature{}), | |
| 972 | }; | |
| 973 | result[@intFromEnum(Feature.negative_unaligned_scratch_offset_bug)] = .{ | |
| 974 | .llvm_name = "negative-unaligned-scratch-offset-bug", | |
| 975 | .description = "Scratch instructions with a VGPR offset and a negative immediate offset that is not a multiple of 4 read wrong memory on GFX10", | |
| 976 | .dependencies = featureSet(&[_]Feature{}), | |
| 977 | }; | |
| 978 | result[@intFromEnum(Feature.no_data_dep_hazard)] = .{ | |
| 979 | .llvm_name = "no-data-dep-hazard", | |
| 980 | .description = "Does not need SW waitstates", | |
| 981 | .dependencies = featureSet(&[_]Feature{}), | |
| 982 | }; | |
| 983 | result[@intFromEnum(Feature.no_sdst_cmpx)] = .{ | |
| 984 | .llvm_name = "no-sdst-cmpx", | |
| 985 | .description = "V_CMPX does not write VCC/SGPR in addition to EXEC", | |
| 986 | .dependencies = featureSet(&[_]Feature{}), | |
| 987 | }; | |
| 988 | result[@intFromEnum(Feature.nsa_clause_bug)] = .{ | |
| 989 | .llvm_name = "nsa-clause-bug", | |
| 990 | .description = "MIMG-NSA in a hard clause has unpredictable results on GFX10.1", | |
| 991 | .dependencies = featureSet(&[_]Feature{}), | |
| 992 | }; | |
| 993 | result[@intFromEnum(Feature.nsa_encoding)] = .{ | |
| 994 | .llvm_name = "nsa-encoding", | |
| 995 | .description = "Support NSA encoding for image instructions", | |
| 996 | .dependencies = featureSet(&[_]Feature{}), | |
| 997 | }; | |
| 998 | result[@intFromEnum(Feature.nsa_to_vmem_bug)] = .{ | |
| 999 | .llvm_name = "nsa-to-vmem-bug", | |
| 1000 | .description = "MIMG-NSA followed by VMEM fail if EXEC_LO or EXEC_HI equals zero", | |
| 1001 | .dependencies = featureSet(&[_]Feature{}), | |
| 1002 | }; | |
| 1003 | result[@intFromEnum(Feature.offset_3f_bug)] = .{ | |
| 1004 | .llvm_name = "offset-3f-bug", | |
| 1005 | .description = "Branch offset of 3f hardware bug", | |
| 1006 | .dependencies = featureSet(&[_]Feature{}), | |
| 1007 | }; | |
| 1008 | result[@intFromEnum(Feature.packed_fp32_ops)] = .{ | |
| 1009 | .llvm_name = "packed-fp32-ops", | |
| 1010 | .description = "Support packed fp32 instructions", | |
| 1011 | .dependencies = featureSet(&[_]Feature{}), | |
| 1012 | }; | |
| 1013 | result[@intFromEnum(Feature.packed_tid)] = .{ | |
| 1014 | .llvm_name = "packed-tid", | |
| 1015 | .description = "Workitem IDs are packed into v0 at kernel launch", | |
| 1016 | .dependencies = featureSet(&[_]Feature{}), | |
| 1017 | }; | |
| 1018 | result[@intFromEnum(Feature.partial_nsa_encoding)] = .{ | |
| 1019 | .llvm_name = "partial-nsa-encoding", | |
| 1020 | .description = "Support partial NSA encoding for image instructions", | |
| 1021 | .dependencies = featureSet(&[_]Feature{}), | |
| 1022 | }; | |
| 1023 | result[@intFromEnum(Feature.pk_fmac_f16_inst)] = .{ | |
| 1024 | .llvm_name = "pk-fmac-f16-inst", | |
| 1025 | .description = "Has v_pk_fmac_f16 instruction", | |
| 1026 | .dependencies = featureSet(&[_]Feature{}), | |
| 1027 | }; | |
| 1028 | result[@intFromEnum(Feature.precise_memory)] = .{ | |
| 1029 | .llvm_name = "precise-memory", | |
| 1030 | .description = "Enable precise memory mode", | |
| 1031 | .dependencies = featureSet(&[_]Feature{}), | |
| 1032 | }; | |
| 1033 | result[@intFromEnum(Feature.priv_enabled_trap2_nop_bug)] = .{ | |
| 1034 | .llvm_name = "priv-enabled-trap2-nop-bug", | |
| 1035 | .description = "Hardware that runs with PRIV=1 interpreting 's_trap 2' as a nop bug", | |
| 1036 | .dependencies = featureSet(&[_]Feature{}), | |
| 1037 | }; | |
| 1038 | result[@intFromEnum(Feature.promote_alloca)] = .{ | |
| 1039 | .llvm_name = "promote-alloca", | |
| 1040 | .description = "Enable promote alloca pass", | |
| 1041 | .dependencies = featureSet(&[_]Feature{}), | |
| 1042 | }; | |
| 1043 | result[@intFromEnum(Feature.prt_strict_null)] = .{ | |
| 1044 | .llvm_name = "enable-prt-strict-null", | |
| 1045 | .description = "Enable zeroing of result registers for sparse texture fetches", | |
| 1046 | .dependencies = featureSet(&[_]Feature{}), | |
| 1047 | }; | |
| 1048 | result[@intFromEnum(Feature.pseudo_scalar_trans)] = .{ | |
| 1049 | .llvm_name = "pseudo-scalar-trans", | |
| 1050 | .description = "Has Pseudo Scalar Transcendental instructions", | |
| 1051 | .dependencies = featureSet(&[_]Feature{}), | |
| 1052 | }; | |
| 1053 | result[@intFromEnum(Feature.r128_a16)] = .{ | |
| 1054 | .llvm_name = "r128-a16", | |
| 1055 | .description = "Support gfx9-style A16 for 16-bit coordinates/gradients/lod/clamp/mip image operands, where a16 is aliased with r128", | |
| 1056 | .dependencies = featureSet(&[_]Feature{}), | |
| 1057 | }; | |
| 1058 | result[@intFromEnum(Feature.real_true16)] = .{ | |
| 1059 | .llvm_name = "real-true16", | |
| 1060 | .description = "Use true 16-bit registers", | |
| 1061 | .dependencies = featureSet(&[_]Feature{}), | |
| 1062 | }; | |
| 1063 | result[@intFromEnum(Feature.required_export_priority)] = .{ | |
| 1064 | .llvm_name = "required-export-priority", | |
| 1065 | .description = "Export priority must be explicitly manipulated on GFX11.5", | |
| 1066 | .dependencies = featureSet(&[_]Feature{}), | |
| 1067 | }; | |
| 1068 | result[@intFromEnum(Feature.requires_cov6)] = .{ | |
| 1069 | .llvm_name = "requires-cov6", | |
| 1070 | .description = "Target Requires Code Object V6", | |
| 1071 | .dependencies = featureSet(&[_]Feature{}), | |
| 1072 | }; | |
| 1073 | result[@intFromEnum(Feature.restricted_soffset)] = .{ | |
| 1074 | .llvm_name = "restricted-soffset", | |
| 1075 | .description = "Has restricted SOffset (immediate not supported).", | |
| 1076 | .dependencies = featureSet(&[_]Feature{}), | |
| 1077 | }; | |
| 1078 | result[@intFromEnum(Feature.s_memrealtime)] = .{ | |
| 1079 | .llvm_name = "s-memrealtime", | |
| 1080 | .description = "Has s_memrealtime instruction", | |
| 1081 | .dependencies = featureSet(&[_]Feature{}), | |
| 1082 | }; | |
| 1083 | result[@intFromEnum(Feature.s_memtime_inst)] = .{ | |
| 1084 | .llvm_name = "s-memtime-inst", | |
| 1085 | .description = "Has s_memtime instruction", | |
| 1086 | .dependencies = featureSet(&[_]Feature{}), | |
| 1087 | }; | |
| 1088 | result[@intFromEnum(Feature.salu_float)] = .{ | |
| 1089 | .llvm_name = "salu-float", | |
| 1090 | .description = "Has SALU floating point instructions", | |
| 1091 | .dependencies = featureSet(&[_]Feature{}), | |
| 1092 | }; | |
| 1093 | result[@intFromEnum(Feature.scalar_atomics)] = .{ | |
| 1094 | .llvm_name = "scalar-atomics", | |
| 1095 | .description = "Has atomic scalar memory instructions", | |
| 1096 | .dependencies = featureSet(&[_]Feature{}), | |
| 1097 | }; | |
| 1098 | result[@intFromEnum(Feature.scalar_dwordx3_loads)] = .{ | |
| 1099 | .llvm_name = "scalar-dwordx3-loads", | |
| 1100 | .description = "Has 96-bit scalar load instructions", | |
| 1101 | .dependencies = featureSet(&[_]Feature{}), | |
| 1102 | }; | |
| 1103 | result[@intFromEnum(Feature.scalar_flat_scratch_insts)] = .{ | |
| 1104 | .llvm_name = "scalar-flat-scratch-insts", | |
| 1105 | .description = "Have s_scratch_* flat memory instructions", | |
| 1106 | .dependencies = featureSet(&[_]Feature{}), | |
| 1107 | }; | |
| 1108 | result[@intFromEnum(Feature.scalar_stores)] = .{ | |
| 1109 | .llvm_name = "scalar-stores", | |
| 1110 | .description = "Has store scalar memory instructions", | |
| 1111 | .dependencies = featureSet(&[_]Feature{}), | |
| 1112 | }; | |
| 1113 | result[@intFromEnum(Feature.sdwa)] = .{ | |
| 1114 | .llvm_name = "sdwa", | |
| 1115 | .description = "Support SDWA (Sub-DWORD Addressing) extension", | |
| 1116 | .dependencies = featureSet(&[_]Feature{}), | |
| 1117 | }; | |
| 1118 | result[@intFromEnum(Feature.sdwa_mav)] = .{ | |
| 1119 | .llvm_name = "sdwa-mav", | |
| 1120 | .description = "Support v_mac_f32/f16 with SDWA (Sub-DWORD Addressing) extension", | |
| 1121 | .dependencies = featureSet(&[_]Feature{}), | |
| 1122 | }; | |
| 1123 | result[@intFromEnum(Feature.sdwa_omod)] = .{ | |
| 1124 | .llvm_name = "sdwa-omod", | |
| 1125 | .description = "Support OMod with SDWA (Sub-DWORD Addressing) extension", | |
| 1126 | .dependencies = featureSet(&[_]Feature{}), | |
| 1127 | }; | |
| 1128 | result[@intFromEnum(Feature.sdwa_out_mods_vopc)] = .{ | |
| 1129 | .llvm_name = "sdwa-out-mods-vopc", | |
| 1130 | .description = "Support clamp for VOPC with SDWA (Sub-DWORD Addressing) extension", | |
| 1131 | .dependencies = featureSet(&[_]Feature{}), | |
| 1132 | }; | |
| 1133 | result[@intFromEnum(Feature.sdwa_scalar)] = .{ | |
| 1134 | .llvm_name = "sdwa-scalar", | |
| 1135 | .description = "Support scalar register with SDWA (Sub-DWORD Addressing) extension", | |
| 1136 | .dependencies = featureSet(&[_]Feature{}), | |
| 1137 | }; | |
| 1138 | result[@intFromEnum(Feature.sdwa_sdst)] = .{ | |
| 1139 | .llvm_name = "sdwa-sdst", | |
| 1140 | .description = "Support scalar dst for VOPC with SDWA (Sub-DWORD Addressing) extension", | |
| 1141 | .dependencies = featureSet(&[_]Feature{}), | |
| 1142 | }; | |
| 1143 | result[@intFromEnum(Feature.sea_islands)] = .{ | |
| 1144 | .llvm_name = "sea-islands", | |
| 1145 | .description = "SEA_ISLANDS GPU generation", | |
| 1146 | .dependencies = featureSet(&[_]Feature{ | |
| 1147 | .atomic_fmin_fmax_flat_f32, | |
| 1148 | .atomic_fmin_fmax_flat_f64, | |
| 1149 | .atomic_fmin_fmax_global_f32, | |
| 1150 | .atomic_fmin_fmax_global_f64, | |
| 1151 | .ci_insts, | |
| 1152 | .default_component_zero, | |
| 1153 | .ds_src2_insts, | |
| 1154 | .extended_image_insts, | |
| 1155 | .flat_address_space, | |
| 1156 | .fp64, | |
| 1157 | .gds, | |
| 1158 | .gfx7_gfx8_gfx9_insts, | |
| 1159 | .gws, | |
| 1160 | .image_insts, | |
| 1161 | .localmemorysize65536, | |
| 1162 | .mad_mac_f32_insts, | |
| 1163 | .mimg_r128, | |
| 1164 | .movrel, | |
| 1165 | .s_memtime_inst, | |
| 1166 | .trig_reduced_range, | |
| 1167 | .unaligned_buffer_access, | |
| 1168 | .vmem_write_vgpr_in_order, | |
| 1169 | .wavefrontsize64, | |
| 1170 | }), | |
| 1171 | }; | |
| 1172 | result[@intFromEnum(Feature.sgpr_init_bug)] = .{ | |
| 1173 | .llvm_name = "sgpr-init-bug", | |
| 1174 | .description = "VI SGPR initialization bug requiring a fixed SGPR allocation size", | |
| 1175 | .dependencies = featureSet(&[_]Feature{}), | |
| 1176 | }; | |
| 1177 | result[@intFromEnum(Feature.shader_cycles_hi_lo_registers)] = .{ | |
| 1178 | .llvm_name = "shader-cycles-hi-lo-registers", | |
| 1179 | .description = "Has SHADER_CYCLES_HI/LO hardware registers", | |
| 1180 | .dependencies = featureSet(&[_]Feature{}), | |
| 1181 | }; | |
| 1182 | result[@intFromEnum(Feature.shader_cycles_register)] = .{ | |
| 1183 | .llvm_name = "shader-cycles-register", | |
| 1184 | .description = "Has SHADER_CYCLES hardware register", | |
| 1185 | .dependencies = featureSet(&[_]Feature{}), | |
| 1186 | }; | |
| 1187 | result[@intFromEnum(Feature.si_scheduler)] = .{ | |
| 1188 | .llvm_name = "si-scheduler", | |
| 1189 | .description = "Enable SI Machine Scheduler", | |
| 1190 | .dependencies = featureSet(&[_]Feature{}), | |
| 1191 | }; | |
| 1192 | result[@intFromEnum(Feature.smem_to_vector_write_hazard)] = .{ | |
| 1193 | .llvm_name = "smem-to-vector-write-hazard", | |
| 1194 | .description = "s_load_dword followed by v_cmp page faults", | |
| 1195 | .dependencies = featureSet(&[_]Feature{}), | |
| 1196 | }; | |
| 1197 | result[@intFromEnum(Feature.southern_islands)] = .{ | |
| 1198 | .llvm_name = "southern-islands", | |
| 1199 | .description = "SOUTHERN_ISLANDS GPU generation", | |
| 1200 | .dependencies = featureSet(&[_]Feature{ | |
| 1201 | .atomic_fmin_fmax_global_f32, | |
| 1202 | .atomic_fmin_fmax_global_f64, | |
| 1203 | .default_component_zero, | |
| 1204 | .ds_src2_insts, | |
| 1205 | .extended_image_insts, | |
| 1206 | .fp64, | |
| 1207 | .gds, | |
| 1208 | .gws, | |
| 1209 | .image_insts, | |
| 1210 | .ldsbankcount32, | |
| 1211 | .localmemorysize32768, | |
| 1212 | .mad_mac_f32_insts, | |
| 1213 | .mimg_r128, | |
| 1214 | .movrel, | |
| 1215 | .s_memtime_inst, | |
| 1216 | .trig_reduced_range, | |
| 1217 | .vmem_write_vgpr_in_order, | |
| 1218 | .wavefrontsize64, | |
| 1219 | }), | |
| 1220 | }; | |
| 1221 | result[@intFromEnum(Feature.sramecc)] = .{ | |
| 1222 | .llvm_name = "sramecc", | |
| 1223 | .description = "Enable SRAMECC", | |
| 1224 | .dependencies = featureSet(&[_]Feature{}), | |
| 1225 | }; | |
| 1226 | result[@intFromEnum(Feature.sramecc_support)] = .{ | |
| 1227 | .llvm_name = "sramecc-support", | |
| 1228 | .description = "Hardware supports SRAMECC", | |
| 1229 | .dependencies = featureSet(&[_]Feature{}), | |
| 1230 | }; | |
| 1231 | result[@intFromEnum(Feature.tgsplit)] = .{ | |
| 1232 | .llvm_name = "tgsplit", | |
| 1233 | .description = "Enable threadgroup split execution", | |
| 1234 | .dependencies = featureSet(&[_]Feature{}), | |
| 1235 | }; | |
| 1236 | result[@intFromEnum(Feature.trap_handler)] = .{ | |
| 1237 | .llvm_name = "trap-handler", | |
| 1238 | .description = "Trap handler support", | |
| 1239 | .dependencies = featureSet(&[_]Feature{}), | |
| 1240 | }; | |
| 1241 | result[@intFromEnum(Feature.trig_reduced_range)] = .{ | |
| 1242 | .llvm_name = "trig-reduced-range", | |
| 1243 | .description = "Requires use of fract on arguments to trig instructions", | |
| 1244 | .dependencies = featureSet(&[_]Feature{}), | |
| 1245 | }; | |
| 1246 | result[@intFromEnum(Feature.true16)] = .{ | |
| 1247 | .llvm_name = "true16", | |
| 1248 | .description = "True 16-bit operand instructions", | |
| 1249 | .dependencies = featureSet(&[_]Feature{}), | |
| 1250 | }; | |
| 1251 | result[@intFromEnum(Feature.unaligned_access_mode)] = .{ | |
| 1252 | .llvm_name = "unaligned-access-mode", | |
| 1253 | .description = "Enable unaligned global, local and region loads and stores if the hardware supports it", | |
| 1254 | .dependencies = featureSet(&[_]Feature{}), | |
| 1255 | }; | |
| 1256 | result[@intFromEnum(Feature.unaligned_buffer_access)] = .{ | |
| 1257 | .llvm_name = "unaligned-buffer-access", | |
| 1258 | .description = "Hardware supports unaligned global loads and stores", | |
| 1259 | .dependencies = featureSet(&[_]Feature{}), | |
| 1260 | }; | |
| 1261 | result[@intFromEnum(Feature.unaligned_ds_access)] = .{ | |
| 1262 | .llvm_name = "unaligned-ds-access", | |
| 1263 | .description = "Hardware supports unaligned local and region loads and stores", | |
| 1264 | .dependencies = featureSet(&[_]Feature{}), | |
| 1265 | }; | |
| 1266 | result[@intFromEnum(Feature.unaligned_scratch_access)] = .{ | |
| 1267 | .llvm_name = "unaligned-scratch-access", | |
| 1268 | .description = "Support unaligned scratch loads and stores", | |
| 1269 | .dependencies = featureSet(&[_]Feature{}), | |
| 1270 | }; | |
| 1271 | result[@intFromEnum(Feature.unpacked_d16_vmem)] = .{ | |
| 1272 | .llvm_name = "unpacked-d16-vmem", | |
| 1273 | .description = "Has unpacked d16 vmem instructions", | |
| 1274 | .dependencies = featureSet(&[_]Feature{}), | |
| 1275 | }; | |
| 1276 | result[@intFromEnum(Feature.unsafe_ds_offset_folding)] = .{ | |
| 1277 | .llvm_name = "unsafe-ds-offset-folding", | |
| 1278 | .description = "Force using DS instruction immediate offsets on SI", | |
| 1279 | .dependencies = featureSet(&[_]Feature{}), | |
| 1280 | }; | |
| 1281 | result[@intFromEnum(Feature.user_sgpr_init16_bug)] = .{ | |
| 1282 | .llvm_name = "user-sgpr-init16-bug", | |
| 1283 | .description = "Bug requiring at least 16 user+system SGPRs to be enabled", | |
| 1284 | .dependencies = featureSet(&[_]Feature{}), | |
| 1285 | }; | |
| 1286 | result[@intFromEnum(Feature.valu_trans_use_hazard)] = .{ | |
| 1287 | .llvm_name = "valu-trans-use-hazard", | |
| 1288 | .description = "Hazard when TRANS instructions are closely followed by a use of the result", | |
| 1289 | .dependencies = featureSet(&[_]Feature{}), | |
| 1290 | }; | |
| 1291 | result[@intFromEnum(Feature.vcmpx_exec_war_hazard)] = .{ | |
| 1292 | .llvm_name = "vcmpx-exec-war-hazard", | |
| 1293 | .description = "V_CMPX WAR hazard on EXEC (V_CMPX issue ONLY)", | |
| 1294 | .dependencies = featureSet(&[_]Feature{}), | |
| 1295 | }; | |
| 1296 | result[@intFromEnum(Feature.vcmpx_permlane_hazard)] = .{ | |
| 1297 | .llvm_name = "vcmpx-permlane-hazard", | |
| 1298 | .description = "TODO: describe me", | |
| 1299 | .dependencies = featureSet(&[_]Feature{}), | |
| 1300 | }; | |
| 1301 | result[@intFromEnum(Feature.vgpr_index_mode)] = .{ | |
| 1302 | .llvm_name = "vgpr-index-mode", | |
| 1303 | .description = "Has VGPR mode register indexing", | |
| 1304 | .dependencies = featureSet(&[_]Feature{}), | |
| 1305 | }; | |
| 1306 | result[@intFromEnum(Feature.vgpr_singleuse_hint)] = .{ | |
| 1307 | .llvm_name = "vgpr-singleuse-hint", | |
| 1308 | .description = "Has single-use VGPR hint instructions", | |
| 1309 | .dependencies = featureSet(&[_]Feature{}), | |
| 1310 | }; | |
| 1311 | result[@intFromEnum(Feature.vmem_to_scalar_write_hazard)] = .{ | |
| 1312 | .llvm_name = "vmem-to-scalar-write-hazard", | |
| 1313 | .description = "VMEM instruction followed by scalar writing to EXEC mask, M0 or SGPR leads to incorrect execution.", | |
| 1314 | .dependencies = featureSet(&[_]Feature{}), | |
| 1315 | }; | |
| 1316 | result[@intFromEnum(Feature.vmem_write_vgpr_in_order)] = .{ | |
| 1317 | .llvm_name = "vmem-write-vgpr-in-order", | |
| 1318 | .description = "VMEM instructions of the same type write VGPR results in order", | |
| 1319 | .dependencies = featureSet(&[_]Feature{}), | |
| 1320 | }; | |
| 1321 | result[@intFromEnum(Feature.volcanic_islands)] = .{ | |
| 1322 | .llvm_name = "volcanic-islands", | |
| 1323 | .description = "VOLCANIC_ISLANDS GPU generation", | |
| 1324 | .dependencies = featureSet(&[_]Feature{ | |
| 1325 | .@"16_bit_insts", | |
| 1326 | .ci_insts, | |
| 1327 | .default_component_zero, | |
| 1328 | .dpp, | |
| 1329 | .ds_src2_insts, | |
| 1330 | .extended_image_insts, | |
| 1331 | .fast_denormal_f32, | |
| 1332 | .flat_address_space, | |
| 1333 | .fp64, | |
| 1334 | .gcn3_encoding, | |
| 1335 | .gds, | |
| 1336 | .gfx7_gfx8_gfx9_insts, | |
| 1337 | .gfx8_insts, | |
| 1338 | .gws, | |
| 1339 | .image_insts, | |
| 1340 | .int_clamp_insts, | |
| 1341 | .inv_2pi_inline_imm, | |
| 1342 | .localmemorysize65536, | |
| 1343 | .mad_mac_f32_insts, | |
| 1344 | .mimg_r128, | |
| 1345 | .movrel, | |
| 1346 | .s_memrealtime, | |
| 1347 | .s_memtime_inst, | |
| 1348 | .scalar_stores, | |
| 1349 | .sdwa, | |
| 1350 | .sdwa_mav, | |
| 1351 | .sdwa_out_mods_vopc, | |
| 1352 | .trig_reduced_range, | |
| 1353 | .unaligned_buffer_access, | |
| 1354 | .vgpr_index_mode, | |
| 1355 | .vmem_write_vgpr_in_order, | |
| 1356 | .wavefrontsize64, | |
| 1357 | }), | |
| 1358 | }; | |
| 1359 | result[@intFromEnum(Feature.vop3_literal)] = .{ | |
| 1360 | .llvm_name = "vop3-literal", | |
| 1361 | .description = "Can use one literal in VOP3", | |
| 1362 | .dependencies = featureSet(&[_]Feature{}), | |
| 1363 | }; | |
| 1364 | result[@intFromEnum(Feature.vop3p)] = .{ | |
| 1365 | .llvm_name = "vop3p", | |
| 1366 | .description = "Has VOP3P packed instructions", | |
| 1367 | .dependencies = featureSet(&[_]Feature{}), | |
| 1368 | }; | |
| 1369 | result[@intFromEnum(Feature.vopd)] = .{ | |
| 1370 | .llvm_name = "vopd", | |
| 1371 | .description = "Has VOPD dual issue wave32 instructions", | |
| 1372 | .dependencies = featureSet(&[_]Feature{}), | |
| 1373 | }; | |
| 1374 | result[@intFromEnum(Feature.vscnt)] = .{ | |
| 1375 | .llvm_name = "vscnt", | |
| 1376 | .description = "Has separate store vscnt counter", | |
| 1377 | .dependencies = featureSet(&[_]Feature{}), | |
| 1378 | }; | |
| 1379 | result[@intFromEnum(Feature.wavefrontsize16)] = .{ | |
| 1380 | .llvm_name = "wavefrontsize16", | |
| 1381 | .description = "The number of threads per wavefront", | |
| 1382 | .dependencies = featureSet(&[_]Feature{}), | |
| 1383 | }; | |
| 1384 | result[@intFromEnum(Feature.wavefrontsize32)] = .{ | |
| 1385 | .llvm_name = "wavefrontsize32", | |
| 1386 | .description = "The number of threads per wavefront", | |
| 1387 | .dependencies = featureSet(&[_]Feature{}), | |
| 1388 | }; | |
| 1389 | result[@intFromEnum(Feature.wavefrontsize64)] = .{ | |
| 1390 | .llvm_name = "wavefrontsize64", | |
| 1391 | .description = "The number of threads per wavefront", | |
| 1392 | .dependencies = featureSet(&[_]Feature{}), | |
| 1393 | }; | |
| 1394 | result[@intFromEnum(Feature.xnack)] = .{ | |
| 1395 | .llvm_name = "xnack", | |
| 1396 | .description = "Enable XNACK support", | |
| 1397 | .dependencies = featureSet(&[_]Feature{}), | |
| 1398 | }; | |
| 1399 | result[@intFromEnum(Feature.xnack_support)] = .{ | |
| 1400 | .llvm_name = "xnack-support", | |
| 1401 | .description = "Hardware supports XNACK", | |
| 1402 | .dependencies = featureSet(&[_]Feature{}), | |
| 1403 | }; | |
| 1404 | const ti = @typeInfo(Feature); | |
| 1405 | for (&result, 0..) |*elem, i| { | |
| 1406 | elem.index = i; | |
| 1407 | elem.name = ti.@"enum".fields[i].name; | |
| 1408 | } | |
| 1409 | break :blk result; | |
| 1410 | }; | |
| 1411 | ||
| 1412 | pub const cpu = struct { | |
| 1413 | pub const bonaire = CpuModel{ | |
| 1414 | .name = "bonaire", | |
| 1415 | .llvm_name = "bonaire", | |
| 1416 | .features = featureSet(&[_]Feature{ | |
| 1417 | .ldsbankcount32, | |
| 1418 | .sea_islands, | |
| 1419 | }), | |
| 1420 | }; | |
| 1421 | pub const carrizo = CpuModel{ | |
| 1422 | .name = "carrizo", | |
| 1423 | .llvm_name = "carrizo", | |
| 1424 | .features = featureSet(&[_]Feature{ | |
| 1425 | .fast_fmaf, | |
| 1426 | .half_rate_64_ops, | |
| 1427 | .ldsbankcount32, | |
| 1428 | .unpacked_d16_vmem, | |
| 1429 | .volcanic_islands, | |
| 1430 | .xnack_support, | |
| 1431 | }), | |
| 1432 | }; | |
| 1433 | pub const fiji = CpuModel{ | |
| 1434 | .name = "fiji", | |
| 1435 | .llvm_name = "fiji", | |
| 1436 | .features = featureSet(&[_]Feature{ | |
| 1437 | .ldsbankcount32, | |
| 1438 | .unpacked_d16_vmem, | |
| 1439 | .volcanic_islands, | |
| 1440 | }), | |
| 1441 | }; | |
| 1442 | pub const generic = CpuModel{ | |
| 1443 | .name = "generic", | |
| 1444 | .llvm_name = "generic", | |
| 1445 | .features = featureSet(&[_]Feature{ | |
| 1446 | .gds, | |
| 1447 | .gws, | |
| 1448 | .wavefrontsize64, | |
| 1449 | }), | |
| 1450 | }; | |
| 1451 | pub const generic_hsa = CpuModel{ | |
| 1452 | .name = "generic_hsa", | |
| 1453 | .llvm_name = "generic-hsa", | |
| 1454 | .features = featureSet(&[_]Feature{ | |
| 1455 | .flat_address_space, | |
| 1456 | .gds, | |
| 1457 | .gws, | |
| 1458 | .wavefrontsize64, | |
| 1459 | }), | |
| 1460 | }; | |
| 1461 | pub const gfx1010 = CpuModel{ | |
| 1462 | .name = "gfx1010", | |
| 1463 | .llvm_name = "gfx1010", | |
| 1464 | .features = featureSet(&[_]Feature{ | |
| 1465 | .back_off_barrier, | |
| 1466 | .dl_insts, | |
| 1467 | .ds_src2_insts, | |
| 1468 | .flat_segment_offset_bug, | |
| 1469 | .get_wave_id_inst, | |
| 1470 | .gfx10, | |
| 1471 | .inst_fwd_prefetch_bug, | |
| 1472 | .lds_branch_vmem_war_hazard, | |
| 1473 | .lds_misaligned_bug, | |
| 1474 | .ldsbankcount32, | |
| 1475 | .mad_mac_f32_insts, | |
| 1476 | .negative_unaligned_scratch_offset_bug, | |
| 1477 | .nsa_clause_bug, | |
| 1478 | .nsa_encoding, | |
| 1479 | .nsa_to_vmem_bug, | |
| 1480 | .offset_3f_bug, | |
| 1481 | .scalar_atomics, | |
| 1482 | .scalar_flat_scratch_insts, | |
| 1483 | .scalar_stores, | |
| 1484 | .smem_to_vector_write_hazard, | |
| 1485 | .vcmpx_exec_war_hazard, | |
| 1486 | .vcmpx_permlane_hazard, | |
| 1487 | .vmem_to_scalar_write_hazard, | |
| 1488 | .xnack_support, | |
| 1489 | }), | |
| 1490 | }; | |
| 1491 | pub const gfx1011 = CpuModel{ | |
| 1492 | .name = "gfx1011", | |
| 1493 | .llvm_name = "gfx1011", | |
| 1494 | .features = featureSet(&[_]Feature{ | |
| 1495 | .back_off_barrier, | |
| 1496 | .dl_insts, | |
| 1497 | .dot10_insts, | |
| 1498 | .dot1_insts, | |
| 1499 | .dot2_insts, | |
| 1500 | .dot5_insts, | |
| 1501 | .dot6_insts, | |
| 1502 | .dot7_insts, | |
| 1503 | .ds_src2_insts, | |
| 1504 | .flat_segment_offset_bug, | |
| 1505 | .get_wave_id_inst, | |
| 1506 | .gfx10, | |
| 1507 | .inst_fwd_prefetch_bug, | |
| 1508 | .lds_branch_vmem_war_hazard, | |
| 1509 | .lds_misaligned_bug, | |
| 1510 | .ldsbankcount32, | |
| 1511 | .mad_mac_f32_insts, | |
| 1512 | .negative_unaligned_scratch_offset_bug, | |
| 1513 | .nsa_clause_bug, | |
| 1514 | .nsa_encoding, | |
| 1515 | .nsa_to_vmem_bug, | |
| 1516 | .offset_3f_bug, | |
| 1517 | .scalar_atomics, | |
| 1518 | .scalar_flat_scratch_insts, | |
| 1519 | .scalar_stores, | |
| 1520 | .smem_to_vector_write_hazard, | |
| 1521 | .vcmpx_exec_war_hazard, | |
| 1522 | .vcmpx_permlane_hazard, | |
| 1523 | .vmem_to_scalar_write_hazard, | |
| 1524 | .xnack_support, | |
| 1525 | }), | |
| 1526 | }; | |
| 1527 | pub const gfx1012 = CpuModel{ | |
| 1528 | .name = "gfx1012", | |
| 1529 | .llvm_name = "gfx1012", | |
| 1530 | .features = featureSet(&[_]Feature{ | |
| 1531 | .back_off_barrier, | |
| 1532 | .dl_insts, | |
| 1533 | .dot10_insts, | |
| 1534 | .dot1_insts, | |
| 1535 | .dot2_insts, | |
| 1536 | .dot5_insts, | |
| 1537 | .dot6_insts, | |
| 1538 | .dot7_insts, | |
| 1539 | .ds_src2_insts, | |
| 1540 | .flat_segment_offset_bug, | |
| 1541 | .get_wave_id_inst, | |
| 1542 | .gfx10, | |
| 1543 | .inst_fwd_prefetch_bug, | |
| 1544 | .lds_branch_vmem_war_hazard, | |
| 1545 | .lds_misaligned_bug, | |
| 1546 | .ldsbankcount32, | |
| 1547 | .mad_mac_f32_insts, | |
| 1548 | .negative_unaligned_scratch_offset_bug, | |
| 1549 | .nsa_clause_bug, | |
| 1550 | .nsa_encoding, | |
| 1551 | .nsa_to_vmem_bug, | |
| 1552 | .offset_3f_bug, | |
| 1553 | .scalar_atomics, | |
| 1554 | .scalar_flat_scratch_insts, | |
| 1555 | .scalar_stores, | |
| 1556 | .smem_to_vector_write_hazard, | |
| 1557 | .vcmpx_exec_war_hazard, | |
| 1558 | .vcmpx_permlane_hazard, | |
| 1559 | .vmem_to_scalar_write_hazard, | |
| 1560 | .xnack_support, | |
| 1561 | }), | |
| 1562 | }; | |
| 1563 | pub const gfx1013 = CpuModel{ | |
| 1564 | .name = "gfx1013", | |
| 1565 | .llvm_name = "gfx1013", | |
| 1566 | .features = featureSet(&[_]Feature{ | |
| 1567 | .back_off_barrier, | |
| 1568 | .dl_insts, | |
| 1569 | .ds_src2_insts, | |
| 1570 | .flat_segment_offset_bug, | |
| 1571 | .get_wave_id_inst, | |
| 1572 | .gfx10, | |
| 1573 | .gfx10_a_encoding, | |
| 1574 | .inst_fwd_prefetch_bug, | |
| 1575 | .lds_branch_vmem_war_hazard, | |
| 1576 | .lds_misaligned_bug, | |
| 1577 | .ldsbankcount32, | |
| 1578 | .mad_mac_f32_insts, | |
| 1579 | .negative_unaligned_scratch_offset_bug, | |
| 1580 | .nsa_clause_bug, | |
| 1581 | .nsa_encoding, | |
| 1582 | .nsa_to_vmem_bug, | |
| 1583 | .offset_3f_bug, | |
| 1584 | .scalar_atomics, | |
| 1585 | .scalar_flat_scratch_insts, | |
| 1586 | .scalar_stores, | |
| 1587 | .smem_to_vector_write_hazard, | |
| 1588 | .vcmpx_exec_war_hazard, | |
| 1589 | .vcmpx_permlane_hazard, | |
| 1590 | .vmem_to_scalar_write_hazard, | |
| 1591 | .xnack_support, | |
| 1592 | }), | |
| 1593 | }; | |
| 1594 | pub const gfx1030 = CpuModel{ | |
| 1595 | .name = "gfx1030", | |
| 1596 | .llvm_name = "gfx1030", | |
| 1597 | .features = featureSet(&[_]Feature{ | |
| 1598 | .back_off_barrier, | |
| 1599 | .dl_insts, | |
| 1600 | .dot10_insts, | |
| 1601 | .dot1_insts, | |
| 1602 | .dot2_insts, | |
| 1603 | .dot5_insts, | |
| 1604 | .dot6_insts, | |
| 1605 | .dot7_insts, | |
| 1606 | .gfx10, | |
| 1607 | .gfx10_3_insts, | |
| 1608 | .gfx10_a_encoding, | |
| 1609 | .gfx10_b_encoding, | |
| 1610 | .ldsbankcount32, | |
| 1611 | .nsa_encoding, | |
| 1612 | .shader_cycles_register, | |
| 1613 | }), | |
| 1614 | }; | |
| 1615 | pub const gfx1031 = CpuModel{ | |
| 1616 | .name = "gfx1031", | |
| 1617 | .llvm_name = "gfx1031", | |
| 1618 | .features = featureSet(&[_]Feature{ | |
| 1619 | .back_off_barrier, | |
| 1620 | .dl_insts, | |
| 1621 | .dot10_insts, | |
| 1622 | .dot1_insts, | |
| 1623 | .dot2_insts, | |
| 1624 | .dot5_insts, | |
| 1625 | .dot6_insts, | |
| 1626 | .dot7_insts, | |
| 1627 | .gfx10, | |
| 1628 | .gfx10_3_insts, | |
| 1629 | .gfx10_a_encoding, | |
| 1630 | .gfx10_b_encoding, | |
| 1631 | .ldsbankcount32, | |
| 1632 | .nsa_encoding, | |
| 1633 | .shader_cycles_register, | |
| 1634 | }), | |
| 1635 | }; | |
| 1636 | pub const gfx1032 = CpuModel{ | |
| 1637 | .name = "gfx1032", | |
| 1638 | .llvm_name = "gfx1032", | |
| 1639 | .features = featureSet(&[_]Feature{ | |
| 1640 | .back_off_barrier, | |
| 1641 | .dl_insts, | |
| 1642 | .dot10_insts, | |
| 1643 | .dot1_insts, | |
| 1644 | .dot2_insts, | |
| 1645 | .dot5_insts, | |
| 1646 | .dot6_insts, | |
| 1647 | .dot7_insts, | |
| 1648 | .gfx10, | |
| 1649 | .gfx10_3_insts, | |
| 1650 | .gfx10_a_encoding, | |
| 1651 | .gfx10_b_encoding, | |
| 1652 | .ldsbankcount32, | |
| 1653 | .nsa_encoding, | |
| 1654 | .shader_cycles_register, | |
| 1655 | }), | |
| 1656 | }; | |
| 1657 | pub const gfx1033 = CpuModel{ | |
| 1658 | .name = "gfx1033", | |
| 1659 | .llvm_name = "gfx1033", | |
| 1660 | .features = featureSet(&[_]Feature{ | |
| 1661 | .back_off_barrier, | |
| 1662 | .dl_insts, | |
| 1663 | .dot10_insts, | |
| 1664 | .dot1_insts, | |
| 1665 | .dot2_insts, | |
| 1666 | .dot5_insts, | |
| 1667 | .dot6_insts, | |
| 1668 | .dot7_insts, | |
| 1669 | .gfx10, | |
| 1670 | .gfx10_3_insts, | |
| 1671 | .gfx10_a_encoding, | |
| 1672 | .gfx10_b_encoding, | |
| 1673 | .ldsbankcount32, | |
| 1674 | .nsa_encoding, | |
| 1675 | .shader_cycles_register, | |
| 1676 | }), | |
| 1677 | }; | |
| 1678 | pub const gfx1034 = CpuModel{ | |
| 1679 | .name = "gfx1034", | |
| 1680 | .llvm_name = "gfx1034", | |
| 1681 | .features = featureSet(&[_]Feature{ | |
| 1682 | .back_off_barrier, | |
| 1683 | .dl_insts, | |
| 1684 | .dot10_insts, | |
| 1685 | .dot1_insts, | |
| 1686 | .dot2_insts, | |
| 1687 | .dot5_insts, | |
| 1688 | .dot6_insts, | |
| 1689 | .dot7_insts, | |
| 1690 | .gfx10, | |
| 1691 | .gfx10_3_insts, | |
| 1692 | .gfx10_a_encoding, | |
| 1693 | .gfx10_b_encoding, | |
| 1694 | .ldsbankcount32, | |
| 1695 | .nsa_encoding, | |
| 1696 | .shader_cycles_register, | |
| 1697 | }), | |
| 1698 | }; | |
| 1699 | pub const gfx1035 = CpuModel{ | |
| 1700 | .name = "gfx1035", | |
| 1701 | .llvm_name = "gfx1035", | |
| 1702 | .features = featureSet(&[_]Feature{ | |
| 1703 | .back_off_barrier, | |
| 1704 | .dl_insts, | |
| 1705 | .dot10_insts, | |
| 1706 | .dot1_insts, | |
| 1707 | .dot2_insts, | |
| 1708 | .dot5_insts, | |
| 1709 | .dot6_insts, | |
| 1710 | .dot7_insts, | |
| 1711 | .gfx10, | |
| 1712 | .gfx10_3_insts, | |
| 1713 | .gfx10_a_encoding, | |
| 1714 | .gfx10_b_encoding, | |
| 1715 | .ldsbankcount32, | |
| 1716 | .nsa_encoding, | |
| 1717 | .shader_cycles_register, | |
| 1718 | }), | |
| 1719 | }; | |
| 1720 | pub const gfx1036 = CpuModel{ | |
| 1721 | .name = "gfx1036", | |
| 1722 | .llvm_name = "gfx1036", | |
| 1723 | .features = featureSet(&[_]Feature{ | |
| 1724 | .back_off_barrier, | |
| 1725 | .dl_insts, | |
| 1726 | .dot10_insts, | |
| 1727 | .dot1_insts, | |
| 1728 | .dot2_insts, | |
| 1729 | .dot5_insts, | |
| 1730 | .dot6_insts, | |
| 1731 | .dot7_insts, | |
| 1732 | .gfx10, | |
| 1733 | .gfx10_3_insts, | |
| 1734 | .gfx10_a_encoding, | |
| 1735 | .gfx10_b_encoding, | |
| 1736 | .ldsbankcount32, | |
| 1737 | .nsa_encoding, | |
| 1738 | .shader_cycles_register, | |
| 1739 | }), | |
| 1740 | }; | |
| 1741 | pub const gfx10_1_generic = CpuModel{ | |
| 1742 | .name = "gfx10_1_generic", | |
| 1743 | .llvm_name = "gfx10-1-generic", | |
| 1744 | .features = featureSet(&[_]Feature{ | |
| 1745 | .back_off_barrier, | |
| 1746 | .dl_insts, | |
| 1747 | .ds_src2_insts, | |
| 1748 | .flat_segment_offset_bug, | |
| 1749 | .get_wave_id_inst, | |
| 1750 | .gfx10, | |
| 1751 | .inst_fwd_prefetch_bug, | |
| 1752 | .lds_branch_vmem_war_hazard, | |
| 1753 | .lds_misaligned_bug, | |
| 1754 | .ldsbankcount32, | |
| 1755 | .mad_mac_f32_insts, | |
| 1756 | .negative_unaligned_scratch_offset_bug, | |
| 1757 | .nsa_clause_bug, | |
| 1758 | .nsa_encoding, | |
| 1759 | .nsa_to_vmem_bug, | |
| 1760 | .offset_3f_bug, | |
| 1761 | .requires_cov6, | |
| 1762 | .scalar_atomics, | |
| 1763 | .scalar_flat_scratch_insts, | |
| 1764 | .scalar_stores, | |
| 1765 | .smem_to_vector_write_hazard, | |
| 1766 | .vcmpx_exec_war_hazard, | |
| 1767 | .vcmpx_permlane_hazard, | |
| 1768 | .vmem_to_scalar_write_hazard, | |
| 1769 | .xnack_support, | |
| 1770 | }), | |
| 1771 | }; | |
| 1772 | pub const gfx10_3_generic = CpuModel{ | |
| 1773 | .name = "gfx10_3_generic", | |
| 1774 | .llvm_name = "gfx10-3-generic", | |
| 1775 | .features = featureSet(&[_]Feature{ | |
| 1776 | .back_off_barrier, | |
| 1777 | .dl_insts, | |
| 1778 | .dot10_insts, | |
| 1779 | .dot1_insts, | |
| 1780 | .dot2_insts, | |
| 1781 | .dot5_insts, | |
| 1782 | .dot6_insts, | |
| 1783 | .dot7_insts, | |
| 1784 | .gfx10, | |
| 1785 | .gfx10_3_insts, | |
| 1786 | .gfx10_a_encoding, | |
| 1787 | .gfx10_b_encoding, | |
| 1788 | .ldsbankcount32, | |
| 1789 | .nsa_encoding, | |
| 1790 | .requires_cov6, | |
| 1791 | .shader_cycles_register, | |
| 1792 | }), | |
| 1793 | }; | |
| 1794 | pub const gfx1100 = CpuModel{ | |
| 1795 | .name = "gfx1100", | |
| 1796 | .llvm_name = "gfx1100", | |
| 1797 | .features = featureSet(&[_]Feature{ | |
| 1798 | .allocate1_5xvgprs, | |
| 1799 | .architected_flat_scratch, | |
| 1800 | .atomic_fadd_no_rtn_insts, | |
| 1801 | .atomic_fadd_rtn_insts, | |
| 1802 | .dl_insts, | |
| 1803 | .dot10_insts, | |
| 1804 | .dot5_insts, | |
| 1805 | .dot7_insts, | |
| 1806 | .dot8_insts, | |
| 1807 | .dot9_insts, | |
| 1808 | .flat_atomic_fadd_f32_inst, | |
| 1809 | .gfx11, | |
| 1810 | .image_insts, | |
| 1811 | .ldsbankcount32, | |
| 1812 | .mad_intra_fwd_bug, | |
| 1813 | .memory_atomic_fadd_f32_denormal_support, | |
| 1814 | .msaa_load_dst_sel_bug, | |
| 1815 | .nsa_encoding, | |
| 1816 | .packed_tid, | |
| 1817 | .partial_nsa_encoding, | |
| 1818 | .priv_enabled_trap2_nop_bug, | |
| 1819 | .shader_cycles_register, | |
| 1820 | .user_sgpr_init16_bug, | |
| 1821 | .valu_trans_use_hazard, | |
| 1822 | .vcmpx_permlane_hazard, | |
| 1823 | }), | |
| 1824 | }; | |
| 1825 | pub const gfx1101 = CpuModel{ | |
| 1826 | .name = "gfx1101", | |
| 1827 | .llvm_name = "gfx1101", | |
| 1828 | .features = featureSet(&[_]Feature{ | |
| 1829 | .allocate1_5xvgprs, | |
| 1830 | .architected_flat_scratch, | |
| 1831 | .atomic_fadd_no_rtn_insts, | |
| 1832 | .atomic_fadd_rtn_insts, | |
| 1833 | .dl_insts, | |
| 1834 | .dot10_insts, | |
| 1835 | .dot5_insts, | |
| 1836 | .dot7_insts, | |
| 1837 | .dot8_insts, | |
| 1838 | .dot9_insts, | |
| 1839 | .flat_atomic_fadd_f32_inst, | |
| 1840 | .gfx11, | |
| 1841 | .image_insts, | |
| 1842 | .ldsbankcount32, | |
| 1843 | .mad_intra_fwd_bug, | |
| 1844 | .memory_atomic_fadd_f32_denormal_support, | |
| 1845 | .msaa_load_dst_sel_bug, | |
| 1846 | .nsa_encoding, | |
| 1847 | .packed_tid, | |
| 1848 | .partial_nsa_encoding, | |
| 1849 | .priv_enabled_trap2_nop_bug, | |
| 1850 | .shader_cycles_register, | |
| 1851 | .valu_trans_use_hazard, | |
| 1852 | .vcmpx_permlane_hazard, | |
| 1853 | }), | |
| 1854 | }; | |
| 1855 | pub const gfx1102 = CpuModel{ | |
| 1856 | .name = "gfx1102", | |
| 1857 | .llvm_name = "gfx1102", | |
| 1858 | .features = featureSet(&[_]Feature{ | |
| 1859 | .architected_flat_scratch, | |
| 1860 | .atomic_fadd_no_rtn_insts, | |
| 1861 | .atomic_fadd_rtn_insts, | |
| 1862 | .dl_insts, | |
| 1863 | .dot10_insts, | |
| 1864 | .dot5_insts, | |
| 1865 | .dot7_insts, | |
| 1866 | .dot8_insts, | |
| 1867 | .dot9_insts, | |
| 1868 | .flat_atomic_fadd_f32_inst, | |
| 1869 | .gfx11, | |
| 1870 | .image_insts, | |
| 1871 | .ldsbankcount32, | |
| 1872 | .mad_intra_fwd_bug, | |
| 1873 | .memory_atomic_fadd_f32_denormal_support, | |
| 1874 | .msaa_load_dst_sel_bug, | |
| 1875 | .nsa_encoding, | |
| 1876 | .packed_tid, | |
| 1877 | .partial_nsa_encoding, | |
| 1878 | .priv_enabled_trap2_nop_bug, | |
| 1879 | .shader_cycles_register, | |
| 1880 | .user_sgpr_init16_bug, | |
| 1881 | .valu_trans_use_hazard, | |
| 1882 | .vcmpx_permlane_hazard, | |
| 1883 | }), | |
| 1884 | }; | |
| 1885 | pub const gfx1103 = CpuModel{ | |
| 1886 | .name = "gfx1103", | |
| 1887 | .llvm_name = "gfx1103", | |
| 1888 | .features = featureSet(&[_]Feature{ | |
| 1889 | .architected_flat_scratch, | |
| 1890 | .atomic_fadd_no_rtn_insts, | |
| 1891 | .atomic_fadd_rtn_insts, | |
| 1892 | .dl_insts, | |
| 1893 | .dot10_insts, | |
| 1894 | .dot5_insts, | |
| 1895 | .dot7_insts, | |
| 1896 | .dot8_insts, | |
| 1897 | .dot9_insts, | |
| 1898 | .flat_atomic_fadd_f32_inst, | |
| 1899 | .gfx11, | |
| 1900 | .image_insts, | |
| 1901 | .ldsbankcount32, | |
| 1902 | .mad_intra_fwd_bug, | |
| 1903 | .memory_atomic_fadd_f32_denormal_support, | |
| 1904 | .msaa_load_dst_sel_bug, | |
| 1905 | .nsa_encoding, | |
| 1906 | .packed_tid, | |
| 1907 | .partial_nsa_encoding, | |
| 1908 | .priv_enabled_trap2_nop_bug, | |
| 1909 | .shader_cycles_register, | |
| 1910 | .valu_trans_use_hazard, | |
| 1911 | .vcmpx_permlane_hazard, | |
| 1912 | }), | |
| 1913 | }; | |
| 1914 | pub const gfx1150 = CpuModel{ | |
| 1915 | .name = "gfx1150", | |
| 1916 | .llvm_name = "gfx1150", | |
| 1917 | .features = featureSet(&[_]Feature{ | |
| 1918 | .architected_flat_scratch, | |
| 1919 | .atomic_fadd_no_rtn_insts, | |
| 1920 | .atomic_fadd_rtn_insts, | |
| 1921 | .dl_insts, | |
| 1922 | .dot10_insts, | |
| 1923 | .dot5_insts, | |
| 1924 | .dot7_insts, | |
| 1925 | .dot8_insts, | |
| 1926 | .dot9_insts, | |
| 1927 | .dpp_src1_sgpr, | |
| 1928 | .flat_atomic_fadd_f32_inst, | |
| 1929 | .gfx11, | |
| 1930 | .image_insts, | |
| 1931 | .ldsbankcount32, | |
| 1932 | .memory_atomic_fadd_f32_denormal_support, | |
| 1933 | .nsa_encoding, | |
| 1934 | .packed_tid, | |
| 1935 | .partial_nsa_encoding, | |
| 1936 | .required_export_priority, | |
| 1937 | .salu_float, | |
| 1938 | .shader_cycles_register, | |
| 1939 | .vcmpx_permlane_hazard, | |
| 1940 | .vgpr_singleuse_hint, | |
| 1941 | }), | |
| 1942 | }; | |
| 1943 | pub const gfx1151 = CpuModel{ | |
| 1944 | .name = "gfx1151", | |
| 1945 | .llvm_name = "gfx1151", | |
| 1946 | .features = featureSet(&[_]Feature{ | |
| 1947 | .allocate1_5xvgprs, | |
| 1948 | .architected_flat_scratch, | |
| 1949 | .atomic_fadd_no_rtn_insts, | |
| 1950 | .atomic_fadd_rtn_insts, | |
| 1951 | .dl_insts, | |
| 1952 | .dot10_insts, | |
| 1953 | .dot5_insts, | |
| 1954 | .dot7_insts, | |
| 1955 | .dot8_insts, | |
| 1956 | .dot9_insts, | |
| 1957 | .dpp_src1_sgpr, | |
| 1958 | .flat_atomic_fadd_f32_inst, | |
| 1959 | .gfx11, | |
| 1960 | .image_insts, | |
| 1961 | .ldsbankcount32, | |
| 1962 | .memory_atomic_fadd_f32_denormal_support, | |
| 1963 | .nsa_encoding, | |
| 1964 | .packed_tid, | |
| 1965 | .partial_nsa_encoding, | |
| 1966 | .required_export_priority, | |
| 1967 | .salu_float, | |
| 1968 | .shader_cycles_register, | |
| 1969 | .vcmpx_permlane_hazard, | |
| 1970 | .vgpr_singleuse_hint, | |
| 1971 | }), | |
| 1972 | }; | |
| 1973 | pub const gfx1152 = CpuModel{ | |
| 1974 | .name = "gfx1152", | |
| 1975 | .llvm_name = "gfx1152", | |
| 1976 | .features = featureSet(&[_]Feature{ | |
| 1977 | .architected_flat_scratch, | |
| 1978 | .atomic_fadd_no_rtn_insts, | |
| 1979 | .atomic_fadd_rtn_insts, | |
| 1980 | .dl_insts, | |
| 1981 | .dot10_insts, | |
| 1982 | .dot5_insts, | |
| 1983 | .dot7_insts, | |
| 1984 | .dot8_insts, | |
| 1985 | .dot9_insts, | |
| 1986 | .dpp_src1_sgpr, | |
| 1987 | .flat_atomic_fadd_f32_inst, | |
| 1988 | .gfx11, | |
| 1989 | .image_insts, | |
| 1990 | .ldsbankcount32, | |
| 1991 | .memory_atomic_fadd_f32_denormal_support, | |
| 1992 | .nsa_encoding, | |
| 1993 | .packed_tid, | |
| 1994 | .partial_nsa_encoding, | |
| 1995 | .required_export_priority, | |
| 1996 | .salu_float, | |
| 1997 | .shader_cycles_register, | |
| 1998 | .vcmpx_permlane_hazard, | |
| 1999 | .vgpr_singleuse_hint, | |
| 2000 | }), | |
| 2001 | }; | |
| 2002 | pub const gfx11_generic = CpuModel{ | |
| 2003 | .name = "gfx11_generic", | |
| 2004 | .llvm_name = "gfx11-generic", | |
| 2005 | .features = featureSet(&[_]Feature{ | |
| 2006 | .architected_flat_scratch, | |
| 2007 | .atomic_fadd_no_rtn_insts, | |
| 2008 | .atomic_fadd_rtn_insts, | |
| 2009 | .dl_insts, | |
| 2010 | .dot10_insts, | |
| 2011 | .dot5_insts, | |
| 2012 | .dot7_insts, | |
| 2013 | .dot8_insts, | |
| 2014 | .dot9_insts, | |
| 2015 | .flat_atomic_fadd_f32_inst, | |
| 2016 | .gfx11, | |
| 2017 | .image_insts, | |
| 2018 | .ldsbankcount32, | |
| 2019 | .mad_intra_fwd_bug, | |
| 2020 | .memory_atomic_fadd_f32_denormal_support, | |
| 2021 | .msaa_load_dst_sel_bug, | |
| 2022 | .nsa_encoding, | |
| 2023 | .packed_tid, | |
| 2024 | .partial_nsa_encoding, | |
| 2025 | .priv_enabled_trap2_nop_bug, | |
| 2026 | .required_export_priority, | |
| 2027 | .requires_cov6, | |
| 2028 | .shader_cycles_register, | |
| 2029 | .user_sgpr_init16_bug, | |
| 2030 | .valu_trans_use_hazard, | |
| 2031 | .vcmpx_permlane_hazard, | |
| 2032 | }), | |
| 2033 | }; | |
| 2034 | pub const gfx1200 = CpuModel{ | |
| 2035 | .name = "gfx1200", | |
| 2036 | .llvm_name = "gfx1200", | |
| 2037 | .features = featureSet(&[_]Feature{ | |
| 2038 | .allocate1_5xvgprs, | |
| 2039 | .architected_flat_scratch, | |
| 2040 | .architected_sgprs, | |
| 2041 | .atomic_buffer_global_pk_add_f16_insts, | |
| 2042 | .atomic_buffer_pk_add_bf16_inst, | |
| 2043 | .atomic_ds_pk_add_16_insts, | |
| 2044 | .atomic_fadd_no_rtn_insts, | |
| 2045 | .atomic_fadd_rtn_insts, | |
| 2046 | .atomic_flat_pk_add_16_insts, | |
| 2047 | .atomic_global_pk_add_bf16_inst, | |
| 2048 | .dl_insts, | |
| 2049 | .dot10_insts, | |
| 2050 | .dot11_insts, | |
| 2051 | .dot7_insts, | |
| 2052 | .dot8_insts, | |
| 2053 | .dot9_insts, | |
| 2054 | .dpp_src1_sgpr, | |
| 2055 | .extended_image_insts, | |
| 2056 | .flat_atomic_fadd_f32_inst, | |
| 2057 | .fp8_conversion_insts, | |
| 2058 | .gfx12, | |
| 2059 | .image_insts, | |
| 2060 | .ldsbankcount32, | |
| 2061 | .memory_atomic_fadd_f32_denormal_support, | |
| 2062 | .nsa_encoding, | |
| 2063 | .packed_tid, | |
| 2064 | .partial_nsa_encoding, | |
| 2065 | .pseudo_scalar_trans, | |
| 2066 | .restricted_soffset, | |
| 2067 | .salu_float, | |
| 2068 | .scalar_dwordx3_loads, | |
| 2069 | .shader_cycles_hi_lo_registers, | |
| 2070 | .vcmpx_permlane_hazard, | |
| 2071 | .vgpr_singleuse_hint, | |
| 2072 | }), | |
| 2073 | }; | |
| 2074 | pub const gfx1201 = CpuModel{ | |
| 2075 | .name = "gfx1201", | |
| 2076 | .llvm_name = "gfx1201", | |
| 2077 | .features = featureSet(&[_]Feature{ | |
| 2078 | .allocate1_5xvgprs, | |
| 2079 | .architected_flat_scratch, | |
| 2080 | .architected_sgprs, | |
| 2081 | .atomic_buffer_global_pk_add_f16_insts, | |
| 2082 | .atomic_buffer_pk_add_bf16_inst, | |
| 2083 | .atomic_ds_pk_add_16_insts, | |
| 2084 | .atomic_fadd_no_rtn_insts, | |
| 2085 | .atomic_fadd_rtn_insts, | |
| 2086 | .atomic_flat_pk_add_16_insts, | |
| 2087 | .atomic_global_pk_add_bf16_inst, | |
| 2088 | .dl_insts, | |
| 2089 | .dot10_insts, | |
| 2090 | .dot11_insts, | |
| 2091 | .dot7_insts, | |
| 2092 | .dot8_insts, | |
| 2093 | .dot9_insts, | |
| 2094 | .dpp_src1_sgpr, | |
| 2095 | .extended_image_insts, | |
| 2096 | .flat_atomic_fadd_f32_inst, | |
| 2097 | .fp8_conversion_insts, | |
| 2098 | .gfx12, | |
| 2099 | .image_insts, | |
| 2100 | .ldsbankcount32, | |
| 2101 | .memory_atomic_fadd_f32_denormal_support, | |
| 2102 | .nsa_encoding, | |
| 2103 | .packed_tid, | |
| 2104 | .partial_nsa_encoding, | |
| 2105 | .pseudo_scalar_trans, | |
| 2106 | .restricted_soffset, | |
| 2107 | .salu_float, | |
| 2108 | .scalar_dwordx3_loads, | |
| 2109 | .shader_cycles_hi_lo_registers, | |
| 2110 | .vcmpx_permlane_hazard, | |
| 2111 | .vgpr_singleuse_hint, | |
| 2112 | }), | |
| 2113 | }; | |
| 2114 | pub const gfx12_generic = CpuModel{ | |
| 2115 | .name = "gfx12_generic", | |
| 2116 | .llvm_name = "gfx12-generic", | |
| 2117 | .features = featureSet(&[_]Feature{ | |
| 2118 | .allocate1_5xvgprs, | |
| 2119 | .architected_flat_scratch, | |
| 2120 | .architected_sgprs, | |
| 2121 | .atomic_buffer_global_pk_add_f16_insts, | |
| 2122 | .atomic_buffer_pk_add_bf16_inst, | |
| 2123 | .atomic_ds_pk_add_16_insts, | |
| 2124 | .atomic_fadd_no_rtn_insts, | |
| 2125 | .atomic_fadd_rtn_insts, | |
| 2126 | .atomic_flat_pk_add_16_insts, | |
| 2127 | .atomic_global_pk_add_bf16_inst, | |
| 2128 | .dl_insts, | |
| 2129 | .dot10_insts, | |
| 2130 | .dot11_insts, | |
| 2131 | .dot7_insts, | |
| 2132 | .dot8_insts, | |
| 2133 | .dot9_insts, | |
| 2134 | .dpp_src1_sgpr, | |
| 2135 | .extended_image_insts, | |
| 2136 | .flat_atomic_fadd_f32_inst, | |
| 2137 | .fp8_conversion_insts, | |
| 2138 | .gfx12, | |
| 2139 | .image_insts, | |
| 2140 | .ldsbankcount32, | |
| 2141 | .memory_atomic_fadd_f32_denormal_support, | |
| 2142 | .nsa_encoding, | |
| 2143 | .packed_tid, | |
| 2144 | .partial_nsa_encoding, | |
| 2145 | .pseudo_scalar_trans, | |
| 2146 | .requires_cov6, | |
| 2147 | .restricted_soffset, | |
| 2148 | .salu_float, | |
| 2149 | .scalar_dwordx3_loads, | |
| 2150 | .shader_cycles_hi_lo_registers, | |
| 2151 | .vcmpx_permlane_hazard, | |
| 2152 | .vgpr_singleuse_hint, | |
| 2153 | }), | |
| 2154 | }; | |
| 2155 | pub const gfx600 = CpuModel{ | |
| 2156 | .name = "gfx600", | |
| 2157 | .llvm_name = "gfx600", | |
| 2158 | .features = featureSet(&[_]Feature{ | |
| 2159 | .fast_fmaf, | |
| 2160 | .half_rate_64_ops, | |
| 2161 | .southern_islands, | |
| 2162 | }), | |
| 2163 | }; | |
| 2164 | pub const gfx601 = CpuModel{ | |
| 2165 | .name = "gfx601", | |
| 2166 | .llvm_name = "gfx601", | |
| 2167 | .features = featureSet(&[_]Feature{ | |
| 2168 | .southern_islands, | |
| 2169 | }), | |
| 2170 | }; | |
| 2171 | pub const gfx602 = CpuModel{ | |
| 2172 | .name = "gfx602", | |
| 2173 | .llvm_name = "gfx602", | |
| 2174 | .features = featureSet(&[_]Feature{ | |
| 2175 | .southern_islands, | |
| 2176 | }), | |
| 2177 | }; | |
| 2178 | pub const gfx700 = CpuModel{ | |
| 2179 | .name = "gfx700", | |
| 2180 | .llvm_name = "gfx700", | |
| 2181 | .features = featureSet(&[_]Feature{ | |
| 2182 | .ldsbankcount32, | |
| 2183 | .sea_islands, | |
| 2184 | }), | |
| 2185 | }; | |
| 2186 | pub const gfx701 = CpuModel{ | |
| 2187 | .name = "gfx701", | |
| 2188 | .llvm_name = "gfx701", | |
| 2189 | .features = featureSet(&[_]Feature{ | |
| 2190 | .fast_fmaf, | |
| 2191 | .half_rate_64_ops, | |
| 2192 | .ldsbankcount32, | |
| 2193 | .sea_islands, | |
| 2194 | }), | |
| 2195 | }; | |
| 2196 | pub const gfx702 = CpuModel{ | |
| 2197 | .name = "gfx702", | |
| 2198 | .llvm_name = "gfx702", | |
| 2199 | .features = featureSet(&[_]Feature{ | |
| 2200 | .fast_fmaf, | |
| 2201 | .ldsbankcount16, | |
| 2202 | .sea_islands, | |
| 2203 | }), | |
| 2204 | }; | |
| 2205 | pub const gfx703 = CpuModel{ | |
| 2206 | .name = "gfx703", | |
| 2207 | .llvm_name = "gfx703", | |
| 2208 | .features = featureSet(&[_]Feature{ | |
| 2209 | .ldsbankcount16, | |
| 2210 | .sea_islands, | |
| 2211 | }), | |
| 2212 | }; | |
| 2213 | pub const gfx704 = CpuModel{ | |
| 2214 | .name = "gfx704", | |
| 2215 | .llvm_name = "gfx704", | |
| 2216 | .features = featureSet(&[_]Feature{ | |
| 2217 | .ldsbankcount32, | |
| 2218 | .sea_islands, | |
| 2219 | }), | |
| 2220 | }; | |
| 2221 | pub const gfx705 = CpuModel{ | |
| 2222 | .name = "gfx705", | |
| 2223 | .llvm_name = "gfx705", | |
| 2224 | .features = featureSet(&[_]Feature{ | |
| 2225 | .ldsbankcount16, | |
| 2226 | .sea_islands, | |
| 2227 | }), | |
| 2228 | }; | |
| 2229 | pub const gfx801 = CpuModel{ | |
| 2230 | .name = "gfx801", | |
| 2231 | .llvm_name = "gfx801", | |
| 2232 | .features = featureSet(&[_]Feature{ | |
| 2233 | .fast_fmaf, | |
| 2234 | .half_rate_64_ops, | |
| 2235 | .ldsbankcount32, | |
| 2236 | .unpacked_d16_vmem, | |
| 2237 | .volcanic_islands, | |
| 2238 | .xnack_support, | |
| 2239 | }), | |
| 2240 | }; | |
| 2241 | pub const gfx802 = CpuModel{ | |
| 2242 | .name = "gfx802", | |
| 2243 | .llvm_name = "gfx802", | |
| 2244 | .features = featureSet(&[_]Feature{ | |
| 2245 | .ldsbankcount32, | |
| 2246 | .sgpr_init_bug, | |
| 2247 | .unpacked_d16_vmem, | |
| 2248 | .volcanic_islands, | |
| 2249 | }), | |
| 2250 | }; | |
| 2251 | pub const gfx803 = CpuModel{ | |
| 2252 | .name = "gfx803", | |
| 2253 | .llvm_name = "gfx803", | |
| 2254 | .features = featureSet(&[_]Feature{ | |
| 2255 | .ldsbankcount32, | |
| 2256 | .unpacked_d16_vmem, | |
| 2257 | .volcanic_islands, | |
| 2258 | }), | |
| 2259 | }; | |
| 2260 | pub const gfx805 = CpuModel{ | |
| 2261 | .name = "gfx805", | |
| 2262 | .llvm_name = "gfx805", | |
| 2263 | .features = featureSet(&[_]Feature{ | |
| 2264 | .ldsbankcount32, | |
| 2265 | .sgpr_init_bug, | |
| 2266 | .unpacked_d16_vmem, | |
| 2267 | .volcanic_islands, | |
| 2268 | }), | |
| 2269 | }; | |
| 2270 | pub const gfx810 = CpuModel{ | |
| 2271 | .name = "gfx810", | |
| 2272 | .llvm_name = "gfx810", | |
| 2273 | .features = featureSet(&[_]Feature{ | |
| 2274 | .image_gather4_d16_bug, | |
| 2275 | .image_store_d16_bug, | |
| 2276 | .ldsbankcount16, | |
| 2277 | .volcanic_islands, | |
| 2278 | .xnack_support, | |
| 2279 | }), | |
| 2280 | }; | |
| 2281 | pub const gfx900 = CpuModel{ | |
| 2282 | .name = "gfx900", | |
| 2283 | .llvm_name = "gfx900", | |
| 2284 | .features = featureSet(&[_]Feature{ | |
| 2285 | .ds_src2_insts, | |
| 2286 | .extended_image_insts, | |
| 2287 | .gds, | |
| 2288 | .gfx9, | |
| 2289 | .image_gather4_d16_bug, | |
| 2290 | .image_insts, | |
| 2291 | .ldsbankcount32, | |
| 2292 | .mad_mac_f32_insts, | |
| 2293 | .mad_mix_insts, | |
| 2294 | }), | |
| 2295 | }; | |
| 2296 | pub const gfx902 = CpuModel{ | |
| 2297 | .name = "gfx902", | |
| 2298 | .llvm_name = "gfx902", | |
| 2299 | .features = featureSet(&[_]Feature{ | |
| 2300 | .ds_src2_insts, | |
| 2301 | .extended_image_insts, | |
| 2302 | .gds, | |
| 2303 | .gfx9, | |
| 2304 | .image_gather4_d16_bug, | |
| 2305 | .image_insts, | |
| 2306 | .ldsbankcount32, | |
| 2307 | .mad_mac_f32_insts, | |
| 2308 | .mad_mix_insts, | |
| 2309 | }), | |
| 2310 | }; | |
| 2311 | pub const gfx904 = CpuModel{ | |
| 2312 | .name = "gfx904", | |
| 2313 | .llvm_name = "gfx904", | |
| 2314 | .features = featureSet(&[_]Feature{ | |
| 2315 | .ds_src2_insts, | |
| 2316 | .extended_image_insts, | |
| 2317 | .fma_mix_insts, | |
| 2318 | .gds, | |
| 2319 | .gfx9, | |
| 2320 | .image_gather4_d16_bug, | |
| 2321 | .image_insts, | |
| 2322 | .ldsbankcount32, | |
| 2323 | .mad_mac_f32_insts, | |
| 2324 | }), | |
| 2325 | }; | |
| 2326 | pub const gfx906 = CpuModel{ | |
| 2327 | .name = "gfx906", | |
| 2328 | .llvm_name = "gfx906", | |
| 2329 | .features = featureSet(&[_]Feature{ | |
| 2330 | .dl_insts, | |
| 2331 | .dot10_insts, | |
| 2332 | .dot1_insts, | |
| 2333 | .dot2_insts, | |
| 2334 | .dot7_insts, | |
| 2335 | .ds_src2_insts, | |
| 2336 | .extended_image_insts, | |
| 2337 | .fma_mix_insts, | |
| 2338 | .gds, | |
| 2339 | .gfx9, | |
| 2340 | .half_rate_64_ops, | |
| 2341 | .image_gather4_d16_bug, | |
| 2342 | .image_insts, | |
| 2343 | .ldsbankcount32, | |
| 2344 | .mad_mac_f32_insts, | |
| 2345 | .sramecc_support, | |
| 2346 | }), | |
| 2347 | }; | |
| 2348 | pub const gfx908 = CpuModel{ | |
| 2349 | .name = "gfx908", | |
| 2350 | .llvm_name = "gfx908", | |
| 2351 | .features = featureSet(&[_]Feature{ | |
| 2352 | .atomic_buffer_global_pk_add_f16_no_rtn_insts, | |
| 2353 | .atomic_fadd_no_rtn_insts, | |
| 2354 | .dl_insts, | |
| 2355 | .dot10_insts, | |
| 2356 | .dot1_insts, | |
| 2357 | .dot2_insts, | |
| 2358 | .dot3_insts, | |
| 2359 | .dot4_insts, | |
| 2360 | .dot5_insts, | |
| 2361 | .dot6_insts, | |
| 2362 | .dot7_insts, | |
| 2363 | .ds_src2_insts, | |
| 2364 | .extended_image_insts, | |
| 2365 | .fma_mix_insts, | |
| 2366 | .gds, | |
| 2367 | .gfx9, | |
| 2368 | .half_rate_64_ops, | |
| 2369 | .image_gather4_d16_bug, | |
| 2370 | .image_insts, | |
| 2371 | .ldsbankcount32, | |
| 2372 | .mad_mac_f32_insts, | |
| 2373 | .mai_insts, | |
| 2374 | .mfma_inline_literal_bug, | |
| 2375 | .pk_fmac_f16_inst, | |
| 2376 | .sramecc_support, | |
| 2377 | }), | |
| 2378 | }; | |
| 2379 | pub const gfx909 = CpuModel{ | |
| 2380 | .name = "gfx909", | |
| 2381 | .llvm_name = "gfx909", | |
| 2382 | .features = featureSet(&[_]Feature{ | |
| 2383 | .ds_src2_insts, | |
| 2384 | .extended_image_insts, | |
| 2385 | .gds, | |
| 2386 | .gfx9, | |
| 2387 | .image_gather4_d16_bug, | |
| 2388 | .image_insts, | |
| 2389 | .ldsbankcount32, | |
| 2390 | .mad_mac_f32_insts, | |
| 2391 | .mad_mix_insts, | |
| 2392 | }), | |
| 2393 | }; | |
| 2394 | pub const gfx90a = CpuModel{ | |
| 2395 | .name = "gfx90a", | |
| 2396 | .llvm_name = "gfx90a", | |
| 2397 | .features = featureSet(&[_]Feature{ | |
| 2398 | .atomic_buffer_global_pk_add_f16_insts, | |
| 2399 | .atomic_fadd_no_rtn_insts, | |
| 2400 | .atomic_fadd_rtn_insts, | |
| 2401 | .atomic_fmin_fmax_flat_f64, | |
| 2402 | .atomic_fmin_fmax_global_f64, | |
| 2403 | .back_off_barrier, | |
| 2404 | .dl_insts, | |
| 2405 | .dot10_insts, | |
| 2406 | .dot1_insts, | |
| 2407 | .dot2_insts, | |
| 2408 | .dot3_insts, | |
| 2409 | .dot4_insts, | |
| 2410 | .dot5_insts, | |
| 2411 | .dot6_insts, | |
| 2412 | .dot7_insts, | |
| 2413 | .dpp_64bit, | |
| 2414 | .flat_buffer_global_fadd_f64_inst, | |
| 2415 | .fma_mix_insts, | |
| 2416 | .fmacf64_inst, | |
| 2417 | .full_rate_64_ops, | |
| 2418 | .gfx9, | |
| 2419 | .gfx90a_insts, | |
| 2420 | .image_insts, | |
| 2421 | .kernarg_preload, | |
| 2422 | .ldsbankcount32, | |
| 2423 | .mad_mac_f32_insts, | |
| 2424 | .mai_insts, | |
| 2425 | .packed_fp32_ops, | |
| 2426 | .packed_tid, | |
| 2427 | .pk_fmac_f16_inst, | |
| 2428 | .sramecc_support, | |
| 2429 | }), | |
| 2430 | }; | |
| 2431 | pub const gfx90c = CpuModel{ | |
| 2432 | .name = "gfx90c", | |
| 2433 | .llvm_name = "gfx90c", | |
| 2434 | .features = featureSet(&[_]Feature{ | |
| 2435 | .ds_src2_insts, | |
| 2436 | .extended_image_insts, | |
| 2437 | .gds, | |
| 2438 | .gfx9, | |
| 2439 | .image_gather4_d16_bug, | |
| 2440 | .image_insts, | |
| 2441 | .ldsbankcount32, | |
| 2442 | .mad_mac_f32_insts, | |
| 2443 | .mad_mix_insts, | |
| 2444 | }), | |
| 2445 | }; | |
| 2446 | pub const gfx940 = CpuModel{ | |
| 2447 | .name = "gfx940", | |
| 2448 | .llvm_name = "gfx940", | |
| 2449 | .features = featureSet(&[_]Feature{ | |
| 2450 | .agent_scope_fine_grained_remote_memory_atomics, | |
| 2451 | .architected_flat_scratch, | |
| 2452 | .atomic_buffer_global_pk_add_f16_insts, | |
| 2453 | .atomic_ds_pk_add_16_insts, | |
| 2454 | .atomic_fadd_no_rtn_insts, | |
| 2455 | .atomic_fadd_rtn_insts, | |
| 2456 | .atomic_flat_pk_add_16_insts, | |
| 2457 | .atomic_fmin_fmax_flat_f64, | |
| 2458 | .atomic_fmin_fmax_global_f64, | |
| 2459 | .atomic_global_pk_add_bf16_inst, | |
| 2460 | .back_off_barrier, | |
| 2461 | .dl_insts, | |
| 2462 | .dot10_insts, | |
| 2463 | .dot1_insts, | |
| 2464 | .dot2_insts, | |
| 2465 | .dot3_insts, | |
| 2466 | .dot4_insts, | |
| 2467 | .dot5_insts, | |
| 2468 | .dot6_insts, | |
| 2469 | .dot7_insts, | |
| 2470 | .dpp_64bit, | |
| 2471 | .flat_atomic_fadd_f32_inst, | |
| 2472 | .flat_buffer_global_fadd_f64_inst, | |
| 2473 | .fma_mix_insts, | |
| 2474 | .fmacf64_inst, | |
| 2475 | .force_store_sc0_sc1, | |
| 2476 | .fp8_conversion_insts, | |
| 2477 | .fp8_insts, | |
| 2478 | .full_rate_64_ops, | |
| 2479 | .gfx9, | |
| 2480 | .gfx90a_insts, | |
| 2481 | .gfx940_insts, | |
| 2482 | .kernarg_preload, | |
| 2483 | .ldsbankcount32, | |
| 2484 | .mai_insts, | |
| 2485 | .memory_atomic_fadd_f32_denormal_support, | |
| 2486 | .packed_fp32_ops, | |
| 2487 | .packed_tid, | |
| 2488 | .pk_fmac_f16_inst, | |
| 2489 | .sramecc_support, | |
| 2490 | }), | |
| 2491 | }; | |
| 2492 | pub const gfx941 = CpuModel{ | |
| 2493 | .name = "gfx941", | |
| 2494 | .llvm_name = "gfx941", | |
| 2495 | .features = featureSet(&[_]Feature{ | |
| 2496 | .agent_scope_fine_grained_remote_memory_atomics, | |
| 2497 | .architected_flat_scratch, | |
| 2498 | .atomic_buffer_global_pk_add_f16_insts, | |
| 2499 | .atomic_ds_pk_add_16_insts, | |
| 2500 | .atomic_fadd_no_rtn_insts, | |
| 2501 | .atomic_fadd_rtn_insts, | |
| 2502 | .atomic_flat_pk_add_16_insts, | |
| 2503 | .atomic_fmin_fmax_flat_f64, | |
| 2504 | .atomic_fmin_fmax_global_f64, | |
| 2505 | .atomic_global_pk_add_bf16_inst, | |
| 2506 | .back_off_barrier, | |
| 2507 | .dl_insts, | |
| 2508 | .dot10_insts, | |
| 2509 | .dot1_insts, | |
| 2510 | .dot2_insts, | |
| 2511 | .dot3_insts, | |
| 2512 | .dot4_insts, | |
| 2513 | .dot5_insts, | |
| 2514 | .dot6_insts, | |
| 2515 | .dot7_insts, | |
| 2516 | .dpp_64bit, | |
| 2517 | .flat_atomic_fadd_f32_inst, | |
| 2518 | .flat_buffer_global_fadd_f64_inst, | |
| 2519 | .fma_mix_insts, | |
| 2520 | .fmacf64_inst, | |
| 2521 | .force_store_sc0_sc1, | |
| 2522 | .fp8_conversion_insts, | |
| 2523 | .fp8_insts, | |
| 2524 | .full_rate_64_ops, | |
| 2525 | .gfx9, | |
| 2526 | .gfx90a_insts, | |
| 2527 | .gfx940_insts, | |
| 2528 | .kernarg_preload, | |
| 2529 | .ldsbankcount32, | |
| 2530 | .mai_insts, | |
| 2531 | .memory_atomic_fadd_f32_denormal_support, | |
| 2532 | .packed_fp32_ops, | |
| 2533 | .packed_tid, | |
| 2534 | .pk_fmac_f16_inst, | |
| 2535 | .sramecc_support, | |
| 2536 | }), | |
| 2537 | }; | |
| 2538 | pub const gfx942 = CpuModel{ | |
| 2539 | .name = "gfx942", | |
| 2540 | .llvm_name = "gfx942", | |
| 2541 | .features = featureSet(&[_]Feature{ | |
| 2542 | .agent_scope_fine_grained_remote_memory_atomics, | |
| 2543 | .architected_flat_scratch, | |
| 2544 | .atomic_buffer_global_pk_add_f16_insts, | |
| 2545 | .atomic_ds_pk_add_16_insts, | |
| 2546 | .atomic_fadd_no_rtn_insts, | |
| 2547 | .atomic_fadd_rtn_insts, | |
| 2548 | .atomic_flat_pk_add_16_insts, | |
| 2549 | .atomic_fmin_fmax_flat_f64, | |
| 2550 | .atomic_fmin_fmax_global_f64, | |
| 2551 | .atomic_global_pk_add_bf16_inst, | |
| 2552 | .back_off_barrier, | |
| 2553 | .dl_insts, | |
| 2554 | .dot10_insts, | |
| 2555 | .dot1_insts, | |
| 2556 | .dot2_insts, | |
| 2557 | .dot3_insts, | |
| 2558 | .dot4_insts, | |
| 2559 | .dot5_insts, | |
| 2560 | .dot6_insts, | |
| 2561 | .dot7_insts, | |
| 2562 | .dpp_64bit, | |
| 2563 | .flat_atomic_fadd_f32_inst, | |
| 2564 | .flat_buffer_global_fadd_f64_inst, | |
| 2565 | .fma_mix_insts, | |
| 2566 | .fmacf64_inst, | |
| 2567 | .fp8_conversion_insts, | |
| 2568 | .fp8_insts, | |
| 2569 | .full_rate_64_ops, | |
| 2570 | .gfx9, | |
| 2571 | .gfx90a_insts, | |
| 2572 | .gfx940_insts, | |
| 2573 | .kernarg_preload, | |
| 2574 | .ldsbankcount32, | |
| 2575 | .mai_insts, | |
| 2576 | .memory_atomic_fadd_f32_denormal_support, | |
| 2577 | .packed_fp32_ops, | |
| 2578 | .packed_tid, | |
| 2579 | .pk_fmac_f16_inst, | |
| 2580 | .sramecc_support, | |
| 2581 | }), | |
| 2582 | }; | |
| 2583 | pub const gfx9_generic = CpuModel{ | |
| 2584 | .name = "gfx9_generic", | |
| 2585 | .llvm_name = "gfx9-generic", | |
| 2586 | .features = featureSet(&[_]Feature{ | |
| 2587 | .ds_src2_insts, | |
| 2588 | .extended_image_insts, | |
| 2589 | .gds, | |
| 2590 | .gfx9, | |
| 2591 | .image_gather4_d16_bug, | |
| 2592 | .image_insts, | |
| 2593 | .ldsbankcount32, | |
| 2594 | .mad_mac_f32_insts, | |
| 2595 | .requires_cov6, | |
| 2596 | }), | |
| 2597 | }; | |
| 2598 | pub const hainan = CpuModel{ | |
| 2599 | .name = "hainan", | |
| 2600 | .llvm_name = "hainan", | |
| 2601 | .features = featureSet(&[_]Feature{ | |
| 2602 | .southern_islands, | |
| 2603 | }), | |
| 2604 | }; | |
| 2605 | pub const hawaii = CpuModel{ | |
| 2606 | .name = "hawaii", | |
| 2607 | .llvm_name = "hawaii", | |
| 2608 | .features = featureSet(&[_]Feature{ | |
| 2609 | .fast_fmaf, | |
| 2610 | .half_rate_64_ops, | |
| 2611 | .ldsbankcount32, | |
| 2612 | .sea_islands, | |
| 2613 | }), | |
| 2614 | }; | |
| 2615 | pub const iceland = CpuModel{ | |
| 2616 | .name = "iceland", | |
| 2617 | .llvm_name = "iceland", | |
| 2618 | .features = featureSet(&[_]Feature{ | |
| 2619 | .ldsbankcount32, | |
| 2620 | .sgpr_init_bug, | |
| 2621 | .unpacked_d16_vmem, | |
| 2622 | .volcanic_islands, | |
| 2623 | }), | |
| 2624 | }; | |
| 2625 | pub const kabini = CpuModel{ | |
| 2626 | .name = "kabini", | |
| 2627 | .llvm_name = "kabini", | |
| 2628 | .features = featureSet(&[_]Feature{ | |
| 2629 | .ldsbankcount16, | |
| 2630 | .sea_islands, | |
| 2631 | }), | |
| 2632 | }; | |
| 2633 | pub const kaveri = CpuModel{ | |
| 2634 | .name = "kaveri", | |
| 2635 | .llvm_name = "kaveri", | |
| 2636 | .features = featureSet(&[_]Feature{ | |
| 2637 | .ldsbankcount32, | |
| 2638 | .sea_islands, | |
| 2639 | }), | |
| 2640 | }; | |
| 2641 | pub const mullins = CpuModel{ | |
| 2642 | .name = "mullins", | |
| 2643 | .llvm_name = "mullins", | |
| 2644 | .features = featureSet(&[_]Feature{ | |
| 2645 | .ldsbankcount16, | |
| 2646 | .sea_islands, | |
| 2647 | }), | |
| 2648 | }; | |
| 2649 | pub const oland = CpuModel{ | |
| 2650 | .name = "oland", | |
| 2651 | .llvm_name = "oland", | |
| 2652 | .features = featureSet(&[_]Feature{ | |
| 2653 | .southern_islands, | |
| 2654 | }), | |
| 2655 | }; | |
| 2656 | pub const pitcairn = CpuModel{ | |
| 2657 | .name = "pitcairn", | |
| 2658 | .llvm_name = "pitcairn", | |
| 2659 | .features = featureSet(&[_]Feature{ | |
| 2660 | .southern_islands, | |
| 2661 | }), | |
| 2662 | }; | |
| 2663 | pub const polaris10 = CpuModel{ | |
| 2664 | .name = "polaris10", | |
| 2665 | .llvm_name = "polaris10", | |
| 2666 | .features = featureSet(&[_]Feature{ | |
| 2667 | .ldsbankcount32, | |
| 2668 | .unpacked_d16_vmem, | |
| 2669 | .volcanic_islands, | |
| 2670 | }), | |
| 2671 | }; | |
| 2672 | pub const polaris11 = CpuModel{ | |
| 2673 | .name = "polaris11", | |
| 2674 | .llvm_name = "polaris11", | |
| 2675 | .features = featureSet(&[_]Feature{ | |
| 2676 | .ldsbankcount32, | |
| 2677 | .unpacked_d16_vmem, | |
| 2678 | .volcanic_islands, | |
| 2679 | }), | |
| 2680 | }; | |
| 2681 | pub const stoney = CpuModel{ | |
| 2682 | .name = "stoney", | |
| 2683 | .llvm_name = "stoney", | |
| 2684 | .features = featureSet(&[_]Feature{ | |
| 2685 | .image_gather4_d16_bug, | |
| 2686 | .image_store_d16_bug, | |
| 2687 | .ldsbankcount16, | |
| 2688 | .volcanic_islands, | |
| 2689 | .xnack_support, | |
| 2690 | }), | |
| 2691 | }; | |
| 2692 | pub const tahiti = CpuModel{ | |
| 2693 | .name = "tahiti", | |
| 2694 | .llvm_name = "tahiti", | |
| 2695 | .features = featureSet(&[_]Feature{ | |
| 2696 | .fast_fmaf, | |
| 2697 | .half_rate_64_ops, | |
| 2698 | .southern_islands, | |
| 2699 | }), | |
| 2700 | }; | |
| 2701 | pub const tonga = CpuModel{ | |
| 2702 | .name = "tonga", | |
| 2703 | .llvm_name = "tonga", | |
| 2704 | .features = featureSet(&[_]Feature{ | |
| 2705 | .ldsbankcount32, | |
| 2706 | .sgpr_init_bug, | |
| 2707 | .unpacked_d16_vmem, | |
| 2708 | .volcanic_islands, | |
| 2709 | }), | |
| 2710 | }; | |
| 2711 | pub const tongapro = CpuModel{ | |
| 2712 | .name = "tongapro", | |
| 2713 | .llvm_name = "tongapro", | |
| 2714 | .features = featureSet(&[_]Feature{ | |
| 2715 | .ldsbankcount32, | |
| 2716 | .sgpr_init_bug, | |
| 2717 | .unpacked_d16_vmem, | |
| 2718 | .volcanic_islands, | |
| 2719 | }), | |
| 2720 | }; | |
| 2721 | pub const verde = CpuModel{ | |
| 2722 | .name = "verde", | |
| 2723 | .llvm_name = "verde", | |
| 2724 | .features = featureSet(&[_]Feature{ | |
| 2725 | .southern_islands, | |
| 2726 | }), | |
| 2727 | }; | |
| 2728 | }; |
lib/std/Target/amdgpu.zig deleted-2728| ... | ... | @@ -1,2728 +0,0 @@ |
| 1 | //! This file is auto-generated by tools/update_cpu_features.zig. | |
| 2 | ||
| 3 | const std = @import("../std.zig"); | |
| 4 | const CpuFeature = std.Target.Cpu.Feature; | |
| 5 | const CpuModel = std.Target.Cpu.Model; | |
| 6 | ||
| 7 | pub const Feature = enum { | |
| 8 | @"16_bit_insts", | |
| 9 | a16, | |
| 10 | add_no_carry_insts, | |
| 11 | agent_scope_fine_grained_remote_memory_atomics, | |
| 12 | allocate1_5xvgprs, | |
| 13 | aperture_regs, | |
| 14 | architected_flat_scratch, | |
| 15 | architected_sgprs, | |
| 16 | atomic_buffer_global_pk_add_f16_insts, | |
| 17 | atomic_buffer_global_pk_add_f16_no_rtn_insts, | |
| 18 | atomic_buffer_pk_add_bf16_inst, | |
| 19 | atomic_csub_no_rtn_insts, | |
| 20 | atomic_ds_pk_add_16_insts, | |
| 21 | atomic_fadd_no_rtn_insts, | |
| 22 | atomic_fadd_rtn_insts, | |
| 23 | atomic_flat_pk_add_16_insts, | |
| 24 | atomic_fmin_fmax_flat_f32, | |
| 25 | atomic_fmin_fmax_flat_f64, | |
| 26 | atomic_fmin_fmax_global_f32, | |
| 27 | atomic_fmin_fmax_global_f64, | |
| 28 | atomic_global_pk_add_bf16_inst, | |
| 29 | auto_waitcnt_before_barrier, | |
| 30 | back_off_barrier, | |
| 31 | ci_insts, | |
| 32 | cumode, | |
| 33 | default_component_broadcast, | |
| 34 | default_component_zero, | |
| 35 | dl_insts, | |
| 36 | dot10_insts, | |
| 37 | dot11_insts, | |
| 38 | dot1_insts, | |
| 39 | dot2_insts, | |
| 40 | dot3_insts, | |
| 41 | dot4_insts, | |
| 42 | dot5_insts, | |
| 43 | dot6_insts, | |
| 44 | dot7_insts, | |
| 45 | dot8_insts, | |
| 46 | dot9_insts, | |
| 47 | dpp, | |
| 48 | dpp8, | |
| 49 | dpp_64bit, | |
| 50 | dpp_src1_sgpr, | |
| 51 | ds128, | |
| 52 | ds_src2_insts, | |
| 53 | extended_image_insts, | |
| 54 | fast_denormal_f32, | |
| 55 | fast_fmaf, | |
| 56 | flat_address_space, | |
| 57 | flat_atomic_fadd_f32_inst, | |
| 58 | flat_buffer_global_fadd_f64_inst, | |
| 59 | flat_for_global, | |
| 60 | flat_global_insts, | |
| 61 | flat_inst_offsets, | |
| 62 | flat_scratch, | |
| 63 | flat_scratch_insts, | |
| 64 | flat_segment_offset_bug, | |
| 65 | fma_mix_insts, | |
| 66 | fmacf64_inst, | |
| 67 | fmaf, | |
| 68 | force_store_sc0_sc1, | |
| 69 | fp64, | |
| 70 | fp8_conversion_insts, | |
| 71 | fp8_insts, | |
| 72 | full_rate_64_ops, | |
| 73 | g16, | |
| 74 | gcn3_encoding, | |
| 75 | gds, | |
| 76 | get_wave_id_inst, | |
| 77 | gfx10, | |
| 78 | gfx10_3_insts, | |
| 79 | gfx10_a_encoding, | |
| 80 | gfx10_b_encoding, | |
| 81 | gfx10_insts, | |
| 82 | gfx11, | |
| 83 | gfx11_insts, | |
| 84 | gfx12, | |
| 85 | gfx12_insts, | |
| 86 | gfx7_gfx8_gfx9_insts, | |
| 87 | gfx8_insts, | |
| 88 | gfx9, | |
| 89 | gfx90a_insts, | |
| 90 | gfx940_insts, | |
| 91 | gfx9_insts, | |
| 92 | gws, | |
| 93 | half_rate_64_ops, | |
| 94 | image_gather4_d16_bug, | |
| 95 | image_insts, | |
| 96 | image_store_d16_bug, | |
| 97 | inst_fwd_prefetch_bug, | |
| 98 | int_clamp_insts, | |
| 99 | inv_2pi_inline_imm, | |
| 100 | kernarg_preload, | |
| 101 | lds_branch_vmem_war_hazard, | |
| 102 | lds_misaligned_bug, | |
| 103 | ldsbankcount16, | |
| 104 | ldsbankcount32, | |
| 105 | load_store_opt, | |
| 106 | localmemorysize32768, | |
| 107 | localmemorysize65536, | |
| 108 | mad_intra_fwd_bug, | |
| 109 | mad_mac_f32_insts, | |
| 110 | mad_mix_insts, | |
| 111 | mai_insts, | |
| 112 | max_hard_clause_length_32, | |
| 113 | max_hard_clause_length_63, | |
| 114 | max_private_element_size_16, | |
| 115 | max_private_element_size_4, | |
| 116 | max_private_element_size_8, | |
| 117 | memory_atomic_fadd_f32_denormal_support, | |
| 118 | mfma_inline_literal_bug, | |
| 119 | mimg_r128, | |
| 120 | movrel, | |
| 121 | msaa_load_dst_sel_bug, | |
| 122 | negative_scratch_offset_bug, | |
| 123 | negative_unaligned_scratch_offset_bug, | |
| 124 | no_data_dep_hazard, | |
| 125 | no_sdst_cmpx, | |
| 126 | nsa_clause_bug, | |
| 127 | nsa_encoding, | |
| 128 | nsa_to_vmem_bug, | |
| 129 | offset_3f_bug, | |
| 130 | packed_fp32_ops, | |
| 131 | packed_tid, | |
| 132 | partial_nsa_encoding, | |
| 133 | pk_fmac_f16_inst, | |
| 134 | precise_memory, | |
| 135 | priv_enabled_trap2_nop_bug, | |
| 136 | promote_alloca, | |
| 137 | prt_strict_null, | |
| 138 | pseudo_scalar_trans, | |
| 139 | r128_a16, | |
| 140 | real_true16, | |
| 141 | required_export_priority, | |
| 142 | requires_cov6, | |
| 143 | restricted_soffset, | |
| 144 | s_memrealtime, | |
| 145 | s_memtime_inst, | |
| 146 | salu_float, | |
| 147 | scalar_atomics, | |
| 148 | scalar_dwordx3_loads, | |
| 149 | scalar_flat_scratch_insts, | |
| 150 | scalar_stores, | |
| 151 | sdwa, | |
| 152 | sdwa_mav, | |
| 153 | sdwa_omod, | |
| 154 | sdwa_out_mods_vopc, | |
| 155 | sdwa_scalar, | |
| 156 | sdwa_sdst, | |
| 157 | sea_islands, | |
| 158 | sgpr_init_bug, | |
| 159 | shader_cycles_hi_lo_registers, | |
| 160 | shader_cycles_register, | |
| 161 | si_scheduler, | |
| 162 | smem_to_vector_write_hazard, | |
| 163 | southern_islands, | |
| 164 | sramecc, | |
| 165 | sramecc_support, | |
| 166 | tgsplit, | |
| 167 | trap_handler, | |
| 168 | trig_reduced_range, | |
| 169 | true16, | |
| 170 | unaligned_access_mode, | |
| 171 | unaligned_buffer_access, | |
| 172 | unaligned_ds_access, | |
| 173 | unaligned_scratch_access, | |
| 174 | unpacked_d16_vmem, | |
| 175 | unsafe_ds_offset_folding, | |
| 176 | user_sgpr_init16_bug, | |
| 177 | valu_trans_use_hazard, | |
| 178 | vcmpx_exec_war_hazard, | |
| 179 | vcmpx_permlane_hazard, | |
| 180 | vgpr_index_mode, | |
| 181 | vgpr_singleuse_hint, | |
| 182 | vmem_to_scalar_write_hazard, | |
| 183 | vmem_write_vgpr_in_order, | |
| 184 | volcanic_islands, | |
| 185 | vop3_literal, | |
| 186 | vop3p, | |
| 187 | vopd, | |
| 188 | vscnt, | |
| 189 | wavefrontsize16, | |
| 190 | wavefrontsize32, | |
| 191 | wavefrontsize64, | |
| 192 | xnack, | |
| 193 | xnack_support, | |
| 194 | }; | |
| 195 | ||
| 196 | pub const featureSet = CpuFeature.FeatureSetFns(Feature).featureSet; | |
| 197 | pub const featureSetHas = CpuFeature.FeatureSetFns(Feature).featureSetHas; | |
| 198 | pub const featureSetHasAny = CpuFeature.FeatureSetFns(Feature).featureSetHasAny; | |
| 199 | pub const featureSetHasAll = CpuFeature.FeatureSetFns(Feature).featureSetHasAll; | |
| 200 | ||
| 201 | pub const all_features = blk: { | |
| 202 | const len = @typeInfo(Feature).@"enum".fields.len; | |
| 203 | std.debug.assert(len <= CpuFeature.Set.needed_bit_count); | |
| 204 | var result: [len]CpuFeature = undefined; | |
| 205 | result[@intFromEnum(Feature.@"16_bit_insts")] = .{ | |
| 206 | .llvm_name = "16-bit-insts", | |
| 207 | .description = "Has i16/f16 instructions", | |
| 208 | .dependencies = featureSet(&[_]Feature{}), | |
| 209 | }; | |
| 210 | result[@intFromEnum(Feature.a16)] = .{ | |
| 211 | .llvm_name = "a16", | |
| 212 | .description = "Support A16 for 16-bit coordinates/gradients/lod/clamp/mip image operands", | |
| 213 | .dependencies = featureSet(&[_]Feature{}), | |
| 214 | }; | |
| 215 | result[@intFromEnum(Feature.add_no_carry_insts)] = .{ | |
| 216 | .llvm_name = "add-no-carry-insts", | |
| 217 | .description = "Have VALU add/sub instructions without carry out", | |
| 218 | .dependencies = featureSet(&[_]Feature{}), | |
| 219 | }; | |
| 220 | result[@intFromEnum(Feature.agent_scope_fine_grained_remote_memory_atomics)] = .{ | |
| 221 | .llvm_name = "agent-scope-fine-grained-remote-memory-atomics", | |
| 222 | .description = "Agent (device) scoped atomic operations, excluding those directly supported by PCIe (i.e. integer atomic add, exchange, and compare-and-swap), are functional for allocations in host or peer device memory.", | |
| 223 | .dependencies = featureSet(&[_]Feature{}), | |
| 224 | }; | |
| 225 | result[@intFromEnum(Feature.allocate1_5xvgprs)] = .{ | |
| 226 | .llvm_name = "allocate1_5xvgprs", | |
| 227 | .description = "Has 50% more physical VGPRs and 50% larger allocation granule", | |
| 228 | .dependencies = featureSet(&[_]Feature{}), | |
| 229 | }; | |
| 230 | result[@intFromEnum(Feature.aperture_regs)] = .{ | |
| 231 | .llvm_name = "aperture-regs", | |
| 232 | .description = "Has Memory Aperture Base and Size Registers", | |
| 233 | .dependencies = featureSet(&[_]Feature{}), | |
| 234 | }; | |
| 235 | result[@intFromEnum(Feature.architected_flat_scratch)] = .{ | |
| 236 | .llvm_name = "architected-flat-scratch", | |
| 237 | .description = "Flat Scratch register is a readonly SPI initialized architected register", | |
| 238 | .dependencies = featureSet(&[_]Feature{}), | |
| 239 | }; | |
| 240 | result[@intFromEnum(Feature.architected_sgprs)] = .{ | |
| 241 | .llvm_name = "architected-sgprs", | |
| 242 | .description = "Enable the architected SGPRs", | |
| 243 | .dependencies = featureSet(&[_]Feature{}), | |
| 244 | }; | |
| 245 | result[@intFromEnum(Feature.atomic_buffer_global_pk_add_f16_insts)] = .{ | |
| 246 | .llvm_name = "atomic-buffer-global-pk-add-f16-insts", | |
| 247 | .description = "Has buffer_atomic_pk_add_f16 and global_atomic_pk_add_f16 instructions that can return original value", | |
| 248 | .dependencies = featureSet(&[_]Feature{ | |
| 249 | .flat_global_insts, | |
| 250 | }), | |
| 251 | }; | |
| 252 | result[@intFromEnum(Feature.atomic_buffer_global_pk_add_f16_no_rtn_insts)] = .{ | |
| 253 | .llvm_name = "atomic-buffer-global-pk-add-f16-no-rtn-insts", | |
| 254 | .description = "Has buffer_atomic_pk_add_f16 and global_atomic_pk_add_f16 instructions that don't return original value", | |
| 255 | .dependencies = featureSet(&[_]Feature{ | |
| 256 | .flat_global_insts, | |
| 257 | }), | |
| 258 | }; | |
| 259 | result[@intFromEnum(Feature.atomic_buffer_pk_add_bf16_inst)] = .{ | |
| 260 | .llvm_name = "atomic-buffer-pk-add-bf16-inst", | |
| 261 | .description = "Has buffer_atomic_pk_add_bf16 instruction", | |
| 262 | .dependencies = featureSet(&[_]Feature{}), | |
| 263 | }; | |
| 264 | result[@intFromEnum(Feature.atomic_csub_no_rtn_insts)] = .{ | |
| 265 | .llvm_name = "atomic-csub-no-rtn-insts", | |
| 266 | .description = "Has buffer_atomic_csub and global_atomic_csub instructions that don't return original value", | |
| 267 | .dependencies = featureSet(&[_]Feature{}), | |
| 268 | }; | |
| 269 | result[@intFromEnum(Feature.atomic_ds_pk_add_16_insts)] = .{ | |
| 270 | .llvm_name = "atomic-ds-pk-add-16-insts", | |
| 271 | .description = "Has ds_pk_add_bf16, ds_pk_add_f16, ds_pk_add_rtn_bf16, ds_pk_add_rtn_f16 instructions", | |
| 272 | .dependencies = featureSet(&[_]Feature{}), | |
| 273 | }; | |
| 274 | result[@intFromEnum(Feature.atomic_fadd_no_rtn_insts)] = .{ | |
| 275 | .llvm_name = "atomic-fadd-no-rtn-insts", | |
| 276 | .description = "Has buffer_atomic_add_f32 and global_atomic_add_f32 instructions that don't return original value", | |
| 277 | .dependencies = featureSet(&[_]Feature{ | |
| 278 | .flat_global_insts, | |
| 279 | }), | |
| 280 | }; | |
| 281 | result[@intFromEnum(Feature.atomic_fadd_rtn_insts)] = .{ | |
| 282 | .llvm_name = "atomic-fadd-rtn-insts", | |
| 283 | .description = "Has buffer_atomic_add_f32 and global_atomic_add_f32 instructions that return original value", | |
| 284 | .dependencies = featureSet(&[_]Feature{ | |
| 285 | .flat_global_insts, | |
| 286 | }), | |
| 287 | }; | |
| 288 | result[@intFromEnum(Feature.atomic_flat_pk_add_16_insts)] = .{ | |
| 289 | .llvm_name = "atomic-flat-pk-add-16-insts", | |
| 290 | .description = "Has flat_atomic_pk_add_f16 and flat_atomic_pk_add_bf16 instructions", | |
| 291 | .dependencies = featureSet(&[_]Feature{}), | |
| 292 | }; | |
| 293 | result[@intFromEnum(Feature.atomic_fmin_fmax_flat_f32)] = .{ | |
| 294 | .llvm_name = "atomic-fmin-fmax-flat-f32", | |
| 295 | .description = "Has flat memory instructions for atomicrmw fmin/fmax for float", | |
| 296 | .dependencies = featureSet(&[_]Feature{}), | |
| 297 | }; | |
| 298 | result[@intFromEnum(Feature.atomic_fmin_fmax_flat_f64)] = .{ | |
| 299 | .llvm_name = "atomic-fmin-fmax-flat-f64", | |
| 300 | .description = "Has flat memory instructions for atomicrmw fmin/fmax for double", | |
| 301 | .dependencies = featureSet(&[_]Feature{}), | |
| 302 | }; | |
| 303 | result[@intFromEnum(Feature.atomic_fmin_fmax_global_f32)] = .{ | |
| 304 | .llvm_name = "atomic-fmin-fmax-global-f32", | |
| 305 | .description = "Has global/buffer instructions for atomicrmw fmin/fmax for float", | |
| 306 | .dependencies = featureSet(&[_]Feature{}), | |
| 307 | }; | |
| 308 | result[@intFromEnum(Feature.atomic_fmin_fmax_global_f64)] = .{ | |
| 309 | .llvm_name = "atomic-fmin-fmax-global-f64", | |
| 310 | .description = "Has global/buffer instructions for atomicrmw fmin/fmax for float", | |
| 311 | .dependencies = featureSet(&[_]Feature{}), | |
| 312 | }; | |
| 313 | result[@intFromEnum(Feature.atomic_global_pk_add_bf16_inst)] = .{ | |
| 314 | .llvm_name = "atomic-global-pk-add-bf16-inst", | |
| 315 | .description = "Has global_atomic_pk_add_bf16 instruction", | |
| 316 | .dependencies = featureSet(&[_]Feature{ | |
| 317 | .flat_global_insts, | |
| 318 | }), | |
| 319 | }; | |
| 320 | result[@intFromEnum(Feature.auto_waitcnt_before_barrier)] = .{ | |
| 321 | .llvm_name = "auto-waitcnt-before-barrier", | |
| 322 | .description = "Hardware automatically inserts waitcnt before barrier", | |
| 323 | .dependencies = featureSet(&[_]Feature{}), | |
| 324 | }; | |
| 325 | result[@intFromEnum(Feature.back_off_barrier)] = .{ | |
| 326 | .llvm_name = "back-off-barrier", | |
| 327 | .description = "Hardware supports backing off s_barrier if an exception occurs", | |
| 328 | .dependencies = featureSet(&[_]Feature{}), | |
| 329 | }; | |
| 330 | result[@intFromEnum(Feature.ci_insts)] = .{ | |
| 331 | .llvm_name = "ci-insts", | |
| 332 | .description = "Additional instructions for CI+", | |
| 333 | .dependencies = featureSet(&[_]Feature{}), | |
| 334 | }; | |
| 335 | result[@intFromEnum(Feature.cumode)] = .{ | |
| 336 | .llvm_name = "cumode", | |
| 337 | .description = "Enable CU wavefront execution mode", | |
| 338 | .dependencies = featureSet(&[_]Feature{}), | |
| 339 | }; | |
| 340 | result[@intFromEnum(Feature.default_component_broadcast)] = .{ | |
| 341 | .llvm_name = "default-component-broadcast", | |
| 342 | .description = "BUFFER/IMAGE store instructions set unspecified components to x component (GFX12)", | |
| 343 | .dependencies = featureSet(&[_]Feature{}), | |
| 344 | }; | |
| 345 | result[@intFromEnum(Feature.default_component_zero)] = .{ | |
| 346 | .llvm_name = "default-component-zero", | |
| 347 | .description = "BUFFER/IMAGE store instructions set unspecified components to zero (before GFX12)", | |
| 348 | .dependencies = featureSet(&[_]Feature{}), | |
| 349 | }; | |
| 350 | result[@intFromEnum(Feature.dl_insts)] = .{ | |
| 351 | .llvm_name = "dl-insts", | |
| 352 | .description = "Has v_fmac_f32 and v_xnor_b32 instructions", | |
| 353 | .dependencies = featureSet(&[_]Feature{}), | |
| 354 | }; | |
| 355 | result[@intFromEnum(Feature.dot10_insts)] = .{ | |
| 356 | .llvm_name = "dot10-insts", | |
| 357 | .description = "Has v_dot2_f32_f16 instruction", | |
| 358 | .dependencies = featureSet(&[_]Feature{}), | |
| 359 | }; | |
| 360 | result[@intFromEnum(Feature.dot11_insts)] = .{ | |
| 361 | .llvm_name = "dot11-insts", | |
| 362 | .description = "Has v_dot4_f32_fp8_fp8, v_dot4_f32_fp8_bf8, v_dot4_f32_bf8_fp8, v_dot4_f32_bf8_bf8 instructions", | |
| 363 | .dependencies = featureSet(&[_]Feature{}), | |
| 364 | }; | |
| 365 | result[@intFromEnum(Feature.dot1_insts)] = .{ | |
| 366 | .llvm_name = "dot1-insts", | |
| 367 | .description = "Has v_dot4_i32_i8 and v_dot8_i32_i4 instructions", | |
| 368 | .dependencies = featureSet(&[_]Feature{}), | |
| 369 | }; | |
| 370 | result[@intFromEnum(Feature.dot2_insts)] = .{ | |
| 371 | .llvm_name = "dot2-insts", | |
| 372 | .description = "Has v_dot2_i32_i16, v_dot2_u32_u16 instructions", | |
| 373 | .dependencies = featureSet(&[_]Feature{}), | |
| 374 | }; | |
| 375 | result[@intFromEnum(Feature.dot3_insts)] = .{ | |
| 376 | .llvm_name = "dot3-insts", | |
| 377 | .description = "Has v_dot8c_i32_i4 instruction", | |
| 378 | .dependencies = featureSet(&[_]Feature{}), | |
| 379 | }; | |
| 380 | result[@intFromEnum(Feature.dot4_insts)] = .{ | |
| 381 | .llvm_name = "dot4-insts", | |
| 382 | .description = "Has v_dot2c_i32_i16 instruction", | |
| 383 | .dependencies = featureSet(&[_]Feature{}), | |
| 384 | }; | |
| 385 | result[@intFromEnum(Feature.dot5_insts)] = .{ | |
| 386 | .llvm_name = "dot5-insts", | |
| 387 | .description = "Has v_dot2c_f32_f16 instruction", | |
| 388 | .dependencies = featureSet(&[_]Feature{}), | |
| 389 | }; | |
| 390 | result[@intFromEnum(Feature.dot6_insts)] = .{ | |
| 391 | .llvm_name = "dot6-insts", | |
| 392 | .description = "Has v_dot4c_i32_i8 instruction", | |
| 393 | .dependencies = featureSet(&[_]Feature{}), | |
| 394 | }; | |
| 395 | result[@intFromEnum(Feature.dot7_insts)] = .{ | |
| 396 | .llvm_name = "dot7-insts", | |
| 397 | .description = "Has v_dot4_u32_u8, v_dot8_u32_u4 instructions", | |
| 398 | .dependencies = featureSet(&[_]Feature{}), | |
| 399 | }; | |
| 400 | result[@intFromEnum(Feature.dot8_insts)] = .{ | |
| 401 | .llvm_name = "dot8-insts", | |
| 402 | .description = "Has v_dot4_i32_iu8, v_dot8_i32_iu4 instructions", | |
| 403 | .dependencies = featureSet(&[_]Feature{}), | |
| 404 | }; | |
| 405 | result[@intFromEnum(Feature.dot9_insts)] = .{ | |
| 406 | .llvm_name = "dot9-insts", | |
| 407 | .description = "Has v_dot2_f16_f16, v_dot2_bf16_bf16, v_dot2_f32_bf16 instructions", | |
| 408 | .dependencies = featureSet(&[_]Feature{}), | |
| 409 | }; | |
| 410 | result[@intFromEnum(Feature.dpp)] = .{ | |
| 411 | .llvm_name = "dpp", | |
| 412 | .description = "Support DPP (Data Parallel Primitives) extension", | |
| 413 | .dependencies = featureSet(&[_]Feature{}), | |
| 414 | }; | |
| 415 | result[@intFromEnum(Feature.dpp8)] = .{ | |
| 416 | .llvm_name = "dpp8", | |
| 417 | .description = "Support DPP8 (Data Parallel Primitives) extension", | |
| 418 | .dependencies = featureSet(&[_]Feature{}), | |
| 419 | }; | |
| 420 | result[@intFromEnum(Feature.dpp_64bit)] = .{ | |
| 421 | .llvm_name = "dpp-64bit", | |
| 422 | .description = "Support DPP (Data Parallel Primitives) extension in DP ALU", | |
| 423 | .dependencies = featureSet(&[_]Feature{}), | |
| 424 | }; | |
| 425 | result[@intFromEnum(Feature.dpp_src1_sgpr)] = .{ | |
| 426 | .llvm_name = "dpp-src1-sgpr", | |
| 427 | .description = "Support SGPR for Src1 of DPP instructions", | |
| 428 | .dependencies = featureSet(&[_]Feature{}), | |
| 429 | }; | |
| 430 | result[@intFromEnum(Feature.ds128)] = .{ | |
| 431 | .llvm_name = "enable-ds128", | |
| 432 | .description = "Use ds_{read|write}_b128", | |
| 433 | .dependencies = featureSet(&[_]Feature{}), | |
| 434 | }; | |
| 435 | result[@intFromEnum(Feature.ds_src2_insts)] = .{ | |
| 436 | .llvm_name = "ds-src2-insts", | |
| 437 | .description = "Has ds_*_src2 instructions", | |
| 438 | .dependencies = featureSet(&[_]Feature{}), | |
| 439 | }; | |
| 440 | result[@intFromEnum(Feature.extended_image_insts)] = .{ | |
| 441 | .llvm_name = "extended-image-insts", | |
| 442 | .description = "Support mips != 0, lod != 0, gather4, and get_lod", | |
| 443 | .dependencies = featureSet(&[_]Feature{}), | |
| 444 | }; | |
| 445 | result[@intFromEnum(Feature.fast_denormal_f32)] = .{ | |
| 446 | .llvm_name = "fast-denormal-f32", | |
| 447 | .description = "Enabling denormals does not cause f32 instructions to run at f64 rates", | |
| 448 | .dependencies = featureSet(&[_]Feature{}), | |
| 449 | }; | |
| 450 | result[@intFromEnum(Feature.fast_fmaf)] = .{ | |
| 451 | .llvm_name = "fast-fmaf", | |
| 452 | .description = "Assuming f32 fma is at least as fast as mul + add", | |
| 453 | .dependencies = featureSet(&[_]Feature{}), | |
| 454 | }; | |
| 455 | result[@intFromEnum(Feature.flat_address_space)] = .{ | |
| 456 | .llvm_name = "flat-address-space", | |
| 457 | .description = "Support flat address space", | |
| 458 | .dependencies = featureSet(&[_]Feature{}), | |
| 459 | }; | |
| 460 | result[@intFromEnum(Feature.flat_atomic_fadd_f32_inst)] = .{ | |
| 461 | .llvm_name = "flat-atomic-fadd-f32-inst", | |
| 462 | .description = "Has flat_atomic_add_f32 instruction", | |
| 463 | .dependencies = featureSet(&[_]Feature{}), | |
| 464 | }; | |
| 465 | result[@intFromEnum(Feature.flat_buffer_global_fadd_f64_inst)] = .{ | |
| 466 | .llvm_name = "flat-buffer-global-fadd-f64-inst", | |
| 467 | .description = "Has flat, buffer, and global instructions for f64 atomic fadd", | |
| 468 | .dependencies = featureSet(&[_]Feature{}), | |
| 469 | }; | |
| 470 | result[@intFromEnum(Feature.flat_for_global)] = .{ | |
| 471 | .llvm_name = "flat-for-global", | |
| 472 | .description = "Force to generate flat instruction for global", | |
| 473 | .dependencies = featureSet(&[_]Feature{}), | |
| 474 | }; | |
| 475 | result[@intFromEnum(Feature.flat_global_insts)] = .{ | |
| 476 | .llvm_name = "flat-global-insts", | |
| 477 | .description = "Have global_* flat memory instructions", | |
| 478 | .dependencies = featureSet(&[_]Feature{}), | |
| 479 | }; | |
| 480 | result[@intFromEnum(Feature.flat_inst_offsets)] = .{ | |
| 481 | .llvm_name = "flat-inst-offsets", | |
| 482 | .description = "Flat instructions have immediate offset addressing mode", | |
| 483 | .dependencies = featureSet(&[_]Feature{}), | |
| 484 | }; | |
| 485 | result[@intFromEnum(Feature.flat_scratch)] = .{ | |
| 486 | .llvm_name = "enable-flat-scratch", | |
| 487 | .description = "Use scratch_* flat memory instructions to access scratch", | |
| 488 | .dependencies = featureSet(&[_]Feature{}), | |
| 489 | }; | |
| 490 | result[@intFromEnum(Feature.flat_scratch_insts)] = .{ | |
| 491 | .llvm_name = "flat-scratch-insts", | |
| 492 | .description = "Have scratch_* flat memory instructions", | |
| 493 | .dependencies = featureSet(&[_]Feature{}), | |
| 494 | }; | |
| 495 | result[@intFromEnum(Feature.flat_segment_offset_bug)] = .{ | |
| 496 | .llvm_name = "flat-segment-offset-bug", | |
| 497 | .description = "GFX10 bug where inst_offset is ignored when flat instructions access global memory", | |
| 498 | .dependencies = featureSet(&[_]Feature{}), | |
| 499 | }; | |
| 500 | result[@intFromEnum(Feature.fma_mix_insts)] = .{ | |
| 501 | .llvm_name = "fma-mix-insts", | |
| 502 | .description = "Has v_fma_mix_f32, v_fma_mixlo_f16, v_fma_mixhi_f16 instructions", | |
| 503 | .dependencies = featureSet(&[_]Feature{}), | |
| 504 | }; | |
| 505 | result[@intFromEnum(Feature.fmacf64_inst)] = .{ | |
| 506 | .llvm_name = "fmacf64-inst", | |
| 507 | .description = "Has v_fmac_f64 instruction", | |
| 508 | .dependencies = featureSet(&[_]Feature{}), | |
| 509 | }; | |
| 510 | result[@intFromEnum(Feature.fmaf)] = .{ | |
| 511 | .llvm_name = "fmaf", | |
| 512 | .description = "Enable single precision FMA (not as fast as mul+add, but fused)", | |
| 513 | .dependencies = featureSet(&[_]Feature{}), | |
| 514 | }; | |
| 515 | result[@intFromEnum(Feature.force_store_sc0_sc1)] = .{ | |
| 516 | .llvm_name = "force-store-sc0-sc1", | |
| 517 | .description = "Has SC0 and SC1 on stores", | |
| 518 | .dependencies = featureSet(&[_]Feature{}), | |
| 519 | }; | |
| 520 | result[@intFromEnum(Feature.fp64)] = .{ | |
| 521 | .llvm_name = "fp64", | |
| 522 | .description = "Enable double precision operations", | |
| 523 | .dependencies = featureSet(&[_]Feature{}), | |
| 524 | }; | |
| 525 | result[@intFromEnum(Feature.fp8_conversion_insts)] = .{ | |
| 526 | .llvm_name = "fp8-conversion-insts", | |
| 527 | .description = "Has fp8 and bf8 conversion instructions", | |
| 528 | .dependencies = featureSet(&[_]Feature{}), | |
| 529 | }; | |
| 530 | result[@intFromEnum(Feature.fp8_insts)] = .{ | |
| 531 | .llvm_name = "fp8-insts", | |
| 532 | .description = "Has fp8 and bf8 instructions", | |
| 533 | .dependencies = featureSet(&[_]Feature{}), | |
| 534 | }; | |
| 535 | result[@intFromEnum(Feature.full_rate_64_ops)] = .{ | |
| 536 | .llvm_name = "full-rate-64-ops", | |
| 537 | .description = "Most fp64 instructions are full rate", | |
| 538 | .dependencies = featureSet(&[_]Feature{}), | |
| 539 | }; | |
| 540 | result[@intFromEnum(Feature.g16)] = .{ | |
| 541 | .llvm_name = "g16", | |
| 542 | .description = "Support G16 for 16-bit gradient image operands", | |
| 543 | .dependencies = featureSet(&[_]Feature{}), | |
| 544 | }; | |
| 545 | result[@intFromEnum(Feature.gcn3_encoding)] = .{ | |
| 546 | .llvm_name = "gcn3-encoding", | |
| 547 | .description = "Encoding format for VI", | |
| 548 | .dependencies = featureSet(&[_]Feature{}), | |
| 549 | }; | |
| 550 | result[@intFromEnum(Feature.gds)] = .{ | |
| 551 | .llvm_name = "gds", | |
| 552 | .description = "Has Global Data Share", | |
| 553 | .dependencies = featureSet(&[_]Feature{}), | |
| 554 | }; | |
| 555 | result[@intFromEnum(Feature.get_wave_id_inst)] = .{ | |
| 556 | .llvm_name = "get-wave-id-inst", | |
| 557 | .description = "Has s_get_waveid_in_workgroup instruction", | |
| 558 | .dependencies = featureSet(&[_]Feature{}), | |
| 559 | }; | |
| 560 | result[@intFromEnum(Feature.gfx10)] = .{ | |
| 561 | .llvm_name = "gfx10", | |
| 562 | .description = "GFX10 GPU generation", | |
| 563 | .dependencies = featureSet(&[_]Feature{ | |
| 564 | .@"16_bit_insts", | |
| 565 | .a16, | |
| 566 | .add_no_carry_insts, | |
| 567 | .aperture_regs, | |
| 568 | .atomic_fmin_fmax_flat_f32, | |
| 569 | .atomic_fmin_fmax_flat_f64, | |
| 570 | .atomic_fmin_fmax_global_f32, | |
| 571 | .atomic_fmin_fmax_global_f64, | |
| 572 | .ci_insts, | |
| 573 | .default_component_zero, | |
| 574 | .dpp, | |
| 575 | .dpp8, | |
| 576 | .extended_image_insts, | |
| 577 | .fast_denormal_f32, | |
| 578 | .fast_fmaf, | |
| 579 | .flat_address_space, | |
| 580 | .flat_global_insts, | |
| 581 | .flat_inst_offsets, | |
| 582 | .flat_scratch_insts, | |
| 583 | .fma_mix_insts, | |
| 584 | .fp64, | |
| 585 | .g16, | |
| 586 | .gds, | |
| 587 | .gfx10_insts, | |
| 588 | .gfx8_insts, | |
| 589 | .gfx9_insts, | |
| 590 | .gws, | |
| 591 | .image_insts, | |
| 592 | .int_clamp_insts, | |
| 593 | .inv_2pi_inline_imm, | |
| 594 | .localmemorysize65536, | |
| 595 | .max_hard_clause_length_63, | |
| 596 | .mimg_r128, | |
| 597 | .movrel, | |
| 598 | .no_data_dep_hazard, | |
| 599 | .no_sdst_cmpx, | |
| 600 | .pk_fmac_f16_inst, | |
| 601 | .s_memrealtime, | |
| 602 | .s_memtime_inst, | |
| 603 | .sdwa, | |
| 604 | .sdwa_omod, | |
| 605 | .sdwa_scalar, | |
| 606 | .sdwa_sdst, | |
| 607 | .unaligned_buffer_access, | |
| 608 | .unaligned_ds_access, | |
| 609 | .vmem_write_vgpr_in_order, | |
| 610 | .vop3_literal, | |
| 611 | .vop3p, | |
| 612 | .vscnt, | |
| 613 | }), | |
| 614 | }; | |
| 615 | result[@intFromEnum(Feature.gfx10_3_insts)] = .{ | |
| 616 | .llvm_name = "gfx10-3-insts", | |
| 617 | .description = "Additional instructions for GFX10.3", | |
| 618 | .dependencies = featureSet(&[_]Feature{}), | |
| 619 | }; | |
| 620 | result[@intFromEnum(Feature.gfx10_a_encoding)] = .{ | |
| 621 | .llvm_name = "gfx10_a-encoding", | |
| 622 | .description = "Has BVH ray tracing instructions", | |
| 623 | .dependencies = featureSet(&[_]Feature{}), | |
| 624 | }; | |
| 625 | result[@intFromEnum(Feature.gfx10_b_encoding)] = .{ | |
| 626 | .llvm_name = "gfx10_b-encoding", | |
| 627 | .description = "Encoding format GFX10_B", | |
| 628 | .dependencies = featureSet(&[_]Feature{}), | |
| 629 | }; | |
| 630 | result[@intFromEnum(Feature.gfx10_insts)] = .{ | |
| 631 | .llvm_name = "gfx10-insts", | |
| 632 | .description = "Additional instructions for GFX10+", | |
| 633 | .dependencies = featureSet(&[_]Feature{}), | |
| 634 | }; | |
| 635 | result[@intFromEnum(Feature.gfx11)] = .{ | |
| 636 | .llvm_name = "gfx11", | |
| 637 | .description = "GFX11 GPU generation", | |
| 638 | .dependencies = featureSet(&[_]Feature{ | |
| 639 | .@"16_bit_insts", | |
| 640 | .a16, | |
| 641 | .add_no_carry_insts, | |
| 642 | .aperture_regs, | |
| 643 | .atomic_fmin_fmax_flat_f32, | |
| 644 | .atomic_fmin_fmax_global_f32, | |
| 645 | .ci_insts, | |
| 646 | .default_component_zero, | |
| 647 | .dpp, | |
| 648 | .dpp8, | |
| 649 | .extended_image_insts, | |
| 650 | .fast_denormal_f32, | |
| 651 | .fast_fmaf, | |
| 652 | .flat_address_space, | |
| 653 | .flat_global_insts, | |
| 654 | .flat_inst_offsets, | |
| 655 | .flat_scratch_insts, | |
| 656 | .fma_mix_insts, | |
| 657 | .fp64, | |
| 658 | .g16, | |
| 659 | .gds, | |
| 660 | .gfx10_3_insts, | |
| 661 | .gfx10_a_encoding, | |
| 662 | .gfx10_b_encoding, | |
| 663 | .gfx10_insts, | |
| 664 | .gfx11_insts, | |
| 665 | .gfx8_insts, | |
| 666 | .gfx9_insts, | |
| 667 | .gws, | |
| 668 | .int_clamp_insts, | |
| 669 | .inv_2pi_inline_imm, | |
| 670 | .localmemorysize65536, | |
| 671 | .max_hard_clause_length_32, | |
| 672 | .mimg_r128, | |
| 673 | .movrel, | |
| 674 | .no_data_dep_hazard, | |
| 675 | .no_sdst_cmpx, | |
| 676 | .pk_fmac_f16_inst, | |
| 677 | .true16, | |
| 678 | .unaligned_buffer_access, | |
| 679 | .unaligned_ds_access, | |
| 680 | .vmem_write_vgpr_in_order, | |
| 681 | .vop3_literal, | |
| 682 | .vop3p, | |
| 683 | .vopd, | |
| 684 | .vscnt, | |
| 685 | }), | |
| 686 | }; | |
| 687 | result[@intFromEnum(Feature.gfx11_insts)] = .{ | |
| 688 | .llvm_name = "gfx11-insts", | |
| 689 | .description = "Additional instructions for GFX11+", | |
| 690 | .dependencies = featureSet(&[_]Feature{}), | |
| 691 | }; | |
| 692 | result[@intFromEnum(Feature.gfx12)] = .{ | |
| 693 | .llvm_name = "gfx12", | |
| 694 | .description = "GFX12 GPU generation", | |
| 695 | .dependencies = featureSet(&[_]Feature{ | |
| 696 | .@"16_bit_insts", | |
| 697 | .a16, | |
| 698 | .add_no_carry_insts, | |
| 699 | .agent_scope_fine_grained_remote_memory_atomics, | |
| 700 | .aperture_regs, | |
| 701 | .atomic_fmin_fmax_flat_f32, | |
| 702 | .atomic_fmin_fmax_global_f32, | |
| 703 | .ci_insts, | |
| 704 | .default_component_broadcast, | |
| 705 | .dpp, | |
| 706 | .dpp8, | |
| 707 | .fast_denormal_f32, | |
| 708 | .fast_fmaf, | |
| 709 | .flat_address_space, | |
| 710 | .flat_global_insts, | |
| 711 | .flat_inst_offsets, | |
| 712 | .flat_scratch_insts, | |
| 713 | .fma_mix_insts, | |
| 714 | .fp64, | |
| 715 | .g16, | |
| 716 | .gfx10_3_insts, | |
| 717 | .gfx10_a_encoding, | |
| 718 | .gfx10_b_encoding, | |
| 719 | .gfx10_insts, | |
| 720 | .gfx11_insts, | |
| 721 | .gfx12_insts, | |
| 722 | .gfx8_insts, | |
| 723 | .gfx9_insts, | |
| 724 | .int_clamp_insts, | |
| 725 | .inv_2pi_inline_imm, | |
| 726 | .localmemorysize65536, | |
| 727 | .max_hard_clause_length_32, | |
| 728 | .mimg_r128, | |
| 729 | .movrel, | |
| 730 | .no_data_dep_hazard, | |
| 731 | .no_sdst_cmpx, | |
| 732 | .pk_fmac_f16_inst, | |
| 733 | .true16, | |
| 734 | .unaligned_buffer_access, | |
| 735 | .unaligned_ds_access, | |
| 736 | .vop3_literal, | |
| 737 | .vop3p, | |
| 738 | .vopd, | |
| 739 | .vscnt, | |
| 740 | }), | |
| 741 | }; | |
| 742 | result[@intFromEnum(Feature.gfx12_insts)] = .{ | |
| 743 | .llvm_name = "gfx12-insts", | |
| 744 | .description = "Additional instructions for GFX12+", | |
| 745 | .dependencies = featureSet(&[_]Feature{}), | |
| 746 | }; | |
| 747 | result[@intFromEnum(Feature.gfx7_gfx8_gfx9_insts)] = .{ | |
| 748 | .llvm_name = "gfx7-gfx8-gfx9-insts", | |
| 749 | .description = "Instructions shared in GFX7, GFX8, GFX9", | |
| 750 | .dependencies = featureSet(&[_]Feature{}), | |
| 751 | }; | |
| 752 | result[@intFromEnum(Feature.gfx8_insts)] = .{ | |
| 753 | .llvm_name = "gfx8-insts", | |
| 754 | .description = "Additional instructions for GFX8+", | |
| 755 | .dependencies = featureSet(&[_]Feature{}), | |
| 756 | }; | |
| 757 | result[@intFromEnum(Feature.gfx9)] = .{ | |
| 758 | .llvm_name = "gfx9", | |
| 759 | .description = "GFX9 GPU generation", | |
| 760 | .dependencies = featureSet(&[_]Feature{ | |
| 761 | .@"16_bit_insts", | |
| 762 | .a16, | |
| 763 | .add_no_carry_insts, | |
| 764 | .aperture_regs, | |
| 765 | .ci_insts, | |
| 766 | .default_component_zero, | |
| 767 | .dpp, | |
| 768 | .fast_denormal_f32, | |
| 769 | .fast_fmaf, | |
| 770 | .flat_address_space, | |
| 771 | .flat_global_insts, | |
| 772 | .flat_inst_offsets, | |
| 773 | .flat_scratch_insts, | |
| 774 | .fp64, | |
| 775 | .gcn3_encoding, | |
| 776 | .gfx7_gfx8_gfx9_insts, | |
| 777 | .gfx8_insts, | |
| 778 | .gfx9_insts, | |
| 779 | .gws, | |
| 780 | .int_clamp_insts, | |
| 781 | .inv_2pi_inline_imm, | |
| 782 | .localmemorysize65536, | |
| 783 | .negative_scratch_offset_bug, | |
| 784 | .r128_a16, | |
| 785 | .s_memrealtime, | |
| 786 | .s_memtime_inst, | |
| 787 | .scalar_atomics, | |
| 788 | .scalar_flat_scratch_insts, | |
| 789 | .scalar_stores, | |
| 790 | .sdwa, | |
| 791 | .sdwa_omod, | |
| 792 | .sdwa_scalar, | |
| 793 | .sdwa_sdst, | |
| 794 | .unaligned_buffer_access, | |
| 795 | .unaligned_ds_access, | |
| 796 | .vgpr_index_mode, | |
| 797 | .vmem_write_vgpr_in_order, | |
| 798 | .vop3p, | |
| 799 | .wavefrontsize64, | |
| 800 | .xnack_support, | |
| 801 | }), | |
| 802 | }; | |
| 803 | result[@intFromEnum(Feature.gfx90a_insts)] = .{ | |
| 804 | .llvm_name = "gfx90a-insts", | |
| 805 | .description = "Additional instructions for GFX90A+", | |
| 806 | .dependencies = featureSet(&[_]Feature{}), | |
| 807 | }; | |
| 808 | result[@intFromEnum(Feature.gfx940_insts)] = .{ | |
| 809 | .llvm_name = "gfx940-insts", | |
| 810 | .description = "Additional instructions for GFX940+", | |
| 811 | .dependencies = featureSet(&[_]Feature{}), | |
| 812 | }; | |
| 813 | result[@intFromEnum(Feature.gfx9_insts)] = .{ | |
| 814 | .llvm_name = "gfx9-insts", | |
| 815 | .description = "Additional instructions for GFX9+", | |
| 816 | .dependencies = featureSet(&[_]Feature{}), | |
| 817 | }; | |
| 818 | result[@intFromEnum(Feature.gws)] = .{ | |
| 819 | .llvm_name = "gws", | |
| 820 | .description = "Has Global Wave Sync", | |
| 821 | .dependencies = featureSet(&[_]Feature{}), | |
| 822 | }; | |
| 823 | result[@intFromEnum(Feature.half_rate_64_ops)] = .{ | |
| 824 | .llvm_name = "half-rate-64-ops", | |
| 825 | .description = "Most fp64 instructions are half rate instead of quarter", | |
| 826 | .dependencies = featureSet(&[_]Feature{}), | |
| 827 | }; | |
| 828 | result[@intFromEnum(Feature.image_gather4_d16_bug)] = .{ | |
| 829 | .llvm_name = "image-gather4-d16-bug", | |
| 830 | .description = "Image Gather4 D16 hardware bug", | |
| 831 | .dependencies = featureSet(&[_]Feature{}), | |
| 832 | }; | |
| 833 | result[@intFromEnum(Feature.image_insts)] = .{ | |
| 834 | .llvm_name = "image-insts", | |
| 835 | .description = "Support image instructions", | |
| 836 | .dependencies = featureSet(&[_]Feature{}), | |
| 837 | }; | |
| 838 | result[@intFromEnum(Feature.image_store_d16_bug)] = .{ | |
| 839 | .llvm_name = "image-store-d16-bug", | |
| 840 | .description = "Image Store D16 hardware bug", | |
| 841 | .dependencies = featureSet(&[_]Feature{}), | |
| 842 | }; | |
| 843 | result[@intFromEnum(Feature.inst_fwd_prefetch_bug)] = .{ | |
| 844 | .llvm_name = "inst-fwd-prefetch-bug", | |
| 845 | .description = "S_INST_PREFETCH instruction causes shader to hang", | |
| 846 | .dependencies = featureSet(&[_]Feature{}), | |
| 847 | }; | |
| 848 | result[@intFromEnum(Feature.int_clamp_insts)] = .{ | |
| 849 | .llvm_name = "int-clamp-insts", | |
| 850 | .description = "Support clamp for integer destination", | |
| 851 | .dependencies = featureSet(&[_]Feature{}), | |
| 852 | }; | |
| 853 | result[@intFromEnum(Feature.inv_2pi_inline_imm)] = .{ | |
| 854 | .llvm_name = "inv-2pi-inline-imm", | |
| 855 | .description = "Has 1 / (2 * pi) as inline immediate", | |
| 856 | .dependencies = featureSet(&[_]Feature{}), | |
| 857 | }; | |
| 858 | result[@intFromEnum(Feature.kernarg_preload)] = .{ | |
| 859 | .llvm_name = "kernarg-preload", | |
| 860 | .description = "Hardware supports preloading of kernel arguments in user SGPRs.", | |
| 861 | .dependencies = featureSet(&[_]Feature{}), | |
| 862 | }; | |
| 863 | result[@intFromEnum(Feature.lds_branch_vmem_war_hazard)] = .{ | |
| 864 | .llvm_name = "lds-branch-vmem-war-hazard", | |
| 865 | .description = "Switching between LDS and VMEM-tex not waiting VM_VSRC=0", | |
| 866 | .dependencies = featureSet(&[_]Feature{}), | |
| 867 | }; | |
| 868 | result[@intFromEnum(Feature.lds_misaligned_bug)] = .{ | |
| 869 | .llvm_name = "lds-misaligned-bug", | |
| 870 | .description = "Some GFX10 bug with multi-dword LDS and flat access that is not naturally aligned in WGP mode", | |
| 871 | .dependencies = featureSet(&[_]Feature{}), | |
| 872 | }; | |
| 873 | result[@intFromEnum(Feature.ldsbankcount16)] = .{ | |
| 874 | .llvm_name = "ldsbankcount16", | |
| 875 | .description = "The number of LDS banks per compute unit.", | |
| 876 | .dependencies = featureSet(&[_]Feature{}), | |
| 877 | }; | |
| 878 | result[@intFromEnum(Feature.ldsbankcount32)] = .{ | |
| 879 | .llvm_name = "ldsbankcount32", | |
| 880 | .description = "The number of LDS banks per compute unit.", | |
| 881 | .dependencies = featureSet(&[_]Feature{}), | |
| 882 | }; | |
| 883 | result[@intFromEnum(Feature.load_store_opt)] = .{ | |
| 884 | .llvm_name = "load-store-opt", | |
| 885 | .description = "Enable SI load/store optimizer pass", | |
| 886 | .dependencies = featureSet(&[_]Feature{}), | |
| 887 | }; | |
| 888 | result[@intFromEnum(Feature.localmemorysize32768)] = .{ | |
| 889 | .llvm_name = "localmemorysize32768", | |
| 890 | .description = "The size of local memory in bytes", | |
| 891 | .dependencies = featureSet(&[_]Feature{}), | |
| 892 | }; | |
| 893 | result[@intFromEnum(Feature.localmemorysize65536)] = .{ | |
| 894 | .llvm_name = "localmemorysize65536", | |
| 895 | .description = "The size of local memory in bytes", | |
| 896 | .dependencies = featureSet(&[_]Feature{}), | |
| 897 | }; | |
| 898 | result[@intFromEnum(Feature.mad_intra_fwd_bug)] = .{ | |
| 899 | .llvm_name = "mad-intra-fwd-bug", | |
| 900 | .description = "MAD_U64/I64 intra instruction forwarding bug", | |
| 901 | .dependencies = featureSet(&[_]Feature{}), | |
| 902 | }; | |
| 903 | result[@intFromEnum(Feature.mad_mac_f32_insts)] = .{ | |
| 904 | .llvm_name = "mad-mac-f32-insts", | |
| 905 | .description = "Has v_mad_f32/v_mac_f32/v_madak_f32/v_madmk_f32 instructions", | |
| 906 | .dependencies = featureSet(&[_]Feature{}), | |
| 907 | }; | |
| 908 | result[@intFromEnum(Feature.mad_mix_insts)] = .{ | |
| 909 | .llvm_name = "mad-mix-insts", | |
| 910 | .description = "Has v_mad_mix_f32, v_mad_mixlo_f16, v_mad_mixhi_f16 instructions", | |
| 911 | .dependencies = featureSet(&[_]Feature{}), | |
| 912 | }; | |
| 913 | result[@intFromEnum(Feature.mai_insts)] = .{ | |
| 914 | .llvm_name = "mai-insts", | |
| 915 | .description = "Has mAI instructions", | |
| 916 | .dependencies = featureSet(&[_]Feature{}), | |
| 917 | }; | |
| 918 | result[@intFromEnum(Feature.max_hard_clause_length_32)] = .{ | |
| 919 | .llvm_name = "max-hard-clause-length-32", | |
| 920 | .description = "Maximum number of instructions in an explicit S_CLAUSE is 32", | |
| 921 | .dependencies = featureSet(&[_]Feature{}), | |
| 922 | }; | |
| 923 | result[@intFromEnum(Feature.max_hard_clause_length_63)] = .{ | |
| 924 | .llvm_name = "max-hard-clause-length-63", | |
| 925 | .description = "Maximum number of instructions in an explicit S_CLAUSE is 63", | |
| 926 | .dependencies = featureSet(&[_]Feature{}), | |
| 927 | }; | |
| 928 | result[@intFromEnum(Feature.max_private_element_size_16)] = .{ | |
| 929 | .llvm_name = "max-private-element-size-16", | |
| 930 | .description = "Maximum private access size may be 16", | |
| 931 | .dependencies = featureSet(&[_]Feature{}), | |
| 932 | }; | |
| 933 | result[@intFromEnum(Feature.max_private_element_size_4)] = .{ | |
| 934 | .llvm_name = "max-private-element-size-4", | |
| 935 | .description = "Maximum private access size may be 4", | |
| 936 | .dependencies = featureSet(&[_]Feature{}), | |
| 937 | }; | |
| 938 | result[@intFromEnum(Feature.max_private_element_size_8)] = .{ | |
| 939 | .llvm_name = "max-private-element-size-8", | |
| 940 | .description = "Maximum private access size may be 8", | |
| 941 | .dependencies = featureSet(&[_]Feature{}), | |
| 942 | }; | |
| 943 | result[@intFromEnum(Feature.memory_atomic_fadd_f32_denormal_support)] = .{ | |
| 944 | .llvm_name = "memory-atomic-fadd-f32-denormal-support", | |
| 945 | .description = "global/flat/buffer atomic fadd for float supports denormal handling", | |
| 946 | .dependencies = featureSet(&[_]Feature{}), | |
| 947 | }; | |
| 948 | result[@intFromEnum(Feature.mfma_inline_literal_bug)] = .{ | |
| 949 | .llvm_name = "mfma-inline-literal-bug", | |
| 950 | .description = "MFMA cannot use inline literal as SrcC", | |
| 951 | .dependencies = featureSet(&[_]Feature{}), | |
| 952 | }; | |
| 953 | result[@intFromEnum(Feature.mimg_r128)] = .{ | |
| 954 | .llvm_name = "mimg-r128", | |
| 955 | .description = "Support 128-bit texture resources", | |
| 956 | .dependencies = featureSet(&[_]Feature{}), | |
| 957 | }; | |
| 958 | result[@intFromEnum(Feature.movrel)] = .{ | |
| 959 | .llvm_name = "movrel", | |
| 960 | .description = "Has v_movrel*_b32 instructions", | |
| 961 | .dependencies = featureSet(&[_]Feature{}), | |
| 962 | }; | |
| 963 | result[@intFromEnum(Feature.msaa_load_dst_sel_bug)] = .{ | |
| 964 | .llvm_name = "msaa-load-dst-sel-bug", | |
| 965 | .description = "MSAA loads not honoring dst_sel bug", | |
| 966 | .dependencies = featureSet(&[_]Feature{}), | |
| 967 | }; | |
| 968 | result[@intFromEnum(Feature.negative_scratch_offset_bug)] = .{ | |
| 969 | .llvm_name = "negative-scratch-offset-bug", | |
| 970 | .description = "Negative immediate offsets in scratch instructions with an SGPR offset page fault on GFX9", | |
| 971 | .dependencies = featureSet(&[_]Feature{}), | |
| 972 | }; | |
| 973 | result[@intFromEnum(Feature.negative_unaligned_scratch_offset_bug)] = .{ | |
| 974 | .llvm_name = "negative-unaligned-scratch-offset-bug", | |
| 975 | .description = "Scratch instructions with a VGPR offset and a negative immediate offset that is not a multiple of 4 read wrong memory on GFX10", | |
| 976 | .dependencies = featureSet(&[_]Feature{}), | |
| 977 | }; | |
| 978 | result[@intFromEnum(Feature.no_data_dep_hazard)] = .{ | |
| 979 | .llvm_name = "no-data-dep-hazard", | |
| 980 | .description = "Does not need SW waitstates", | |
| 981 | .dependencies = featureSet(&[_]Feature{}), | |
| 982 | }; | |
| 983 | result[@intFromEnum(Feature.no_sdst_cmpx)] = .{ | |
| 984 | .llvm_name = "no-sdst-cmpx", | |
| 985 | .description = "V_CMPX does not write VCC/SGPR in addition to EXEC", | |
| 986 | .dependencies = featureSet(&[_]Feature{}), | |
| 987 | }; | |
| 988 | result[@intFromEnum(Feature.nsa_clause_bug)] = .{ | |
| 989 | .llvm_name = "nsa-clause-bug", | |
| 990 | .description = "MIMG-NSA in a hard clause has unpredictable results on GFX10.1", | |
| 991 | .dependencies = featureSet(&[_]Feature{}), | |
| 992 | }; | |
| 993 | result[@intFromEnum(Feature.nsa_encoding)] = .{ | |
| 994 | .llvm_name = "nsa-encoding", | |
| 995 | .description = "Support NSA encoding for image instructions", | |
| 996 | .dependencies = featureSet(&[_]Feature{}), | |
| 997 | }; | |
| 998 | result[@intFromEnum(Feature.nsa_to_vmem_bug)] = .{ | |
| 999 | .llvm_name = "nsa-to-vmem-bug", | |
| 1000 | .description = "MIMG-NSA followed by VMEM fail if EXEC_LO or EXEC_HI equals zero", | |
| 1001 | .dependencies = featureSet(&[_]Feature{}), | |
| 1002 | }; | |
| 1003 | result[@intFromEnum(Feature.offset_3f_bug)] = .{ | |
| 1004 | .llvm_name = "offset-3f-bug", | |
| 1005 | .description = "Branch offset of 3f hardware bug", | |
| 1006 | .dependencies = featureSet(&[_]Feature{}), | |
| 1007 | }; | |
| 1008 | result[@intFromEnum(Feature.packed_fp32_ops)] = .{ | |
| 1009 | .llvm_name = "packed-fp32-ops", | |
| 1010 | .description = "Support packed fp32 instructions", | |
| 1011 | .dependencies = featureSet(&[_]Feature{}), | |
| 1012 | }; | |
| 1013 | result[@intFromEnum(Feature.packed_tid)] = .{ | |
| 1014 | .llvm_name = "packed-tid", | |
| 1015 | .description = "Workitem IDs are packed into v0 at kernel launch", | |
| 1016 | .dependencies = featureSet(&[_]Feature{}), | |
| 1017 | }; | |
| 1018 | result[@intFromEnum(Feature.partial_nsa_encoding)] = .{ | |
| 1019 | .llvm_name = "partial-nsa-encoding", | |
| 1020 | .description = "Support partial NSA encoding for image instructions", | |
| 1021 | .dependencies = featureSet(&[_]Feature{}), | |
| 1022 | }; | |
| 1023 | result[@intFromEnum(Feature.pk_fmac_f16_inst)] = .{ | |
| 1024 | .llvm_name = "pk-fmac-f16-inst", | |
| 1025 | .description = "Has v_pk_fmac_f16 instruction", | |
| 1026 | .dependencies = featureSet(&[_]Feature{}), | |
| 1027 | }; | |
| 1028 | result[@intFromEnum(Feature.precise_memory)] = .{ | |
| 1029 | .llvm_name = "precise-memory", | |
| 1030 | .description = "Enable precise memory mode", | |
| 1031 | .dependencies = featureSet(&[_]Feature{}), | |
| 1032 | }; | |
| 1033 | result[@intFromEnum(Feature.priv_enabled_trap2_nop_bug)] = .{ | |
| 1034 | .llvm_name = "priv-enabled-trap2-nop-bug", | |
| 1035 | .description = "Hardware that runs with PRIV=1 interpreting 's_trap 2' as a nop bug", | |
| 1036 | .dependencies = featureSet(&[_]Feature{}), | |
| 1037 | }; | |
| 1038 | result[@intFromEnum(Feature.promote_alloca)] = .{ | |
| 1039 | .llvm_name = "promote-alloca", | |
| 1040 | .description = "Enable promote alloca pass", | |
| 1041 | .dependencies = featureSet(&[_]Feature{}), | |
| 1042 | }; | |
| 1043 | result[@intFromEnum(Feature.prt_strict_null)] = .{ | |
| 1044 | .llvm_name = "enable-prt-strict-null", | |
| 1045 | .description = "Enable zeroing of result registers for sparse texture fetches", | |
| 1046 | .dependencies = featureSet(&[_]Feature{}), | |
| 1047 | }; | |
| 1048 | result[@intFromEnum(Feature.pseudo_scalar_trans)] = .{ | |
| 1049 | .llvm_name = "pseudo-scalar-trans", | |
| 1050 | .description = "Has Pseudo Scalar Transcendental instructions", | |
| 1051 | .dependencies = featureSet(&[_]Feature{}), | |
| 1052 | }; | |
| 1053 | result[@intFromEnum(Feature.r128_a16)] = .{ | |
| 1054 | .llvm_name = "r128-a16", | |
| 1055 | .description = "Support gfx9-style A16 for 16-bit coordinates/gradients/lod/clamp/mip image operands, where a16 is aliased with r128", | |
| 1056 | .dependencies = featureSet(&[_]Feature{}), | |
| 1057 | }; | |
| 1058 | result[@intFromEnum(Feature.real_true16)] = .{ | |
| 1059 | .llvm_name = "real-true16", | |
| 1060 | .description = "Use true 16-bit registers", | |
| 1061 | .dependencies = featureSet(&[_]Feature{}), | |
| 1062 | }; | |
| 1063 | result[@intFromEnum(Feature.required_export_priority)] = .{ | |
| 1064 | .llvm_name = "required-export-priority", | |
| 1065 | .description = "Export priority must be explicitly manipulated on GFX11.5", | |
| 1066 | .dependencies = featureSet(&[_]Feature{}), | |
| 1067 | }; | |
| 1068 | result[@intFromEnum(Feature.requires_cov6)] = .{ | |
| 1069 | .llvm_name = "requires-cov6", | |
| 1070 | .description = "Target Requires Code Object V6", | |
| 1071 | .dependencies = featureSet(&[_]Feature{}), | |
| 1072 | }; | |
| 1073 | result[@intFromEnum(Feature.restricted_soffset)] = .{ | |
| 1074 | .llvm_name = "restricted-soffset", | |
| 1075 | .description = "Has restricted SOffset (immediate not supported).", | |
| 1076 | .dependencies = featureSet(&[_]Feature{}), | |
| 1077 | }; | |
| 1078 | result[@intFromEnum(Feature.s_memrealtime)] = .{ | |
| 1079 | .llvm_name = "s-memrealtime", | |
| 1080 | .description = "Has s_memrealtime instruction", | |
| 1081 | .dependencies = featureSet(&[_]Feature{}), | |
| 1082 | }; | |
| 1083 | result[@intFromEnum(Feature.s_memtime_inst)] = .{ | |
| 1084 | .llvm_name = "s-memtime-inst", | |
| 1085 | .description = "Has s_memtime instruction", | |
| 1086 | .dependencies = featureSet(&[_]Feature{}), | |
| 1087 | }; | |
| 1088 | result[@intFromEnum(Feature.salu_float)] = .{ | |
| 1089 | .llvm_name = "salu-float", | |
| 1090 | .description = "Has SALU floating point instructions", | |
| 1091 | .dependencies = featureSet(&[_]Feature{}), | |
| 1092 | }; | |
| 1093 | result[@intFromEnum(Feature.scalar_atomics)] = .{ | |
| 1094 | .llvm_name = "scalar-atomics", | |
| 1095 | .description = "Has atomic scalar memory instructions", | |
| 1096 | .dependencies = featureSet(&[_]Feature{}), | |
| 1097 | }; | |
| 1098 | result[@intFromEnum(Feature.scalar_dwordx3_loads)] = .{ | |
| 1099 | .llvm_name = "scalar-dwordx3-loads", | |
| 1100 | .description = "Has 96-bit scalar load instructions", | |
| 1101 | .dependencies = featureSet(&[_]Feature{}), | |
| 1102 | }; | |
| 1103 | result[@intFromEnum(Feature.scalar_flat_scratch_insts)] = .{ | |
| 1104 | .llvm_name = "scalar-flat-scratch-insts", | |
| 1105 | .description = "Have s_scratch_* flat memory instructions", | |
| 1106 | .dependencies = featureSet(&[_]Feature{}), | |
| 1107 | }; | |
| 1108 | result[@intFromEnum(Feature.scalar_stores)] = .{ | |
| 1109 | .llvm_name = "scalar-stores", | |
| 1110 | .description = "Has store scalar memory instructions", | |
| 1111 | .dependencies = featureSet(&[_]Feature{}), | |
| 1112 | }; | |
| 1113 | result[@intFromEnum(Feature.sdwa)] = .{ | |
| 1114 | .llvm_name = "sdwa", | |
| 1115 | .description = "Support SDWA (Sub-DWORD Addressing) extension", | |
| 1116 | .dependencies = featureSet(&[_]Feature{}), | |
| 1117 | }; | |
| 1118 | result[@intFromEnum(Feature.sdwa_mav)] = .{ | |
| 1119 | .llvm_name = "sdwa-mav", | |
| 1120 | .description = "Support v_mac_f32/f16 with SDWA (Sub-DWORD Addressing) extension", | |
| 1121 | .dependencies = featureSet(&[_]Feature{}), | |
| 1122 | }; | |
| 1123 | result[@intFromEnum(Feature.sdwa_omod)] = .{ | |
| 1124 | .llvm_name = "sdwa-omod", | |
| 1125 | .description = "Support OMod with SDWA (Sub-DWORD Addressing) extension", | |
| 1126 | .dependencies = featureSet(&[_]Feature{}), | |
| 1127 | }; | |
| 1128 | result[@intFromEnum(Feature.sdwa_out_mods_vopc)] = .{ | |
| 1129 | .llvm_name = "sdwa-out-mods-vopc", | |
| 1130 | .description = "Support clamp for VOPC with SDWA (Sub-DWORD Addressing) extension", | |
| 1131 | .dependencies = featureSet(&[_]Feature{}), | |
| 1132 | }; | |
| 1133 | result[@intFromEnum(Feature.sdwa_scalar)] = .{ | |
| 1134 | .llvm_name = "sdwa-scalar", | |
| 1135 | .description = "Support scalar register with SDWA (Sub-DWORD Addressing) extension", | |
| 1136 | .dependencies = featureSet(&[_]Feature{}), | |
| 1137 | }; | |
| 1138 | result[@intFromEnum(Feature.sdwa_sdst)] = .{ | |
| 1139 | .llvm_name = "sdwa-sdst", | |
| 1140 | .description = "Support scalar dst for VOPC with SDWA (Sub-DWORD Addressing) extension", | |
| 1141 | .dependencies = featureSet(&[_]Feature{}), | |
| 1142 | }; | |
| 1143 | result[@intFromEnum(Feature.sea_islands)] = .{ | |
| 1144 | .llvm_name = "sea-islands", | |
| 1145 | .description = "SEA_ISLANDS GPU generation", | |
| 1146 | .dependencies = featureSet(&[_]Feature{ | |
| 1147 | .atomic_fmin_fmax_flat_f32, | |
| 1148 | .atomic_fmin_fmax_flat_f64, | |
| 1149 | .atomic_fmin_fmax_global_f32, | |
| 1150 | .atomic_fmin_fmax_global_f64, | |
| 1151 | .ci_insts, | |
| 1152 | .default_component_zero, | |
| 1153 | .ds_src2_insts, | |
| 1154 | .extended_image_insts, | |
| 1155 | .flat_address_space, | |
| 1156 | .fp64, | |
| 1157 | .gds, | |
| 1158 | .gfx7_gfx8_gfx9_insts, | |
| 1159 | .gws, | |
| 1160 | .image_insts, | |
| 1161 | .localmemorysize65536, | |
| 1162 | .mad_mac_f32_insts, | |
| 1163 | .mimg_r128, | |
| 1164 | .movrel, | |
| 1165 | .s_memtime_inst, | |
| 1166 | .trig_reduced_range, | |
| 1167 | .unaligned_buffer_access, | |
| 1168 | .vmem_write_vgpr_in_order, | |
| 1169 | .wavefrontsize64, | |
| 1170 | }), | |
| 1171 | }; | |
| 1172 | result[@intFromEnum(Feature.sgpr_init_bug)] = .{ | |
| 1173 | .llvm_name = "sgpr-init-bug", | |
| 1174 | .description = "VI SGPR initialization bug requiring a fixed SGPR allocation size", | |
| 1175 | .dependencies = featureSet(&[_]Feature{}), | |
| 1176 | }; | |
| 1177 | result[@intFromEnum(Feature.shader_cycles_hi_lo_registers)] = .{ | |
| 1178 | .llvm_name = "shader-cycles-hi-lo-registers", | |
| 1179 | .description = "Has SHADER_CYCLES_HI/LO hardware registers", | |
| 1180 | .dependencies = featureSet(&[_]Feature{}), | |
| 1181 | }; | |
| 1182 | result[@intFromEnum(Feature.shader_cycles_register)] = .{ | |
| 1183 | .llvm_name = "shader-cycles-register", | |
| 1184 | .description = "Has SHADER_CYCLES hardware register", | |
| 1185 | .dependencies = featureSet(&[_]Feature{}), | |
| 1186 | }; | |
| 1187 | result[@intFromEnum(Feature.si_scheduler)] = .{ | |
| 1188 | .llvm_name = "si-scheduler", | |
| 1189 | .description = "Enable SI Machine Scheduler", | |
| 1190 | .dependencies = featureSet(&[_]Feature{}), | |
| 1191 | }; | |
| 1192 | result[@intFromEnum(Feature.smem_to_vector_write_hazard)] = .{ | |
| 1193 | .llvm_name = "smem-to-vector-write-hazard", | |
| 1194 | .description = "s_load_dword followed by v_cmp page faults", | |
| 1195 | .dependencies = featureSet(&[_]Feature{}), | |
| 1196 | }; | |
| 1197 | result[@intFromEnum(Feature.southern_islands)] = .{ | |
| 1198 | .llvm_name = "southern-islands", | |
| 1199 | .description = "SOUTHERN_ISLANDS GPU generation", | |
| 1200 | .dependencies = featureSet(&[_]Feature{ | |
| 1201 | .atomic_fmin_fmax_global_f32, | |
| 1202 | .atomic_fmin_fmax_global_f64, | |
| 1203 | .default_component_zero, | |
| 1204 | .ds_src2_insts, | |
| 1205 | .extended_image_insts, | |
| 1206 | .fp64, | |
| 1207 | .gds, | |
| 1208 | .gws, | |
| 1209 | .image_insts, | |
| 1210 | .ldsbankcount32, | |
| 1211 | .localmemorysize32768, | |
| 1212 | .mad_mac_f32_insts, | |
| 1213 | .mimg_r128, | |
| 1214 | .movrel, | |
| 1215 | .s_memtime_inst, | |
| 1216 | .trig_reduced_range, | |
| 1217 | .vmem_write_vgpr_in_order, | |
| 1218 | .wavefrontsize64, | |
| 1219 | }), | |
| 1220 | }; | |
| 1221 | result[@intFromEnum(Feature.sramecc)] = .{ | |
| 1222 | .llvm_name = "sramecc", | |
| 1223 | .description = "Enable SRAMECC", | |
| 1224 | .dependencies = featureSet(&[_]Feature{}), | |
| 1225 | }; | |
| 1226 | result[@intFromEnum(Feature.sramecc_support)] = .{ | |
| 1227 | .llvm_name = "sramecc-support", | |
| 1228 | .description = "Hardware supports SRAMECC", | |
| 1229 | .dependencies = featureSet(&[_]Feature{}), | |
| 1230 | }; | |
| 1231 | result[@intFromEnum(Feature.tgsplit)] = .{ | |
| 1232 | .llvm_name = "tgsplit", | |
| 1233 | .description = "Enable threadgroup split execution", | |
| 1234 | .dependencies = featureSet(&[_]Feature{}), | |
| 1235 | }; | |
| 1236 | result[@intFromEnum(Feature.trap_handler)] = .{ | |
| 1237 | .llvm_name = "trap-handler", | |
| 1238 | .description = "Trap handler support", | |
| 1239 | .dependencies = featureSet(&[_]Feature{}), | |
| 1240 | }; | |
| 1241 | result[@intFromEnum(Feature.trig_reduced_range)] = .{ | |
| 1242 | .llvm_name = "trig-reduced-range", | |
| 1243 | .description = "Requires use of fract on arguments to trig instructions", | |
| 1244 | .dependencies = featureSet(&[_]Feature{}), | |
| 1245 | }; | |
| 1246 | result[@intFromEnum(Feature.true16)] = .{ | |
| 1247 | .llvm_name = "true16", | |
| 1248 | .description = "True 16-bit operand instructions", | |
| 1249 | .dependencies = featureSet(&[_]Feature{}), | |
| 1250 | }; | |
| 1251 | result[@intFromEnum(Feature.unaligned_access_mode)] = .{ | |
| 1252 | .llvm_name = "unaligned-access-mode", | |
| 1253 | .description = "Enable unaligned global, local and region loads and stores if the hardware supports it", | |
| 1254 | .dependencies = featureSet(&[_]Feature{}), | |
| 1255 | }; | |
| 1256 | result[@intFromEnum(Feature.unaligned_buffer_access)] = .{ | |
| 1257 | .llvm_name = "unaligned-buffer-access", | |
| 1258 | .description = "Hardware supports unaligned global loads and stores", | |
| 1259 | .dependencies = featureSet(&[_]Feature{}), | |
| 1260 | }; | |
| 1261 | result[@intFromEnum(Feature.unaligned_ds_access)] = .{ | |
| 1262 | .llvm_name = "unaligned-ds-access", | |
| 1263 | .description = "Hardware supports unaligned local and region loads and stores", | |
| 1264 | .dependencies = featureSet(&[_]Feature{}), | |
| 1265 | }; | |
| 1266 | result[@intFromEnum(Feature.unaligned_scratch_access)] = .{ | |
| 1267 | .llvm_name = "unaligned-scratch-access", | |
| 1268 | .description = "Support unaligned scratch loads and stores", | |
| 1269 | .dependencies = featureSet(&[_]Feature{}), | |
| 1270 | }; | |
| 1271 | result[@intFromEnum(Feature.unpacked_d16_vmem)] = .{ | |
| 1272 | .llvm_name = "unpacked-d16-vmem", | |
| 1273 | .description = "Has unpacked d16 vmem instructions", | |
| 1274 | .dependencies = featureSet(&[_]Feature{}), | |
| 1275 | }; | |
| 1276 | result[@intFromEnum(Feature.unsafe_ds_offset_folding)] = .{ | |
| 1277 | .llvm_name = "unsafe-ds-offset-folding", | |
| 1278 | .description = "Force using DS instruction immediate offsets on SI", | |
| 1279 | .dependencies = featureSet(&[_]Feature{}), | |
| 1280 | }; | |
| 1281 | result[@intFromEnum(Feature.user_sgpr_init16_bug)] = .{ | |
| 1282 | .llvm_name = "user-sgpr-init16-bug", | |
| 1283 | .description = "Bug requiring at least 16 user+system SGPRs to be enabled", | |
| 1284 | .dependencies = featureSet(&[_]Feature{}), | |
| 1285 | }; | |
| 1286 | result[@intFromEnum(Feature.valu_trans_use_hazard)] = .{ | |
| 1287 | .llvm_name = "valu-trans-use-hazard", | |
| 1288 | .description = "Hazard when TRANS instructions are closely followed by a use of the result", | |
| 1289 | .dependencies = featureSet(&[_]Feature{}), | |
| 1290 | }; | |
| 1291 | result[@intFromEnum(Feature.vcmpx_exec_war_hazard)] = .{ | |
| 1292 | .llvm_name = "vcmpx-exec-war-hazard", | |
| 1293 | .description = "V_CMPX WAR hazard on EXEC (V_CMPX issue ONLY)", | |
| 1294 | .dependencies = featureSet(&[_]Feature{}), | |
| 1295 | }; | |
| 1296 | result[@intFromEnum(Feature.vcmpx_permlane_hazard)] = .{ | |
| 1297 | .llvm_name = "vcmpx-permlane-hazard", | |
| 1298 | .description = "TODO: describe me", | |
| 1299 | .dependencies = featureSet(&[_]Feature{}), | |
| 1300 | }; | |
| 1301 | result[@intFromEnum(Feature.vgpr_index_mode)] = .{ | |
| 1302 | .llvm_name = "vgpr-index-mode", | |
| 1303 | .description = "Has VGPR mode register indexing", | |
| 1304 | .dependencies = featureSet(&[_]Feature{}), | |
| 1305 | }; | |
| 1306 | result[@intFromEnum(Feature.vgpr_singleuse_hint)] = .{ | |
| 1307 | .llvm_name = "vgpr-singleuse-hint", | |
| 1308 | .description = "Has single-use VGPR hint instructions", | |
| 1309 | .dependencies = featureSet(&[_]Feature{}), | |
| 1310 | }; | |
| 1311 | result[@intFromEnum(Feature.vmem_to_scalar_write_hazard)] = .{ | |
| 1312 | .llvm_name = "vmem-to-scalar-write-hazard", | |
| 1313 | .description = "VMEM instruction followed by scalar writing to EXEC mask, M0 or SGPR leads to incorrect execution.", | |
| 1314 | .dependencies = featureSet(&[_]Feature{}), | |
| 1315 | }; | |
| 1316 | result[@intFromEnum(Feature.vmem_write_vgpr_in_order)] = .{ | |
| 1317 | .llvm_name = "vmem-write-vgpr-in-order", | |
| 1318 | .description = "VMEM instructions of the same type write VGPR results in order", | |
| 1319 | .dependencies = featureSet(&[_]Feature{}), | |
| 1320 | }; | |
| 1321 | result[@intFromEnum(Feature.volcanic_islands)] = .{ | |
| 1322 | .llvm_name = "volcanic-islands", | |
| 1323 | .description = "VOLCANIC_ISLANDS GPU generation", | |
| 1324 | .dependencies = featureSet(&[_]Feature{ | |
| 1325 | .@"16_bit_insts", | |
| 1326 | .ci_insts, | |
| 1327 | .default_component_zero, | |
| 1328 | .dpp, | |
| 1329 | .ds_src2_insts, | |
| 1330 | .extended_image_insts, | |
| 1331 | .fast_denormal_f32, | |
| 1332 | .flat_address_space, | |
| 1333 | .fp64, | |
| 1334 | .gcn3_encoding, | |
| 1335 | .gds, | |
| 1336 | .gfx7_gfx8_gfx9_insts, | |
| 1337 | .gfx8_insts, | |
| 1338 | .gws, | |
| 1339 | .image_insts, | |
| 1340 | .int_clamp_insts, | |
| 1341 | .inv_2pi_inline_imm, | |
| 1342 | .localmemorysize65536, | |
| 1343 | .mad_mac_f32_insts, | |
| 1344 | .mimg_r128, | |
| 1345 | .movrel, | |
| 1346 | .s_memrealtime, | |
| 1347 | .s_memtime_inst, | |
| 1348 | .scalar_stores, | |
| 1349 | .sdwa, | |
| 1350 | .sdwa_mav, | |
| 1351 | .sdwa_out_mods_vopc, | |
| 1352 | .trig_reduced_range, | |
| 1353 | .unaligned_buffer_access, | |
| 1354 | .vgpr_index_mode, | |
| 1355 | .vmem_write_vgpr_in_order, | |
| 1356 | .wavefrontsize64, | |
| 1357 | }), | |
| 1358 | }; | |
| 1359 | result[@intFromEnum(Feature.vop3_literal)] = .{ | |
| 1360 | .llvm_name = "vop3-literal", | |
| 1361 | .description = "Can use one literal in VOP3", | |
| 1362 | .dependencies = featureSet(&[_]Feature{}), | |
| 1363 | }; | |
| 1364 | result[@intFromEnum(Feature.vop3p)] = .{ | |
| 1365 | .llvm_name = "vop3p", | |
| 1366 | .description = "Has VOP3P packed instructions", | |
| 1367 | .dependencies = featureSet(&[_]Feature{}), | |
| 1368 | }; | |
| 1369 | result[@intFromEnum(Feature.vopd)] = .{ | |
| 1370 | .llvm_name = "vopd", | |
| 1371 | .description = "Has VOPD dual issue wave32 instructions", | |
| 1372 | .dependencies = featureSet(&[_]Feature{}), | |
| 1373 | }; | |
| 1374 | result[@intFromEnum(Feature.vscnt)] = .{ | |
| 1375 | .llvm_name = "vscnt", | |
| 1376 | .description = "Has separate store vscnt counter", | |
| 1377 | .dependencies = featureSet(&[_]Feature{}), | |
| 1378 | }; | |
| 1379 | result[@intFromEnum(Feature.wavefrontsize16)] = .{ | |
| 1380 | .llvm_name = "wavefrontsize16", | |
| 1381 | .description = "The number of threads per wavefront", | |
| 1382 | .dependencies = featureSet(&[_]Feature{}), | |
| 1383 | }; | |
| 1384 | result[@intFromEnum(Feature.wavefrontsize32)] = .{ | |
| 1385 | .llvm_name = "wavefrontsize32", | |
| 1386 | .description = "The number of threads per wavefront", | |
| 1387 | .dependencies = featureSet(&[_]Feature{}), | |
| 1388 | }; | |
| 1389 | result[@intFromEnum(Feature.wavefrontsize64)] = .{ | |
| 1390 | .llvm_name = "wavefrontsize64", | |
| 1391 | .description = "The number of threads per wavefront", | |
| 1392 | .dependencies = featureSet(&[_]Feature{}), | |
| 1393 | }; | |
| 1394 | result[@intFromEnum(Feature.xnack)] = .{ | |
| 1395 | .llvm_name = "xnack", | |
| 1396 | .description = "Enable XNACK support", | |
| 1397 | .dependencies = featureSet(&[_]Feature{}), | |
| 1398 | }; | |
| 1399 | result[@intFromEnum(Feature.xnack_support)] = .{ | |
| 1400 | .llvm_name = "xnack-support", | |
| 1401 | .description = "Hardware supports XNACK", | |
| 1402 | .dependencies = featureSet(&[_]Feature{}), | |
| 1403 | }; | |
| 1404 | const ti = @typeInfo(Feature); | |
| 1405 | for (&result, 0..) |*elem, i| { | |
| 1406 | elem.index = i; | |
| 1407 | elem.name = ti.@"enum".fields[i].name; | |
| 1408 | } | |
| 1409 | break :blk result; | |
| 1410 | }; | |
| 1411 | ||
| 1412 | pub const cpu = struct { | |
| 1413 | pub const bonaire = CpuModel{ | |
| 1414 | .name = "bonaire", | |
| 1415 | .llvm_name = "bonaire", | |
| 1416 | .features = featureSet(&[_]Feature{ | |
| 1417 | .ldsbankcount32, | |
| 1418 | .sea_islands, | |
| 1419 | }), | |
| 1420 | }; | |
| 1421 | pub const carrizo = CpuModel{ | |
| 1422 | .name = "carrizo", | |
| 1423 | .llvm_name = "carrizo", | |
| 1424 | .features = featureSet(&[_]Feature{ | |
| 1425 | .fast_fmaf, | |
| 1426 | .half_rate_64_ops, | |
| 1427 | .ldsbankcount32, | |
| 1428 | .unpacked_d16_vmem, | |
| 1429 | .volcanic_islands, | |
| 1430 | .xnack_support, | |
| 1431 | }), | |
| 1432 | }; | |
| 1433 | pub const fiji = CpuModel{ | |
| 1434 | .name = "fiji", | |
| 1435 | .llvm_name = "fiji", | |
| 1436 | .features = featureSet(&[_]Feature{ | |
| 1437 | .ldsbankcount32, | |
| 1438 | .unpacked_d16_vmem, | |
| 1439 | .volcanic_islands, | |
| 1440 | }), | |
| 1441 | }; | |
| 1442 | pub const generic = CpuModel{ | |
| 1443 | .name = "generic", | |
| 1444 | .llvm_name = "generic", | |
| 1445 | .features = featureSet(&[_]Feature{ | |
| 1446 | .gds, | |
| 1447 | .gws, | |
| 1448 | .wavefrontsize64, | |
| 1449 | }), | |
| 1450 | }; | |
| 1451 | pub const generic_hsa = CpuModel{ | |
| 1452 | .name = "generic_hsa", | |
| 1453 | .llvm_name = "generic-hsa", | |
| 1454 | .features = featureSet(&[_]Feature{ | |
| 1455 | .flat_address_space, | |
| 1456 | .gds, | |
| 1457 | .gws, | |
| 1458 | .wavefrontsize64, | |
| 1459 | }), | |
| 1460 | }; | |
| 1461 | pub const gfx1010 = CpuModel{ | |
| 1462 | .name = "gfx1010", | |
| 1463 | .llvm_name = "gfx1010", | |
| 1464 | .features = featureSet(&[_]Feature{ | |
| 1465 | .back_off_barrier, | |
| 1466 | .dl_insts, | |
| 1467 | .ds_src2_insts, | |
| 1468 | .flat_segment_offset_bug, | |
| 1469 | .get_wave_id_inst, | |
| 1470 | .gfx10, | |
| 1471 | .inst_fwd_prefetch_bug, | |
| 1472 | .lds_branch_vmem_war_hazard, | |
| 1473 | .lds_misaligned_bug, | |
| 1474 | .ldsbankcount32, | |
| 1475 | .mad_mac_f32_insts, | |
| 1476 | .negative_unaligned_scratch_offset_bug, | |
| 1477 | .nsa_clause_bug, | |
| 1478 | .nsa_encoding, | |
| 1479 | .nsa_to_vmem_bug, | |
| 1480 | .offset_3f_bug, | |
| 1481 | .scalar_atomics, | |
| 1482 | .scalar_flat_scratch_insts, | |
| 1483 | .scalar_stores, | |
| 1484 | .smem_to_vector_write_hazard, | |
| 1485 | .vcmpx_exec_war_hazard, | |
| 1486 | .vcmpx_permlane_hazard, | |
| 1487 | .vmem_to_scalar_write_hazard, | |
| 1488 | .xnack_support, | |
| 1489 | }), | |
| 1490 | }; | |
| 1491 | pub const gfx1011 = CpuModel{ | |
| 1492 | .name = "gfx1011", | |
| 1493 | .llvm_name = "gfx1011", | |
| 1494 | .features = featureSet(&[_]Feature{ | |
| 1495 | .back_off_barrier, | |
| 1496 | .dl_insts, | |
| 1497 | .dot10_insts, | |
| 1498 | .dot1_insts, | |
| 1499 | .dot2_insts, | |
| 1500 | .dot5_insts, | |
| 1501 | .dot6_insts, | |
| 1502 | .dot7_insts, | |
| 1503 | .ds_src2_insts, | |
| 1504 | .flat_segment_offset_bug, | |
| 1505 | .get_wave_id_inst, | |
| 1506 | .gfx10, | |
| 1507 | .inst_fwd_prefetch_bug, | |
| 1508 | .lds_branch_vmem_war_hazard, | |
| 1509 | .lds_misaligned_bug, | |
| 1510 | .ldsbankcount32, | |
| 1511 | .mad_mac_f32_insts, | |
| 1512 | .negative_unaligned_scratch_offset_bug, | |
| 1513 | .nsa_clause_bug, | |
| 1514 | .nsa_encoding, | |
| 1515 | .nsa_to_vmem_bug, | |
| 1516 | .offset_3f_bug, | |
| 1517 | .scalar_atomics, | |
| 1518 | .scalar_flat_scratch_insts, | |
| 1519 | .scalar_stores, | |
| 1520 | .smem_to_vector_write_hazard, | |
| 1521 | .vcmpx_exec_war_hazard, | |
| 1522 | .vcmpx_permlane_hazard, | |
| 1523 | .vmem_to_scalar_write_hazard, | |
| 1524 | .xnack_support, | |
| 1525 | }), | |
| 1526 | }; | |
| 1527 | pub const gfx1012 = CpuModel{ | |
| 1528 | .name = "gfx1012", | |
| 1529 | .llvm_name = "gfx1012", | |
| 1530 | .features = featureSet(&[_]Feature{ | |
| 1531 | .back_off_barrier, | |
| 1532 | .dl_insts, | |
| 1533 | .dot10_insts, | |
| 1534 | .dot1_insts, | |
| 1535 | .dot2_insts, | |
| 1536 | .dot5_insts, | |
| 1537 | .dot6_insts, | |
| 1538 | .dot7_insts, | |
| 1539 | .ds_src2_insts, | |
| 1540 | .flat_segment_offset_bug, | |
| 1541 | .get_wave_id_inst, | |
| 1542 | .gfx10, | |
| 1543 | .inst_fwd_prefetch_bug, | |
| 1544 | .lds_branch_vmem_war_hazard, | |
| 1545 | .lds_misaligned_bug, | |
| 1546 | .ldsbankcount32, | |
| 1547 | .mad_mac_f32_insts, | |
| 1548 | .negative_unaligned_scratch_offset_bug, | |
| 1549 | .nsa_clause_bug, | |
| 1550 | .nsa_encoding, | |
| 1551 | .nsa_to_vmem_bug, | |
| 1552 | .offset_3f_bug, | |
| 1553 | .scalar_atomics, | |
| 1554 | .scalar_flat_scratch_insts, | |
| 1555 | .scalar_stores, | |
| 1556 | .smem_to_vector_write_hazard, | |
| 1557 | .vcmpx_exec_war_hazard, | |
| 1558 | .vcmpx_permlane_hazard, | |
| 1559 | .vmem_to_scalar_write_hazard, | |
| 1560 | .xnack_support, | |
| 1561 | }), | |
| 1562 | }; | |
| 1563 | pub const gfx1013 = CpuModel{ | |
| 1564 | .name = "gfx1013", | |
| 1565 | .llvm_name = "gfx1013", | |
| 1566 | .features = featureSet(&[_]Feature{ | |
| 1567 | .back_off_barrier, | |
| 1568 | .dl_insts, | |
| 1569 | .ds_src2_insts, | |
| 1570 | .flat_segment_offset_bug, | |
| 1571 | .get_wave_id_inst, | |
| 1572 | .gfx10, | |
| 1573 | .gfx10_a_encoding, | |
| 1574 | .inst_fwd_prefetch_bug, | |
| 1575 | .lds_branch_vmem_war_hazard, | |
| 1576 | .lds_misaligned_bug, | |
| 1577 | .ldsbankcount32, | |
| 1578 | .mad_mac_f32_insts, | |
| 1579 | .negative_unaligned_scratch_offset_bug, | |
| 1580 | .nsa_clause_bug, | |
| 1581 | .nsa_encoding, | |
| 1582 | .nsa_to_vmem_bug, | |
| 1583 | .offset_3f_bug, | |
| 1584 | .scalar_atomics, | |
| 1585 | .scalar_flat_scratch_insts, | |
| 1586 | .scalar_stores, | |
| 1587 | .smem_to_vector_write_hazard, | |
| 1588 | .vcmpx_exec_war_hazard, | |
| 1589 | .vcmpx_permlane_hazard, | |
| 1590 | .vmem_to_scalar_write_hazard, | |
| 1591 | .xnack_support, | |
| 1592 | }), | |
| 1593 | }; | |
| 1594 | pub const gfx1030 = CpuModel{ | |
| 1595 | .name = "gfx1030", | |
| 1596 | .llvm_name = "gfx1030", | |
| 1597 | .features = featureSet(&[_]Feature{ | |
| 1598 | .back_off_barrier, | |
| 1599 | .dl_insts, | |
| 1600 | .dot10_insts, | |
| 1601 | .dot1_insts, | |
| 1602 | .dot2_insts, | |
| 1603 | .dot5_insts, | |
| 1604 | .dot6_insts, | |
| 1605 | .dot7_insts, | |
| 1606 | .gfx10, | |
| 1607 | .gfx10_3_insts, | |
| 1608 | .gfx10_a_encoding, | |
| 1609 | .gfx10_b_encoding, | |
| 1610 | .ldsbankcount32, | |
| 1611 | .nsa_encoding, | |
| 1612 | .shader_cycles_register, | |
| 1613 | }), | |
| 1614 | }; | |
| 1615 | pub const gfx1031 = CpuModel{ | |
| 1616 | .name = "gfx1031", | |
| 1617 | .llvm_name = "gfx1031", | |
| 1618 | .features = featureSet(&[_]Feature{ | |
| 1619 | .back_off_barrier, | |
| 1620 | .dl_insts, | |
| 1621 | .dot10_insts, | |
| 1622 | .dot1_insts, | |
| 1623 | .dot2_insts, | |
| 1624 | .dot5_insts, | |
| 1625 | .dot6_insts, | |
| 1626 | .dot7_insts, | |
| 1627 | .gfx10, | |
| 1628 | .gfx10_3_insts, | |
| 1629 | .gfx10_a_encoding, | |
| 1630 | .gfx10_b_encoding, | |
| 1631 | .ldsbankcount32, | |
| 1632 | .nsa_encoding, | |
| 1633 | .shader_cycles_register, | |
| 1634 | }), | |
| 1635 | }; | |
| 1636 | pub const gfx1032 = CpuModel{ | |
| 1637 | .name = "gfx1032", | |
| 1638 | .llvm_name = "gfx1032", | |
| 1639 | .features = featureSet(&[_]Feature{ | |
| 1640 | .back_off_barrier, | |
| 1641 | .dl_insts, | |
| 1642 | .dot10_insts, | |
| 1643 | .dot1_insts, | |
| 1644 | .dot2_insts, | |
| 1645 | .dot5_insts, | |
| 1646 | .dot6_insts, | |
| 1647 | .dot7_insts, | |
| 1648 | .gfx10, | |
| 1649 | .gfx10_3_insts, | |
| 1650 | .gfx10_a_encoding, | |
| 1651 | .gfx10_b_encoding, | |
| 1652 | .ldsbankcount32, | |
| 1653 | .nsa_encoding, | |
| 1654 | .shader_cycles_register, | |
| 1655 | }), | |
| 1656 | }; | |
| 1657 | pub const gfx1033 = CpuModel{ | |
| 1658 | .name = "gfx1033", | |
| 1659 | .llvm_name = "gfx1033", | |
| 1660 | .features = featureSet(&[_]Feature{ | |
| 1661 | .back_off_barrier, | |
| 1662 | .dl_insts, | |
| 1663 | .dot10_insts, | |
| 1664 | .dot1_insts, | |
| 1665 | .dot2_insts, | |
| 1666 | .dot5_insts, | |
| 1667 | .dot6_insts, | |
| 1668 | .dot7_insts, | |
| 1669 | .gfx10, | |
| 1670 | .gfx10_3_insts, | |
| 1671 | .gfx10_a_encoding, | |
| 1672 | .gfx10_b_encoding, | |
| 1673 | .ldsbankcount32, | |
| 1674 | .nsa_encoding, | |
| 1675 | .shader_cycles_register, | |
| 1676 | }), | |
| 1677 | }; | |
| 1678 | pub const gfx1034 = CpuModel{ | |
| 1679 | .name = "gfx1034", | |
| 1680 | .llvm_name = "gfx1034", | |
| 1681 | .features = featureSet(&[_]Feature{ | |
| 1682 | .back_off_barrier, | |
| 1683 | .dl_insts, | |
| 1684 | .dot10_insts, | |
| 1685 | .dot1_insts, | |
| 1686 | .dot2_insts, | |
| 1687 | .dot5_insts, | |
| 1688 | .dot6_insts, | |
| 1689 | .dot7_insts, | |
| 1690 | .gfx10, | |
| 1691 | .gfx10_3_insts, | |
| 1692 | .gfx10_a_encoding, | |
| 1693 | .gfx10_b_encoding, | |
| 1694 | .ldsbankcount32, | |
| 1695 | .nsa_encoding, | |
| 1696 | .shader_cycles_register, | |
| 1697 | }), | |
| 1698 | }; | |
| 1699 | pub const gfx1035 = CpuModel{ | |
| 1700 | .name = "gfx1035", | |
| 1701 | .llvm_name = "gfx1035", | |
| 1702 | .features = featureSet(&[_]Feature{ | |
| 1703 | .back_off_barrier, | |
| 1704 | .dl_insts, | |
| 1705 | .dot10_insts, | |
| 1706 | .dot1_insts, | |
| 1707 | .dot2_insts, | |
| 1708 | .dot5_insts, | |
| 1709 | .dot6_insts, | |
| 1710 | .dot7_insts, | |
| 1711 | .gfx10, | |
| 1712 | .gfx10_3_insts, | |
| 1713 | .gfx10_a_encoding, | |
| 1714 | .gfx10_b_encoding, | |
| 1715 | .ldsbankcount32, | |
| 1716 | .nsa_encoding, | |
| 1717 | .shader_cycles_register, | |
| 1718 | }), | |
| 1719 | }; | |
| 1720 | pub const gfx1036 = CpuModel{ | |
| 1721 | .name = "gfx1036", | |
| 1722 | .llvm_name = "gfx1036", | |
| 1723 | .features = featureSet(&[_]Feature{ | |
| 1724 | .back_off_barrier, | |
| 1725 | .dl_insts, | |
| 1726 | .dot10_insts, | |
| 1727 | .dot1_insts, | |
| 1728 | .dot2_insts, | |
| 1729 | .dot5_insts, | |
| 1730 | .dot6_insts, | |
| 1731 | .dot7_insts, | |
| 1732 | .gfx10, | |
| 1733 | .gfx10_3_insts, | |
| 1734 | .gfx10_a_encoding, | |
| 1735 | .gfx10_b_encoding, | |
| 1736 | .ldsbankcount32, | |
| 1737 | .nsa_encoding, | |
| 1738 | .shader_cycles_register, | |
| 1739 | }), | |
| 1740 | }; | |
| 1741 | pub const gfx10_1_generic = CpuModel{ | |
| 1742 | .name = "gfx10_1_generic", | |
| 1743 | .llvm_name = "gfx10-1-generic", | |
| 1744 | .features = featureSet(&[_]Feature{ | |
| 1745 | .back_off_barrier, | |
| 1746 | .dl_insts, | |
| 1747 | .ds_src2_insts, | |
| 1748 | .flat_segment_offset_bug, | |
| 1749 | .get_wave_id_inst, | |
| 1750 | .gfx10, | |
| 1751 | .inst_fwd_prefetch_bug, | |
| 1752 | .lds_branch_vmem_war_hazard, | |
| 1753 | .lds_misaligned_bug, | |
| 1754 | .ldsbankcount32, | |
| 1755 | .mad_mac_f32_insts, | |
| 1756 | .negative_unaligned_scratch_offset_bug, | |
| 1757 | .nsa_clause_bug, | |
| 1758 | .nsa_encoding, | |
| 1759 | .nsa_to_vmem_bug, | |
| 1760 | .offset_3f_bug, | |
| 1761 | .requires_cov6, | |
| 1762 | .scalar_atomics, | |
| 1763 | .scalar_flat_scratch_insts, | |
| 1764 | .scalar_stores, | |
| 1765 | .smem_to_vector_write_hazard, | |
| 1766 | .vcmpx_exec_war_hazard, | |
| 1767 | .vcmpx_permlane_hazard, | |
| 1768 | .vmem_to_scalar_write_hazard, | |
| 1769 | .xnack_support, | |
| 1770 | }), | |
| 1771 | }; | |
| 1772 | pub const gfx10_3_generic = CpuModel{ | |
| 1773 | .name = "gfx10_3_generic", | |
| 1774 | .llvm_name = "gfx10-3-generic", | |
| 1775 | .features = featureSet(&[_]Feature{ | |
| 1776 | .back_off_barrier, | |
| 1777 | .dl_insts, | |
| 1778 | .dot10_insts, | |
| 1779 | .dot1_insts, | |
| 1780 | .dot2_insts, | |
| 1781 | .dot5_insts, | |
| 1782 | .dot6_insts, | |
| 1783 | .dot7_insts, | |
| 1784 | .gfx10, | |
| 1785 | .gfx10_3_insts, | |
| 1786 | .gfx10_a_encoding, | |
| 1787 | .gfx10_b_encoding, | |
| 1788 | .ldsbankcount32, | |
| 1789 | .nsa_encoding, | |
| 1790 | .requires_cov6, | |
| 1791 | .shader_cycles_register, | |
| 1792 | }), | |
| 1793 | }; | |
| 1794 | pub const gfx1100 = CpuModel{ | |
| 1795 | .name = "gfx1100", | |
| 1796 | .llvm_name = "gfx1100", | |
| 1797 | .features = featureSet(&[_]Feature{ | |
| 1798 | .allocate1_5xvgprs, | |
| 1799 | .architected_flat_scratch, | |
| 1800 | .atomic_fadd_no_rtn_insts, | |
| 1801 | .atomic_fadd_rtn_insts, | |
| 1802 | .dl_insts, | |
| 1803 | .dot10_insts, | |
| 1804 | .dot5_insts, | |
| 1805 | .dot7_insts, | |
| 1806 | .dot8_insts, | |
| 1807 | .dot9_insts, | |
| 1808 | .flat_atomic_fadd_f32_inst, | |
| 1809 | .gfx11, | |
| 1810 | .image_insts, | |
| 1811 | .ldsbankcount32, | |
| 1812 | .mad_intra_fwd_bug, | |
| 1813 | .memory_atomic_fadd_f32_denormal_support, | |
| 1814 | .msaa_load_dst_sel_bug, | |
| 1815 | .nsa_encoding, | |
| 1816 | .packed_tid, | |
| 1817 | .partial_nsa_encoding, | |
| 1818 | .priv_enabled_trap2_nop_bug, | |
| 1819 | .shader_cycles_register, | |
| 1820 | .user_sgpr_init16_bug, | |
| 1821 | .valu_trans_use_hazard, | |
| 1822 | .vcmpx_permlane_hazard, | |
| 1823 | }), | |
| 1824 | }; | |
| 1825 | pub const gfx1101 = CpuModel{ | |
| 1826 | .name = "gfx1101", | |
| 1827 | .llvm_name = "gfx1101", | |
| 1828 | .features = featureSet(&[_]Feature{ | |
| 1829 | .allocate1_5xvgprs, | |
| 1830 | .architected_flat_scratch, | |
| 1831 | .atomic_fadd_no_rtn_insts, | |
| 1832 | .atomic_fadd_rtn_insts, | |
| 1833 | .dl_insts, | |
| 1834 | .dot10_insts, | |
| 1835 | .dot5_insts, | |
| 1836 | .dot7_insts, | |
| 1837 | .dot8_insts, | |
| 1838 | .dot9_insts, | |
| 1839 | .flat_atomic_fadd_f32_inst, | |
| 1840 | .gfx11, | |
| 1841 | .image_insts, | |
| 1842 | .ldsbankcount32, | |
| 1843 | .mad_intra_fwd_bug, | |
| 1844 | .memory_atomic_fadd_f32_denormal_support, | |
| 1845 | .msaa_load_dst_sel_bug, | |
| 1846 | .nsa_encoding, | |
| 1847 | .packed_tid, | |
| 1848 | .partial_nsa_encoding, | |
| 1849 | .priv_enabled_trap2_nop_bug, | |
| 1850 | .shader_cycles_register, | |
| 1851 | .valu_trans_use_hazard, | |
| 1852 | .vcmpx_permlane_hazard, | |
| 1853 | }), | |
| 1854 | }; | |
| 1855 | pub const gfx1102 = CpuModel{ | |
| 1856 | .name = "gfx1102", | |
| 1857 | .llvm_name = "gfx1102", | |
| 1858 | .features = featureSet(&[_]Feature{ | |
| 1859 | .architected_flat_scratch, | |
| 1860 | .atomic_fadd_no_rtn_insts, | |
| 1861 | .atomic_fadd_rtn_insts, | |
| 1862 | .dl_insts, | |
| 1863 | .dot10_insts, | |
| 1864 | .dot5_insts, | |
| 1865 | .dot7_insts, | |
| 1866 | .dot8_insts, | |
| 1867 | .dot9_insts, | |
| 1868 | .flat_atomic_fadd_f32_inst, | |
| 1869 | .gfx11, | |
| 1870 | .image_insts, | |
| 1871 | .ldsbankcount32, | |
| 1872 | .mad_intra_fwd_bug, | |
| 1873 | .memory_atomic_fadd_f32_denormal_support, | |
| 1874 | .msaa_load_dst_sel_bug, | |
| 1875 | .nsa_encoding, | |
| 1876 | .packed_tid, | |
| 1877 | .partial_nsa_encoding, | |
| 1878 | .priv_enabled_trap2_nop_bug, | |
| 1879 | .shader_cycles_register, | |
| 1880 | .user_sgpr_init16_bug, | |
| 1881 | .valu_trans_use_hazard, | |
| 1882 | .vcmpx_permlane_hazard, | |
| 1883 | }), | |
| 1884 | }; | |
| 1885 | pub const gfx1103 = CpuModel{ | |
| 1886 | .name = "gfx1103", | |
| 1887 | .llvm_name = "gfx1103", | |
| 1888 | .features = featureSet(&[_]Feature{ | |
| 1889 | .architected_flat_scratch, | |
| 1890 | .atomic_fadd_no_rtn_insts, | |
| 1891 | .atomic_fadd_rtn_insts, | |
| 1892 | .dl_insts, | |
| 1893 | .dot10_insts, | |
| 1894 | .dot5_insts, | |
| 1895 | .dot7_insts, | |
| 1896 | .dot8_insts, | |
| 1897 | .dot9_insts, | |
| 1898 | .flat_atomic_fadd_f32_inst, | |
| 1899 | .gfx11, | |
| 1900 | .image_insts, | |
| 1901 | .ldsbankcount32, | |
| 1902 | .mad_intra_fwd_bug, | |
| 1903 | .memory_atomic_fadd_f32_denormal_support, | |
| 1904 | .msaa_load_dst_sel_bug, | |
| 1905 | .nsa_encoding, | |
| 1906 | .packed_tid, | |
| 1907 | .partial_nsa_encoding, | |
| 1908 | .priv_enabled_trap2_nop_bug, | |
| 1909 | .shader_cycles_register, | |
| 1910 | .valu_trans_use_hazard, | |
| 1911 | .vcmpx_permlane_hazard, | |
| 1912 | }), | |
| 1913 | }; | |
| 1914 | pub const gfx1150 = CpuModel{ | |
| 1915 | .name = "gfx1150", | |
| 1916 | .llvm_name = "gfx1150", | |
| 1917 | .features = featureSet(&[_]Feature{ | |
| 1918 | .architected_flat_scratch, | |
| 1919 | .atomic_fadd_no_rtn_insts, | |
| 1920 | .atomic_fadd_rtn_insts, | |
| 1921 | .dl_insts, | |
| 1922 | .dot10_insts, | |
| 1923 | .dot5_insts, | |
| 1924 | .dot7_insts, | |
| 1925 | .dot8_insts, | |
| 1926 | .dot9_insts, | |
| 1927 | .dpp_src1_sgpr, | |
| 1928 | .flat_atomic_fadd_f32_inst, | |
| 1929 | .gfx11, | |
| 1930 | .image_insts, | |
| 1931 | .ldsbankcount32, | |
| 1932 | .memory_atomic_fadd_f32_denormal_support, | |
| 1933 | .nsa_encoding, | |
| 1934 | .packed_tid, | |
| 1935 | .partial_nsa_encoding, | |
| 1936 | .required_export_priority, | |
| 1937 | .salu_float, | |
| 1938 | .shader_cycles_register, | |
| 1939 | .vcmpx_permlane_hazard, | |
| 1940 | .vgpr_singleuse_hint, | |
| 1941 | }), | |
| 1942 | }; | |
| 1943 | pub const gfx1151 = CpuModel{ | |
| 1944 | .name = "gfx1151", | |
| 1945 | .llvm_name = "gfx1151", | |
| 1946 | .features = featureSet(&[_]Feature{ | |
| 1947 | .allocate1_5xvgprs, | |
| 1948 | .architected_flat_scratch, | |
| 1949 | .atomic_fadd_no_rtn_insts, | |
| 1950 | .atomic_fadd_rtn_insts, | |
| 1951 | .dl_insts, | |
| 1952 | .dot10_insts, | |
| 1953 | .dot5_insts, | |
| 1954 | .dot7_insts, | |
| 1955 | .dot8_insts, | |
| 1956 | .dot9_insts, | |
| 1957 | .dpp_src1_sgpr, | |
| 1958 | .flat_atomic_fadd_f32_inst, | |
| 1959 | .gfx11, | |
| 1960 | .image_insts, | |
| 1961 | .ldsbankcount32, | |
| 1962 | .memory_atomic_fadd_f32_denormal_support, | |
| 1963 | .nsa_encoding, | |
| 1964 | .packed_tid, | |
| 1965 | .partial_nsa_encoding, | |
| 1966 | .required_export_priority, | |
| 1967 | .salu_float, | |
| 1968 | .shader_cycles_register, | |
| 1969 | .vcmpx_permlane_hazard, | |
| 1970 | .vgpr_singleuse_hint, | |
| 1971 | }), | |
| 1972 | }; | |
| 1973 | pub const gfx1152 = CpuModel{ | |
| 1974 | .name = "gfx1152", | |
| 1975 | .llvm_name = "gfx1152", | |
| 1976 | .features = featureSet(&[_]Feature{ | |
| 1977 | .architected_flat_scratch, | |
| 1978 | .atomic_fadd_no_rtn_insts, | |
| 1979 | .atomic_fadd_rtn_insts, | |
| 1980 | .dl_insts, | |
| 1981 | .dot10_insts, | |
| 1982 | .dot5_insts, | |
| 1983 | .dot7_insts, | |
| 1984 | .dot8_insts, | |
| 1985 | .dot9_insts, | |
| 1986 | .dpp_src1_sgpr, | |
| 1987 | .flat_atomic_fadd_f32_inst, | |
| 1988 | .gfx11, | |
| 1989 | .image_insts, | |
| 1990 | .ldsbankcount32, | |
| 1991 | .memory_atomic_fadd_f32_denormal_support, | |
| 1992 | .nsa_encoding, | |
| 1993 | .packed_tid, | |
| 1994 | .partial_nsa_encoding, | |
| 1995 | .required_export_priority, | |
| 1996 | .salu_float, | |
| 1997 | .shader_cycles_register, | |
| 1998 | .vcmpx_permlane_hazard, | |
| 1999 | .vgpr_singleuse_hint, | |
| 2000 | }), | |
| 2001 | }; | |
| 2002 | pub const gfx11_generic = CpuModel{ | |
| 2003 | .name = "gfx11_generic", | |
| 2004 | .llvm_name = "gfx11-generic", | |
| 2005 | .features = featureSet(&[_]Feature{ | |
| 2006 | .architected_flat_scratch, | |
| 2007 | .atomic_fadd_no_rtn_insts, | |
| 2008 | .atomic_fadd_rtn_insts, | |
| 2009 | .dl_insts, | |
| 2010 | .dot10_insts, | |
| 2011 | .dot5_insts, | |
| 2012 | .dot7_insts, | |
| 2013 | .dot8_insts, | |
| 2014 | .dot9_insts, | |
| 2015 | .flat_atomic_fadd_f32_inst, | |
| 2016 | .gfx11, | |
| 2017 | .image_insts, | |
| 2018 | .ldsbankcount32, | |
| 2019 | .mad_intra_fwd_bug, | |
| 2020 | .memory_atomic_fadd_f32_denormal_support, | |
| 2021 | .msaa_load_dst_sel_bug, | |
| 2022 | .nsa_encoding, | |
| 2023 | .packed_tid, | |
| 2024 | .partial_nsa_encoding, | |
| 2025 | .priv_enabled_trap2_nop_bug, | |
| 2026 | .required_export_priority, | |
| 2027 | .requires_cov6, | |
| 2028 | .shader_cycles_register, | |
| 2029 | .user_sgpr_init16_bug, | |
| 2030 | .valu_trans_use_hazard, | |
| 2031 | .vcmpx_permlane_hazard, | |
| 2032 | }), | |
| 2033 | }; | |
| 2034 | pub const gfx1200 = CpuModel{ | |
| 2035 | .name = "gfx1200", | |
| 2036 | .llvm_name = "gfx1200", | |
| 2037 | .features = featureSet(&[_]Feature{ | |
| 2038 | .allocate1_5xvgprs, | |
| 2039 | .architected_flat_scratch, | |
| 2040 | .architected_sgprs, | |
| 2041 | .atomic_buffer_global_pk_add_f16_insts, | |
| 2042 | .atomic_buffer_pk_add_bf16_inst, | |
| 2043 | .atomic_ds_pk_add_16_insts, | |
| 2044 | .atomic_fadd_no_rtn_insts, | |
| 2045 | .atomic_fadd_rtn_insts, | |
| 2046 | .atomic_flat_pk_add_16_insts, | |
| 2047 | .atomic_global_pk_add_bf16_inst, | |
| 2048 | .dl_insts, | |
| 2049 | .dot10_insts, | |
| 2050 | .dot11_insts, | |
| 2051 | .dot7_insts, | |
| 2052 | .dot8_insts, | |
| 2053 | .dot9_insts, | |
| 2054 | .dpp_src1_sgpr, | |
| 2055 | .extended_image_insts, | |
| 2056 | .flat_atomic_fadd_f32_inst, | |
| 2057 | .fp8_conversion_insts, | |
| 2058 | .gfx12, | |
| 2059 | .image_insts, | |
| 2060 | .ldsbankcount32, | |
| 2061 | .memory_atomic_fadd_f32_denormal_support, | |
| 2062 | .nsa_encoding, | |
| 2063 | .packed_tid, | |
| 2064 | .partial_nsa_encoding, | |
| 2065 | .pseudo_scalar_trans, | |
| 2066 | .restricted_soffset, | |
| 2067 | .salu_float, | |
| 2068 | .scalar_dwordx3_loads, | |
| 2069 | .shader_cycles_hi_lo_registers, | |
| 2070 | .vcmpx_permlane_hazard, | |
| 2071 | .vgpr_singleuse_hint, | |
| 2072 | }), | |
| 2073 | }; | |
| 2074 | pub const gfx1201 = CpuModel{ | |
| 2075 | .name = "gfx1201", | |
| 2076 | .llvm_name = "gfx1201", | |
| 2077 | .features = featureSet(&[_]Feature{ | |
| 2078 | .allocate1_5xvgprs, | |
| 2079 | .architected_flat_scratch, | |
| 2080 | .architected_sgprs, | |
| 2081 | .atomic_buffer_global_pk_add_f16_insts, | |
| 2082 | .atomic_buffer_pk_add_bf16_inst, | |
| 2083 | .atomic_ds_pk_add_16_insts, | |
| 2084 | .atomic_fadd_no_rtn_insts, | |
| 2085 | .atomic_fadd_rtn_insts, | |
| 2086 | .atomic_flat_pk_add_16_insts, | |
| 2087 | .atomic_global_pk_add_bf16_inst, | |
| 2088 | .dl_insts, | |
| 2089 | .dot10_insts, | |
| 2090 | .dot11_insts, | |
| 2091 | .dot7_insts, | |
| 2092 | .dot8_insts, | |
| 2093 | .dot9_insts, | |
| 2094 | .dpp_src1_sgpr, | |
| 2095 | .extended_image_insts, | |
| 2096 | .flat_atomic_fadd_f32_inst, | |
| 2097 | .fp8_conversion_insts, | |
| 2098 | .gfx12, | |
| 2099 | .image_insts, | |
| 2100 | .ldsbankcount32, | |
| 2101 | .memory_atomic_fadd_f32_denormal_support, | |
| 2102 | .nsa_encoding, | |
| 2103 | .packed_tid, | |
| 2104 | .partial_nsa_encoding, | |
| 2105 | .pseudo_scalar_trans, | |
| 2106 | .restricted_soffset, | |
| 2107 | .salu_float, | |
| 2108 | .scalar_dwordx3_loads, | |
| 2109 | .shader_cycles_hi_lo_registers, | |
| 2110 | .vcmpx_permlane_hazard, | |
| 2111 | .vgpr_singleuse_hint, | |
| 2112 | }), | |
| 2113 | }; | |
| 2114 | pub const gfx12_generic = CpuModel{ | |
| 2115 | .name = "gfx12_generic", | |
| 2116 | .llvm_name = "gfx12-generic", | |
| 2117 | .features = featureSet(&[_]Feature{ | |
| 2118 | .allocate1_5xvgprs, | |
| 2119 | .architected_flat_scratch, | |
| 2120 | .architected_sgprs, | |
| 2121 | .atomic_buffer_global_pk_add_f16_insts, | |
| 2122 | .atomic_buffer_pk_add_bf16_inst, | |
| 2123 | .atomic_ds_pk_add_16_insts, | |
| 2124 | .atomic_fadd_no_rtn_insts, | |
| 2125 | .atomic_fadd_rtn_insts, | |
| 2126 | .atomic_flat_pk_add_16_insts, | |
| 2127 | .atomic_global_pk_add_bf16_inst, | |
| 2128 | .dl_insts, | |
| 2129 | .dot10_insts, | |
| 2130 | .dot11_insts, | |
| 2131 | .dot7_insts, | |
| 2132 | .dot8_insts, | |
| 2133 | .dot9_insts, | |
| 2134 | .dpp_src1_sgpr, | |
| 2135 | .extended_image_insts, | |
| 2136 | .flat_atomic_fadd_f32_inst, | |
| 2137 | .fp8_conversion_insts, | |
| 2138 | .gfx12, | |
| 2139 | .image_insts, | |
| 2140 | .ldsbankcount32, | |
| 2141 | .memory_atomic_fadd_f32_denormal_support, | |
| 2142 | .nsa_encoding, | |
| 2143 | .packed_tid, | |
| 2144 | .partial_nsa_encoding, | |
| 2145 | .pseudo_scalar_trans, | |
| 2146 | .requires_cov6, | |
| 2147 | .restricted_soffset, | |
| 2148 | .salu_float, | |
| 2149 | .scalar_dwordx3_loads, | |
| 2150 | .shader_cycles_hi_lo_registers, | |
| 2151 | .vcmpx_permlane_hazard, | |
| 2152 | .vgpr_singleuse_hint, | |
| 2153 | }), | |
| 2154 | }; | |
| 2155 | pub const gfx600 = CpuModel{ | |
| 2156 | .name = "gfx600", | |
| 2157 | .llvm_name = "gfx600", | |
| 2158 | .features = featureSet(&[_]Feature{ | |
| 2159 | .fast_fmaf, | |
| 2160 | .half_rate_64_ops, | |
| 2161 | .southern_islands, | |
| 2162 | }), | |
| 2163 | }; | |
| 2164 | pub const gfx601 = CpuModel{ | |
| 2165 | .name = "gfx601", | |
| 2166 | .llvm_name = "gfx601", | |
| 2167 | .features = featureSet(&[_]Feature{ | |
| 2168 | .southern_islands, | |
| 2169 | }), | |
| 2170 | }; | |
| 2171 | pub const gfx602 = CpuModel{ | |
| 2172 | .name = "gfx602", | |
| 2173 | .llvm_name = "gfx602", | |
| 2174 | .features = featureSet(&[_]Feature{ | |
| 2175 | .southern_islands, | |
| 2176 | }), | |
| 2177 | }; | |
| 2178 | pub const gfx700 = CpuModel{ | |
| 2179 | .name = "gfx700", | |
| 2180 | .llvm_name = "gfx700", | |
| 2181 | .features = featureSet(&[_]Feature{ | |
| 2182 | .ldsbankcount32, | |
| 2183 | .sea_islands, | |
| 2184 | }), | |
| 2185 | }; | |
| 2186 | pub const gfx701 = CpuModel{ | |
| 2187 | .name = "gfx701", | |
| 2188 | .llvm_name = "gfx701", | |
| 2189 | .features = featureSet(&[_]Feature{ | |
| 2190 | .fast_fmaf, | |
| 2191 | .half_rate_64_ops, | |
| 2192 | .ldsbankcount32, | |
| 2193 | .sea_islands, | |
| 2194 | }), | |
| 2195 | }; | |
| 2196 | pub const gfx702 = CpuModel{ | |
| 2197 | .name = "gfx702", | |
| 2198 | .llvm_name = "gfx702", | |
| 2199 | .features = featureSet(&[_]Feature{ | |
| 2200 | .fast_fmaf, | |
| 2201 | .ldsbankcount16, | |
| 2202 | .sea_islands, | |
| 2203 | }), | |
| 2204 | }; | |
| 2205 | pub const gfx703 = CpuModel{ | |
| 2206 | .name = "gfx703", | |
| 2207 | .llvm_name = "gfx703", | |
| 2208 | .features = featureSet(&[_]Feature{ | |
| 2209 | .ldsbankcount16, | |
| 2210 | .sea_islands, | |
| 2211 | }), | |
| 2212 | }; | |
| 2213 | pub const gfx704 = CpuModel{ | |
| 2214 | .name = "gfx704", | |
| 2215 | .llvm_name = "gfx704", | |
| 2216 | .features = featureSet(&[_]Feature{ | |
| 2217 | .ldsbankcount32, | |
| 2218 | .sea_islands, | |
| 2219 | }), | |
| 2220 | }; | |
| 2221 | pub const gfx705 = CpuModel{ | |
| 2222 | .name = "gfx705", | |
| 2223 | .llvm_name = "gfx705", | |
| 2224 | .features = featureSet(&[_]Feature{ | |
| 2225 | .ldsbankcount16, | |
| 2226 | .sea_islands, | |
| 2227 | }), | |
| 2228 | }; | |
| 2229 | pub const gfx801 = CpuModel{ | |
| 2230 | .name = "gfx801", | |
| 2231 | .llvm_name = "gfx801", | |
| 2232 | .features = featureSet(&[_]Feature{ | |
| 2233 | .fast_fmaf, | |
| 2234 | .half_rate_64_ops, | |
| 2235 | .ldsbankcount32, | |
| 2236 | .unpacked_d16_vmem, | |
| 2237 | .volcanic_islands, | |
| 2238 | .xnack_support, | |
| 2239 | }), | |
| 2240 | }; | |
| 2241 | pub const gfx802 = CpuModel{ | |
| 2242 | .name = "gfx802", | |
| 2243 | .llvm_name = "gfx802", | |
| 2244 | .features = featureSet(&[_]Feature{ | |
| 2245 | .ldsbankcount32, | |
| 2246 | .sgpr_init_bug, | |
| 2247 | .unpacked_d16_vmem, | |
| 2248 | .volcanic_islands, | |
| 2249 | }), | |
| 2250 | }; | |
| 2251 | pub const gfx803 = CpuModel{ | |
| 2252 | .name = "gfx803", | |
| 2253 | .llvm_name = "gfx803", | |
| 2254 | .features = featureSet(&[_]Feature{ | |
| 2255 | .ldsbankcount32, | |
| 2256 | .unpacked_d16_vmem, | |
| 2257 | .volcanic_islands, | |
| 2258 | }), | |
| 2259 | }; | |
| 2260 | pub const gfx805 = CpuModel{ | |
| 2261 | .name = "gfx805", | |
| 2262 | .llvm_name = "gfx805", | |
| 2263 | .features = featureSet(&[_]Feature{ | |
| 2264 | .ldsbankcount32, | |
| 2265 | .sgpr_init_bug, | |
| 2266 | .unpacked_d16_vmem, | |
| 2267 | .volcanic_islands, | |
| 2268 | }), | |
| 2269 | }; | |
| 2270 | pub const gfx810 = CpuModel{ | |
| 2271 | .name = "gfx810", | |
| 2272 | .llvm_name = "gfx810", | |
| 2273 | .features = featureSet(&[_]Feature{ | |
| 2274 | .image_gather4_d16_bug, | |
| 2275 | .image_store_d16_bug, | |
| 2276 | .ldsbankcount16, | |
| 2277 | .volcanic_islands, | |
| 2278 | .xnack_support, | |
| 2279 | }), | |
| 2280 | }; | |
| 2281 | pub const gfx900 = CpuModel{ | |
| 2282 | .name = "gfx900", | |
| 2283 | .llvm_name = "gfx900", | |
| 2284 | .features = featureSet(&[_]Feature{ | |
| 2285 | .ds_src2_insts, | |
| 2286 | .extended_image_insts, | |
| 2287 | .gds, | |
| 2288 | .gfx9, | |
| 2289 | .image_gather4_d16_bug, | |
| 2290 | .image_insts, | |
| 2291 | .ldsbankcount32, | |
| 2292 | .mad_mac_f32_insts, | |
| 2293 | .mad_mix_insts, | |
| 2294 | }), | |
| 2295 | }; | |
| 2296 | pub const gfx902 = CpuModel{ | |
| 2297 | .name = "gfx902", | |
| 2298 | .llvm_name = "gfx902", | |
| 2299 | .features = featureSet(&[_]Feature{ | |
| 2300 | .ds_src2_insts, | |
| 2301 | .extended_image_insts, | |
| 2302 | .gds, | |
| 2303 | .gfx9, | |
| 2304 | .image_gather4_d16_bug, | |
| 2305 | .image_insts, | |
| 2306 | .ldsbankcount32, | |
| 2307 | .mad_mac_f32_insts, | |
| 2308 | .mad_mix_insts, | |
| 2309 | }), | |
| 2310 | }; | |
| 2311 | pub const gfx904 = CpuModel{ | |
| 2312 | .name = "gfx904", | |
| 2313 | .llvm_name = "gfx904", | |
| 2314 | .features = featureSet(&[_]Feature{ | |
| 2315 | .ds_src2_insts, | |
| 2316 | .extended_image_insts, | |
| 2317 | .fma_mix_insts, | |
| 2318 | .gds, | |
| 2319 | .gfx9, | |
| 2320 | .image_gather4_d16_bug, | |
| 2321 | .image_insts, | |
| 2322 | .ldsbankcount32, | |
| 2323 | .mad_mac_f32_insts, | |
| 2324 | }), | |
| 2325 | }; | |
| 2326 | pub const gfx906 = CpuModel{ | |
| 2327 | .name = "gfx906", | |
| 2328 | .llvm_name = "gfx906", | |
| 2329 | .features = featureSet(&[_]Feature{ | |
| 2330 | .dl_insts, | |
| 2331 | .dot10_insts, | |
| 2332 | .dot1_insts, | |
| 2333 | .dot2_insts, | |
| 2334 | .dot7_insts, | |
| 2335 | .ds_src2_insts, | |
| 2336 | .extended_image_insts, | |
| 2337 | .fma_mix_insts, | |
| 2338 | .gds, | |
| 2339 | .gfx9, | |
| 2340 | .half_rate_64_ops, | |
| 2341 | .image_gather4_d16_bug, | |
| 2342 | .image_insts, | |
| 2343 | .ldsbankcount32, | |
| 2344 | .mad_mac_f32_insts, | |
| 2345 | .sramecc_support, | |
| 2346 | }), | |
| 2347 | }; | |
| 2348 | pub const gfx908 = CpuModel{ | |
| 2349 | .name = "gfx908", | |
| 2350 | .llvm_name = "gfx908", | |
| 2351 | .features = featureSet(&[_]Feature{ | |
| 2352 | .atomic_buffer_global_pk_add_f16_no_rtn_insts, | |
| 2353 | .atomic_fadd_no_rtn_insts, | |
| 2354 | .dl_insts, | |
| 2355 | .dot10_insts, | |
| 2356 | .dot1_insts, | |
| 2357 | .dot2_insts, | |
| 2358 | .dot3_insts, | |
| 2359 | .dot4_insts, | |
| 2360 | .dot5_insts, | |
| 2361 | .dot6_insts, | |
| 2362 | .dot7_insts, | |
| 2363 | .ds_src2_insts, | |
| 2364 | .extended_image_insts, | |
| 2365 | .fma_mix_insts, | |
| 2366 | .gds, | |
| 2367 | .gfx9, | |
| 2368 | .half_rate_64_ops, | |
| 2369 | .image_gather4_d16_bug, | |
| 2370 | .image_insts, | |
| 2371 | .ldsbankcount32, | |
| 2372 | .mad_mac_f32_insts, | |
| 2373 | .mai_insts, | |
| 2374 | .mfma_inline_literal_bug, | |
| 2375 | .pk_fmac_f16_inst, | |
| 2376 | .sramecc_support, | |
| 2377 | }), | |
| 2378 | }; | |
| 2379 | pub const gfx909 = CpuModel{ | |
| 2380 | .name = "gfx909", | |
| 2381 | .llvm_name = "gfx909", | |
| 2382 | .features = featureSet(&[_]Feature{ | |
| 2383 | .ds_src2_insts, | |
| 2384 | .extended_image_insts, | |
| 2385 | .gds, | |
| 2386 | .gfx9, | |
| 2387 | .image_gather4_d16_bug, | |
| 2388 | .image_insts, | |
| 2389 | .ldsbankcount32, | |
| 2390 | .mad_mac_f32_insts, | |
| 2391 | .mad_mix_insts, | |
| 2392 | }), | |
| 2393 | }; | |
| 2394 | pub const gfx90a = CpuModel{ | |
| 2395 | .name = "gfx90a", | |
| 2396 | .llvm_name = "gfx90a", | |
| 2397 | .features = featureSet(&[_]Feature{ | |
| 2398 | .atomic_buffer_global_pk_add_f16_insts, | |
| 2399 | .atomic_fadd_no_rtn_insts, | |
| 2400 | .atomic_fadd_rtn_insts, | |
| 2401 | .atomic_fmin_fmax_flat_f64, | |
| 2402 | .atomic_fmin_fmax_global_f64, | |
| 2403 | .back_off_barrier, | |
| 2404 | .dl_insts, | |
| 2405 | .dot10_insts, | |
| 2406 | .dot1_insts, | |
| 2407 | .dot2_insts, | |
| 2408 | .dot3_insts, | |
| 2409 | .dot4_insts, | |
| 2410 | .dot5_insts, | |
| 2411 | .dot6_insts, | |
| 2412 | .dot7_insts, | |
| 2413 | .dpp_64bit, | |
| 2414 | .flat_buffer_global_fadd_f64_inst, | |
| 2415 | .fma_mix_insts, | |
| 2416 | .fmacf64_inst, | |
| 2417 | .full_rate_64_ops, | |
| 2418 | .gfx9, | |
| 2419 | .gfx90a_insts, | |
| 2420 | .image_insts, | |
| 2421 | .kernarg_preload, | |
| 2422 | .ldsbankcount32, | |
| 2423 | .mad_mac_f32_insts, | |
| 2424 | .mai_insts, | |
| 2425 | .packed_fp32_ops, | |
| 2426 | .packed_tid, | |
| 2427 | .pk_fmac_f16_inst, | |
| 2428 | .sramecc_support, | |
| 2429 | }), | |
| 2430 | }; | |
| 2431 | pub const gfx90c = CpuModel{ | |
| 2432 | .name = "gfx90c", | |
| 2433 | .llvm_name = "gfx90c", | |
| 2434 | .features = featureSet(&[_]Feature{ | |
| 2435 | .ds_src2_insts, | |
| 2436 | .extended_image_insts, | |
| 2437 | .gds, | |
| 2438 | .gfx9, | |
| 2439 | .image_gather4_d16_bug, | |
| 2440 | .image_insts, | |
| 2441 | .ldsbankcount32, | |
| 2442 | .mad_mac_f32_insts, | |
| 2443 | .mad_mix_insts, | |
| 2444 | }), | |
| 2445 | }; | |
| 2446 | pub const gfx940 = CpuModel{ | |
| 2447 | .name = "gfx940", | |
| 2448 | .llvm_name = "gfx940", | |
| 2449 | .features = featureSet(&[_]Feature{ | |
| 2450 | .agent_scope_fine_grained_remote_memory_atomics, | |
| 2451 | .architected_flat_scratch, | |
| 2452 | .atomic_buffer_global_pk_add_f16_insts, | |
| 2453 | .atomic_ds_pk_add_16_insts, | |
| 2454 | .atomic_fadd_no_rtn_insts, | |
| 2455 | .atomic_fadd_rtn_insts, | |
| 2456 | .atomic_flat_pk_add_16_insts, | |
| 2457 | .atomic_fmin_fmax_flat_f64, | |
| 2458 | .atomic_fmin_fmax_global_f64, | |
| 2459 | .atomic_global_pk_add_bf16_inst, | |
| 2460 | .back_off_barrier, | |
| 2461 | .dl_insts, | |
| 2462 | .dot10_insts, | |
| 2463 | .dot1_insts, | |
| 2464 | .dot2_insts, | |
| 2465 | .dot3_insts, | |
| 2466 | .dot4_insts, | |
| 2467 | .dot5_insts, | |
| 2468 | .dot6_insts, | |
| 2469 | .dot7_insts, | |
| 2470 | .dpp_64bit, | |
| 2471 | .flat_atomic_fadd_f32_inst, | |
| 2472 | .flat_buffer_global_fadd_f64_inst, | |
| 2473 | .fma_mix_insts, | |
| 2474 | .fmacf64_inst, | |
| 2475 | .force_store_sc0_sc1, | |
| 2476 | .fp8_conversion_insts, | |
| 2477 | .fp8_insts, | |
| 2478 | .full_rate_64_ops, | |
| 2479 | .gfx9, | |
| 2480 | .gfx90a_insts, | |
| 2481 | .gfx940_insts, | |
| 2482 | .kernarg_preload, | |
| 2483 | .ldsbankcount32, | |
| 2484 | .mai_insts, | |
| 2485 | .memory_atomic_fadd_f32_denormal_support, | |
| 2486 | .packed_fp32_ops, | |
| 2487 | .packed_tid, | |
| 2488 | .pk_fmac_f16_inst, | |
| 2489 | .sramecc_support, | |
| 2490 | }), | |
| 2491 | }; | |
| 2492 | pub const gfx941 = CpuModel{ | |
| 2493 | .name = "gfx941", | |
| 2494 | .llvm_name = "gfx941", | |
| 2495 | .features = featureSet(&[_]Feature{ | |
| 2496 | .agent_scope_fine_grained_remote_memory_atomics, | |
| 2497 | .architected_flat_scratch, | |
| 2498 | .atomic_buffer_global_pk_add_f16_insts, | |
| 2499 | .atomic_ds_pk_add_16_insts, | |
| 2500 | .atomic_fadd_no_rtn_insts, | |
| 2501 | .atomic_fadd_rtn_insts, | |
| 2502 | .atomic_flat_pk_add_16_insts, | |
| 2503 | .atomic_fmin_fmax_flat_f64, | |
| 2504 | .atomic_fmin_fmax_global_f64, | |
| 2505 | .atomic_global_pk_add_bf16_inst, | |
| 2506 | .back_off_barrier, | |
| 2507 | .dl_insts, | |
| 2508 | .dot10_insts, | |
| 2509 | .dot1_insts, | |
| 2510 | .dot2_insts, | |
| 2511 | .dot3_insts, | |
| 2512 | .dot4_insts, | |
| 2513 | .dot5_insts, | |
| 2514 | .dot6_insts, | |
| 2515 | .dot7_insts, | |
| 2516 | .dpp_64bit, | |
| 2517 | .flat_atomic_fadd_f32_inst, | |
| 2518 | .flat_buffer_global_fadd_f64_inst, | |
| 2519 | .fma_mix_insts, | |
| 2520 | .fmacf64_inst, | |
| 2521 | .force_store_sc0_sc1, | |
| 2522 | .fp8_conversion_insts, | |
| 2523 | .fp8_insts, | |
| 2524 | .full_rate_64_ops, | |
| 2525 | .gfx9, | |
| 2526 | .gfx90a_insts, | |
| 2527 | .gfx940_insts, | |
| 2528 | .kernarg_preload, | |
| 2529 | .ldsbankcount32, | |
| 2530 | .mai_insts, | |
| 2531 | .memory_atomic_fadd_f32_denormal_support, | |
| 2532 | .packed_fp32_ops, | |
| 2533 | .packed_tid, | |
| 2534 | .pk_fmac_f16_inst, | |
| 2535 | .sramecc_support, | |
| 2536 | }), | |
| 2537 | }; | |
| 2538 | pub const gfx942 = CpuModel{ | |
| 2539 | .name = "gfx942", | |
| 2540 | .llvm_name = "gfx942", | |
| 2541 | .features = featureSet(&[_]Feature{ | |
| 2542 | .agent_scope_fine_grained_remote_memory_atomics, | |
| 2543 | .architected_flat_scratch, | |
| 2544 | .atomic_buffer_global_pk_add_f16_insts, | |
| 2545 | .atomic_ds_pk_add_16_insts, | |
| 2546 | .atomic_fadd_no_rtn_insts, | |
| 2547 | .atomic_fadd_rtn_insts, | |
| 2548 | .atomic_flat_pk_add_16_insts, | |
| 2549 | .atomic_fmin_fmax_flat_f64, | |
| 2550 | .atomic_fmin_fmax_global_f64, | |
| 2551 | .atomic_global_pk_add_bf16_inst, | |
| 2552 | .back_off_barrier, | |
| 2553 | .dl_insts, | |
| 2554 | .dot10_insts, | |
| 2555 | .dot1_insts, | |
| 2556 | .dot2_insts, | |
| 2557 | .dot3_insts, | |
| 2558 | .dot4_insts, | |
| 2559 | .dot5_insts, | |
| 2560 | .dot6_insts, | |
| 2561 | .dot7_insts, | |
| 2562 | .dpp_64bit, | |
| 2563 | .flat_atomic_fadd_f32_inst, | |
| 2564 | .flat_buffer_global_fadd_f64_inst, | |
| 2565 | .fma_mix_insts, | |
| 2566 | .fmacf64_inst, | |
| 2567 | .fp8_conversion_insts, | |
| 2568 | .fp8_insts, | |
| 2569 | .full_rate_64_ops, | |
| 2570 | .gfx9, | |
| 2571 | .gfx90a_insts, | |
| 2572 | .gfx940_insts, | |
| 2573 | .kernarg_preload, | |
| 2574 | .ldsbankcount32, | |
| 2575 | .mai_insts, | |
| 2576 | .memory_atomic_fadd_f32_denormal_support, | |
| 2577 | .packed_fp32_ops, | |
| 2578 | .packed_tid, | |
| 2579 | .pk_fmac_f16_inst, | |
| 2580 | .sramecc_support, | |
| 2581 | }), | |
| 2582 | }; | |
| 2583 | pub const gfx9_generic = CpuModel{ | |
| 2584 | .name = "gfx9_generic", | |
| 2585 | .llvm_name = "gfx9-generic", | |
| 2586 | .features = featureSet(&[_]Feature{ | |
| 2587 | .ds_src2_insts, | |
| 2588 | .extended_image_insts, | |
| 2589 | .gds, | |
| 2590 | .gfx9, | |
| 2591 | .image_gather4_d16_bug, | |
| 2592 | .image_insts, | |
| 2593 | .ldsbankcount32, | |
| 2594 | .mad_mac_f32_insts, | |
| 2595 | .requires_cov6, | |
| 2596 | }), | |
| 2597 | }; | |
| 2598 | pub const hainan = CpuModel{ | |
| 2599 | .name = "hainan", | |
| 2600 | .llvm_name = "hainan", | |
| 2601 | .features = featureSet(&[_]Feature{ | |
| 2602 | .southern_islands, | |
| 2603 | }), | |
| 2604 | }; | |
| 2605 | pub const hawaii = CpuModel{ | |
| 2606 | .name = "hawaii", | |
| 2607 | .llvm_name = "hawaii", | |
| 2608 | .features = featureSet(&[_]Feature{ | |
| 2609 | .fast_fmaf, | |
| 2610 | .half_rate_64_ops, | |
| 2611 | .ldsbankcount32, | |
| 2612 | .sea_islands, | |
| 2613 | }), | |
| 2614 | }; | |
| 2615 | pub const iceland = CpuModel{ | |
| 2616 | .name = "iceland", | |
| 2617 | .llvm_name = "iceland", | |
| 2618 | .features = featureSet(&[_]Feature{ | |
| 2619 | .ldsbankcount32, | |
| 2620 | .sgpr_init_bug, | |
| 2621 | .unpacked_d16_vmem, | |
| 2622 | .volcanic_islands, | |
| 2623 | }), | |
| 2624 | }; | |
| 2625 | pub const kabini = CpuModel{ | |
| 2626 | .name = "kabini", | |
| 2627 | .llvm_name = "kabini", | |
| 2628 | .features = featureSet(&[_]Feature{ | |
| 2629 | .ldsbankcount16, | |
| 2630 | .sea_islands, | |
| 2631 | }), | |
| 2632 | }; | |
| 2633 | pub const kaveri = CpuModel{ | |
| 2634 | .name = "kaveri", | |
| 2635 | .llvm_name = "kaveri", | |
| 2636 | .features = featureSet(&[_]Feature{ | |
| 2637 | .ldsbankcount32, | |
| 2638 | .sea_islands, | |
| 2639 | }), | |
| 2640 | }; | |
| 2641 | pub const mullins = CpuModel{ | |
| 2642 | .name = "mullins", | |
| 2643 | .llvm_name = "mullins", | |
| 2644 | .features = featureSet(&[_]Feature{ | |
| 2645 | .ldsbankcount16, | |
| 2646 | .sea_islands, | |
| 2647 | }), | |
| 2648 | }; | |
| 2649 | pub const oland = CpuModel{ | |
| 2650 | .name = "oland", | |
| 2651 | .llvm_name = "oland", | |
| 2652 | .features = featureSet(&[_]Feature{ | |
| 2653 | .southern_islands, | |
| 2654 | }), | |
| 2655 | }; | |
| 2656 | pub const pitcairn = CpuModel{ | |
| 2657 | .name = "pitcairn", | |
| 2658 | .llvm_name = "pitcairn", | |
| 2659 | .features = featureSet(&[_]Feature{ | |
| 2660 | .southern_islands, | |
| 2661 | }), | |
| 2662 | }; | |
| 2663 | pub const polaris10 = CpuModel{ | |
| 2664 | .name = "polaris10", | |
| 2665 | .llvm_name = "polaris10", | |
| 2666 | .features = featureSet(&[_]Feature{ | |
| 2667 | .ldsbankcount32, | |
| 2668 | .unpacked_d16_vmem, | |
| 2669 | .volcanic_islands, | |
| 2670 | }), | |
| 2671 | }; | |
| 2672 | pub const polaris11 = CpuModel{ | |
| 2673 | .name = "polaris11", | |
| 2674 | .llvm_name = "polaris11", | |
| 2675 | .features = featureSet(&[_]Feature{ | |
| 2676 | .ldsbankcount32, | |
| 2677 | .unpacked_d16_vmem, | |
| 2678 | .volcanic_islands, | |
| 2679 | }), | |
| 2680 | }; | |
| 2681 | pub const stoney = CpuModel{ | |
| 2682 | .name = "stoney", | |
| 2683 | .llvm_name = "stoney", | |
| 2684 | .features = featureSet(&[_]Feature{ | |
| 2685 | .image_gather4_d16_bug, | |
| 2686 | .image_store_d16_bug, | |
| 2687 | .ldsbankcount16, | |
| 2688 | .volcanic_islands, | |
| 2689 | .xnack_support, | |
| 2690 | }), | |
| 2691 | }; | |
| 2692 | pub const tahiti = CpuModel{ | |
| 2693 | .name = "tahiti", | |
| 2694 | .llvm_name = "tahiti", | |
| 2695 | .features = featureSet(&[_]Feature{ | |
| 2696 | .fast_fmaf, | |
| 2697 | .half_rate_64_ops, | |
| 2698 | .southern_islands, | |
| 2699 | }), | |
| 2700 | }; | |
| 2701 | pub const tonga = CpuModel{ | |
| 2702 | .name = "tonga", | |
| 2703 | .llvm_name = "tonga", | |
| 2704 | .features = featureSet(&[_]Feature{ | |
| 2705 | .ldsbankcount32, | |
| 2706 | .sgpr_init_bug, | |
| 2707 | .unpacked_d16_vmem, | |
| 2708 | .volcanic_islands, | |
| 2709 | }), | |
| 2710 | }; | |
| 2711 | pub const tongapro = CpuModel{ | |
| 2712 | .name = "tongapro", | |
| 2713 | .llvm_name = "tongapro", | |
| 2714 | .features = featureSet(&[_]Feature{ | |
| 2715 | .ldsbankcount32, | |
| 2716 | .sgpr_init_bug, | |
| 2717 | .unpacked_d16_vmem, | |
| 2718 | .volcanic_islands, | |
| 2719 | }), | |
| 2720 | }; | |
| 2721 | pub const verde = CpuModel{ | |
| 2722 | .name = "verde", | |
| 2723 | .llvm_name = "verde", | |
| 2724 | .features = featureSet(&[_]Feature{ | |
| 2725 | .southern_islands, | |
| 2726 | }), | |
| 2727 | }; | |
| 2728 | }; |
lib/std/Thread.zig+3-3| ... | ... | @@ -589,7 +589,7 @@ const WindowsThreadImpl = struct { |
| 589 | 589 | fn_args: Args, |
| 590 | 590 | thread: ThreadCompletion, |
| 591 | 591 | |
| 592 | fn entryFn(raw_ptr: windows.PVOID) callconv(.C) windows.DWORD { | |
| 592 | fn entryFn(raw_ptr: windows.PVOID) callconv(.winapi) windows.DWORD { | |
| 593 | 593 | const self: *@This() = @ptrCast(@alignCast(raw_ptr)); |
| 594 | 594 | defer switch (self.thread.completion.swap(.completed, .seq_cst)) { |
| 595 | 595 | .running => {}, |
| ... | ... | @@ -749,7 +749,7 @@ const PosixThreadImpl = struct { |
| 749 | 749 | const allocator = std.heap.c_allocator; |
| 750 | 750 | |
| 751 | 751 | const Instance = struct { |
| 752 | fn entryFn(raw_arg: ?*anyopaque) callconv(.C) ?*anyopaque { | |
| 752 | fn entryFn(raw_arg: ?*anyopaque) callconv(.c) ?*anyopaque { | |
| 753 | 753 | const args_ptr: *Args = @ptrCast(@alignCast(raw_arg)); |
| 754 | 754 | defer allocator.destroy(args_ptr); |
| 755 | 755 | return callFn(f, args_ptr.*); |
| ... | ... | @@ -1363,7 +1363,7 @@ const LinuxThreadImpl = struct { |
| 1363 | 1363 | fn_args: Args, |
| 1364 | 1364 | thread: ThreadCompletion, |
| 1365 | 1365 | |
| 1366 | fn entryFn(raw_arg: usize) callconv(.C) u8 { | |
| 1366 | fn entryFn(raw_arg: usize) callconv(.c) u8 { | |
| 1367 | 1367 | const self = @as(*@This(), @ptrFromInt(raw_arg)); |
| 1368 | 1368 | defer switch (self.thread.completion.swap(.completed, .seq_cst)) { |
| 1369 | 1369 | .running => {}, |
lib/std/builtin.zig+4-4| ... | ... | @@ -293,12 +293,12 @@ pub const CallingConvention = union(enum(u8)) { |
| 293 | 293 | arm_aapcs16_vfp: CommonOptions, |
| 294 | 294 | arm_interrupt: ArmInterruptOptions, |
| 295 | 295 | |
| 296 | // Calling conventions for the `mips64` architecture. | |
| 296 | // Calling conventions for the `mips64` and `mips64el` architectures. | |
| 297 | 297 | mips64_n64: CommonOptions, |
| 298 | 298 | mips64_n32: CommonOptions, |
| 299 | 299 | mips64_interrupt: MipsInterruptOptions, |
| 300 | 300 | |
| 301 | // Calling conventions for the `mips` architecture. | |
| 301 | // Calling conventions for the `mips` and `mipsel` architectures. | |
| 302 | 302 | mips_o32: CommonOptions, |
| 303 | 303 | mips_interrupt: MipsInterruptOptions, |
| 304 | 304 | |
| ... | ... | @@ -329,7 +329,7 @@ pub const CallingConvention = union(enum(u8)) { |
| 329 | 329 | powerpc_aix: CommonOptions, |
| 330 | 330 | powerpc_aix_altivec: CommonOptions, |
| 331 | 331 | |
| 332 | /// The standard `wasm32`/`wasm64` calling convention, as specified in the WebAssembly Tool Conventions. | |
| 332 | /// The standard `wasm32` and `wasm64` calling convention, as specified in the WebAssembly Tool Conventions. | |
| 333 | 333 | wasm_watc: CommonOptions, |
| 334 | 334 | |
| 335 | 335 | /// The standard `arc` calling convention. |
| ... | ... | @@ -396,7 +396,7 @@ pub const CallingConvention = union(enum(u8)) { |
| 396 | 396 | amdgcn_kernel, |
| 397 | 397 | amdgcn_cs: CommonOptions, |
| 398 | 398 | |
| 399 | // Calling conventions for the `nvptx` architecture. | |
| 399 | // Calling conventions for the `nvptx` and `nvptx64` architectures. | |
| 400 | 400 | nvptx_device, |
| 401 | 401 | nvptx_kernel, |
| 402 | 402 |
lib/std/debug.zig+1-1| ... | ... | @@ -1344,7 +1344,7 @@ fn dumpSegfaultInfoPosix(sig: i32, code: i32, addr: usize, ctx_ptr: ?*anyopaque) |
| 1344 | 1344 | } |
| 1345 | 1345 | } |
| 1346 | 1346 | |
| 1347 | fn handleSegfaultWindows(info: *windows.EXCEPTION_POINTERS) callconv(windows.WINAPI) c_long { | |
| 1347 | fn handleSegfaultWindows(info: *windows.EXCEPTION_POINTERS) callconv(.winapi) c_long { | |
| 1348 | 1348 | switch (info.ExceptionRecord.ExceptionCode) { |
| 1349 | 1349 | windows.EXCEPTION_DATATYPE_MISALIGNMENT => handleSegfaultWindowsExtra(info, 0, "Unaligned Memory Access"), |
| 1350 | 1350 | windows.EXCEPTION_ACCESS_VIOLATION => handleSegfaultWindowsExtra(info, 1, null), |
lib/std/os/windows.zig+15-14| ... | ... | @@ -2101,8 +2101,8 @@ pub fn UnlockFile( |
| 2101 | 2101 | |
| 2102 | 2102 | /// This is a workaround for the C backend until zig has the ability to put |
| 2103 | 2103 | /// C code in inline assembly. |
| 2104 | extern fn zig_x86_windows_teb() callconv(.C) *anyopaque; | |
| 2105 | extern fn zig_x86_64_windows_teb() callconv(.C) *anyopaque; | |
| 2104 | extern fn zig_x86_windows_teb() callconv(.c) *anyopaque; | |
| 2105 | extern fn zig_x86_64_windows_teb() callconv(.c) *anyopaque; | |
| 2106 | 2106 | |
| 2107 | 2107 | pub fn teb() *TEB { |
| 2108 | 2108 | return switch (native_arch) { |
| ... | ... | @@ -2824,6 +2824,7 @@ pub const STD_OUTPUT_HANDLE = maxInt(DWORD) - 11 + 1; |
| 2824 | 2824 | /// The standard error device. Initially, this is the active console screen buffer, CONOUT$. |
| 2825 | 2825 | pub const STD_ERROR_HANDLE = maxInt(DWORD) - 12 + 1; |
| 2826 | 2826 | |
| 2827 | /// Deprecated; use `std.builtin.CallingConvention.winapi` instead. | |
| 2827 | 2828 | pub const WINAPI: std.builtin.CallingConvention = .winapi; |
| 2828 | 2829 | |
| 2829 | 2830 | pub const BOOL = c_int; |
| ... | ... | @@ -3567,7 +3568,7 @@ pub const MEM_RESERVE_PLACEHOLDERS = 0x2; |
| 3567 | 3568 | pub const MEM_DECOMMIT = 0x4000; |
| 3568 | 3569 | pub const MEM_RELEASE = 0x8000; |
| 3569 | 3570 | |
| 3570 | pub const PTHREAD_START_ROUTINE = *const fn (LPVOID) callconv(.C) DWORD; | |
| 3571 | pub const PTHREAD_START_ROUTINE = *const fn (LPVOID) callconv(.winapi) DWORD; | |
| 3571 | 3572 | pub const LPTHREAD_START_ROUTINE = PTHREAD_START_ROUTINE; |
| 3572 | 3573 | |
| 3573 | 3574 | pub const WIN32_FIND_DATAW = extern struct { |
| ... | ... | @@ -3745,7 +3746,7 @@ pub const IMAGE_TLS_DIRECTORY = extern struct { |
| 3745 | 3746 | pub const IMAGE_TLS_DIRECTORY64 = IMAGE_TLS_DIRECTORY; |
| 3746 | 3747 | pub const IMAGE_TLS_DIRECTORY32 = IMAGE_TLS_DIRECTORY; |
| 3747 | 3748 | |
| 3748 | pub const PIMAGE_TLS_CALLBACK = ?*const fn (PVOID, DWORD, PVOID) callconv(.C) void; | |
| 3749 | pub const PIMAGE_TLS_CALLBACK = ?*const fn (PVOID, DWORD, PVOID) callconv(.winapi) void; | |
| 3749 | 3750 | |
| 3750 | 3751 | pub const PROV_RSA_FULL = 1; |
| 3751 | 3752 | |
| ... | ... | @@ -3843,7 +3844,7 @@ pub const RTL_QUERY_REGISTRY_ROUTINE = ?*const fn ( |
| 3843 | 3844 | ULONG, |
| 3844 | 3845 | ?*anyopaque, |
| 3845 | 3846 | ?*anyopaque, |
| 3846 | ) callconv(WINAPI) NTSTATUS; | |
| 3847 | ) callconv(.winapi) NTSTATUS; | |
| 3847 | 3848 | |
| 3848 | 3849 | /// Path is a full path |
| 3849 | 3850 | pub const RTL_REGISTRY_ABSOLUTE = 0; |
| ... | ... | @@ -3940,7 +3941,7 @@ pub const FILE_ACTION_MODIFIED = 0x00000003; |
| 3940 | 3941 | pub const FILE_ACTION_RENAMED_OLD_NAME = 0x00000004; |
| 3941 | 3942 | pub const FILE_ACTION_RENAMED_NEW_NAME = 0x00000005; |
| 3942 | 3943 | |
| 3943 | pub const LPOVERLAPPED_COMPLETION_ROUTINE = ?*const fn (DWORD, DWORD, *OVERLAPPED) callconv(.C) void; | |
| 3944 | pub const LPOVERLAPPED_COMPLETION_ROUTINE = ?*const fn (DWORD, DWORD, *OVERLAPPED) callconv(.winapi) void; | |
| 3944 | 3945 | |
| 3945 | 3946 | pub const FileNotifyChangeFilter = packed struct(DWORD) { |
| 3946 | 3947 | file_name: bool = false, |
| ... | ... | @@ -4003,7 +4004,7 @@ pub const RTL_CRITICAL_SECTION = extern struct { |
| 4003 | 4004 | pub const CRITICAL_SECTION = RTL_CRITICAL_SECTION; |
| 4004 | 4005 | pub const INIT_ONCE = RTL_RUN_ONCE; |
| 4005 | 4006 | pub const INIT_ONCE_STATIC_INIT = RTL_RUN_ONCE_INIT; |
| 4006 | pub const INIT_ONCE_FN = *const fn (InitOnce: *INIT_ONCE, Parameter: ?*anyopaque, Context: ?*anyopaque) callconv(.C) BOOL; | |
| 4007 | pub const INIT_ONCE_FN = *const fn (InitOnce: *INIT_ONCE, Parameter: ?*anyopaque, Context: ?*anyopaque) callconv(.winapi) BOOL; | |
| 4007 | 4008 | |
| 4008 | 4009 | pub const RTL_RUN_ONCE = extern struct { |
| 4009 | 4010 | Ptr: ?*anyopaque, |
| ... | ... | @@ -4467,7 +4468,7 @@ pub const EXCEPTION_POINTERS = extern struct { |
| 4467 | 4468 | ContextRecord: *CONTEXT, |
| 4468 | 4469 | }; |
| 4469 | 4470 | |
| 4470 | pub const VECTORED_EXCEPTION_HANDLER = *const fn (ExceptionInfo: *EXCEPTION_POINTERS) callconv(WINAPI) c_long; | |
| 4471 | pub const VECTORED_EXCEPTION_HANDLER = *const fn (ExceptionInfo: *EXCEPTION_POINTERS) callconv(.winapi) c_long; | |
| 4471 | 4472 | |
| 4472 | 4473 | pub const EXCEPTION_DISPOSITION = i32; |
| 4473 | 4474 | pub const EXCEPTION_ROUTINE = *const fn ( |
| ... | ... | @@ -4475,7 +4476,7 @@ pub const EXCEPTION_ROUTINE = *const fn ( |
| 4475 | 4476 | EstablisherFrame: PVOID, |
| 4476 | 4477 | ContextRecord: *(Self.CONTEXT), |
| 4477 | 4478 | DispatcherContext: PVOID, |
| 4478 | ) callconv(WINAPI) EXCEPTION_DISPOSITION; | |
| 4479 | ) callconv(.winapi) EXCEPTION_DISPOSITION; | |
| 4479 | 4480 | |
| 4480 | 4481 | pub const UNWIND_HISTORY_TABLE_SIZE = 12; |
| 4481 | 4482 | pub const UNWIND_HISTORY_TABLE_ENTRY = extern struct { |
| ... | ... | @@ -4851,7 +4852,7 @@ pub const RTL_DRIVE_LETTER_CURDIR = extern struct { |
| 4851 | 4852 | DosPath: UNICODE_STRING, |
| 4852 | 4853 | }; |
| 4853 | 4854 | |
| 4854 | pub const PPS_POST_PROCESS_INIT_ROUTINE = ?*const fn () callconv(.C) void; | |
| 4855 | pub const PPS_POST_PROCESS_INIT_ROUTINE = ?*const fn () callconv(.winapi) void; | |
| 4855 | 4856 | |
| 4856 | 4857 | pub const FILE_DIRECTORY_INFORMATION = extern struct { |
| 4857 | 4858 | NextEntryOffset: ULONG, |
| ... | ... | @@ -4905,7 +4906,7 @@ pub fn FileInformationIterator(comptime FileInformationType: type) type { |
| 4905 | 4906 | }; |
| 4906 | 4907 | } |
| 4907 | 4908 | |
| 4908 | pub const IO_APC_ROUTINE = *const fn (PVOID, *IO_STATUS_BLOCK, ULONG) callconv(.C) void; | |
| 4909 | pub const IO_APC_ROUTINE = *const fn (PVOID, *IO_STATUS_BLOCK, ULONG) callconv(.winapi) void; | |
| 4909 | 4910 | |
| 4910 | 4911 | pub const CURDIR = extern struct { |
| 4911 | 4912 | DosPath: UNICODE_STRING, |
| ... | ... | @@ -5009,8 +5010,8 @@ pub const ENUM_PAGE_FILE_INFORMATION = extern struct { |
| 5009 | 5010 | PeakUsage: SIZE_T, |
| 5010 | 5011 | }; |
| 5011 | 5012 | |
| 5012 | pub const PENUM_PAGE_FILE_CALLBACKW = ?*const fn (?LPVOID, *ENUM_PAGE_FILE_INFORMATION, LPCWSTR) callconv(.C) BOOL; | |
| 5013 | pub const PENUM_PAGE_FILE_CALLBACKA = ?*const fn (?LPVOID, *ENUM_PAGE_FILE_INFORMATION, LPCSTR) callconv(.C) BOOL; | |
| 5013 | pub const PENUM_PAGE_FILE_CALLBACKW = ?*const fn (?LPVOID, *ENUM_PAGE_FILE_INFORMATION, LPCWSTR) callconv(.winapi) BOOL; | |
| 5014 | pub const PENUM_PAGE_FILE_CALLBACKA = ?*const fn (?LPVOID, *ENUM_PAGE_FILE_INFORMATION, LPCSTR) callconv(.winapi) BOOL; | |
| 5014 | 5015 | |
| 5015 | 5016 | pub const PSAPI_WS_WATCH_INFORMATION_EX = extern struct { |
| 5016 | 5017 | BasicInfo: PSAPI_WS_WATCH_INFORMATION, |
| ... | ... | @@ -5122,7 +5123,7 @@ pub const CTRL_CLOSE_EVENT: DWORD = 2; |
| 5122 | 5123 | pub const CTRL_LOGOFF_EVENT: DWORD = 5; |
| 5123 | 5124 | pub const CTRL_SHUTDOWN_EVENT: DWORD = 6; |
| 5124 | 5125 | |
| 5125 | pub const HANDLER_ROUTINE = *const fn (dwCtrlType: DWORD) callconv(WINAPI) BOOL; | |
| 5126 | pub const HANDLER_ROUTINE = *const fn (dwCtrlType: DWORD) callconv(.winapi) BOOL; | |
| 5126 | 5127 | |
| 5127 | 5128 | /// Processor feature enumeration. |
| 5128 | 5129 | pub const PF = enum(DWORD) { |
lib/std/os/windows/advapi32.zig+6-7| ... | ... | @@ -8,7 +8,6 @@ const LPCWSTR = windows.LPCWSTR; |
| 8 | 8 | const LSTATUS = windows.LSTATUS; |
| 9 | 9 | const REGSAM = windows.REGSAM; |
| 10 | 10 | const ULONG = windows.ULONG; |
| 11 | const WINAPI = windows.WINAPI; | |
| 12 | 11 | |
| 13 | 12 | pub extern "advapi32" fn RegOpenKeyExW( |
| 14 | 13 | hKey: HKEY, |
| ... | ... | @@ -16,7 +15,7 @@ pub extern "advapi32" fn RegOpenKeyExW( |
| 16 | 15 | ulOptions: DWORD, |
| 17 | 16 | samDesired: REGSAM, |
| 18 | 17 | phkResult: *HKEY, |
| 19 | ) callconv(WINAPI) LSTATUS; | |
| 18 | ) callconv(.winapi) LSTATUS; | |
| 20 | 19 | |
| 21 | 20 | pub extern "advapi32" fn RegQueryValueExW( |
| 22 | 21 | hKey: HKEY, |
| ... | ... | @@ -25,13 +24,13 @@ pub extern "advapi32" fn RegQueryValueExW( |
| 25 | 24 | lpType: ?*DWORD, |
| 26 | 25 | lpData: ?*BYTE, |
| 27 | 26 | lpcbData: ?*DWORD, |
| 28 | ) callconv(WINAPI) LSTATUS; | |
| 27 | ) callconv(.winapi) LSTATUS; | |
| 29 | 28 | |
| 30 | pub extern "advapi32" fn RegCloseKey(hKey: HKEY) callconv(WINAPI) LSTATUS; | |
| 29 | pub extern "advapi32" fn RegCloseKey(hKey: HKEY) callconv(.winapi) LSTATUS; | |
| 31 | 30 | |
| 32 | 31 | // RtlGenRandom is known as SystemFunction036 under advapi32 |
| 33 | 32 | // http://msdn.microsoft.com/en-us/library/windows/desktop/aa387694.aspx */ |
| 34 | pub extern "advapi32" fn SystemFunction036(output: [*]u8, length: ULONG) callconv(WINAPI) BOOL; | |
| 33 | pub extern "advapi32" fn SystemFunction036(output: [*]u8, length: ULONG) callconv(.winapi) BOOL; | |
| 35 | 34 | pub const RtlGenRandom = SystemFunction036; |
| 36 | 35 | |
| 37 | 36 | pub const RRF = struct { |
| ... | ... | @@ -62,7 +61,7 @@ pub extern "advapi32" fn RegGetValueW( |
| 62 | 61 | pdwType: ?*DWORD, |
| 63 | 62 | pvData: ?*anyopaque, |
| 64 | 63 | pcbData: ?*DWORD, |
| 65 | ) callconv(WINAPI) LSTATUS; | |
| 64 | ) callconv(.winapi) LSTATUS; | |
| 66 | 65 | |
| 67 | 66 | pub extern "advapi32" fn RegLoadAppKeyW( |
| 68 | 67 | lpFile: LPCWSTR, |
| ... | ... | @@ -70,4 +69,4 @@ pub extern "advapi32" fn RegLoadAppKeyW( |
| 70 | 69 | samDesired: REGSAM, |
| 71 | 70 | dwOptions: DWORD, |
| 72 | 71 | reserved: DWORD, |
| 73 | ) callconv(WINAPI) LSTATUS; | |
| 72 | ) callconv(.winapi) LSTATUS; |
lib/std/os/windows/crypt32.zig+3-4| ... | ... | @@ -4,7 +4,6 @@ const BOOL = windows.BOOL; |
| 4 | 4 | const DWORD = windows.DWORD; |
| 5 | 5 | const BYTE = windows.BYTE; |
| 6 | 6 | const LPCWSTR = windows.LPCWSTR; |
| 7 | const WINAPI = windows.WINAPI; | |
| 8 | 7 | |
| 9 | 8 | pub const CERT_INFO = *opaque {}; |
| 10 | 9 | pub const HCERTSTORE = *opaque {}; |
| ... | ... | @@ -19,14 +18,14 @@ pub const CERT_CONTEXT = extern struct { |
| 19 | 18 | pub extern "crypt32" fn CertOpenSystemStoreW( |
| 20 | 19 | _: ?*const anyopaque, |
| 21 | 20 | szSubsystemProtocol: LPCWSTR, |
| 22 | ) callconv(WINAPI) ?HCERTSTORE; | |
| 21 | ) callconv(.winapi) ?HCERTSTORE; | |
| 23 | 22 | |
| 24 | 23 | pub extern "crypt32" fn CertCloseStore( |
| 25 | 24 | hCertStore: HCERTSTORE, |
| 26 | 25 | dwFlags: DWORD, |
| 27 | ) callconv(WINAPI) BOOL; | |
| 26 | ) callconv(.winapi) BOOL; | |
| 28 | 27 | |
| 29 | 28 | pub extern "crypt32" fn CertEnumCertificatesInStore( |
| 30 | 29 | hCertStore: HCERTSTORE, |
| 31 | 30 | pPrevCertContext: ?*CERT_CONTEXT, |
| 32 | ) callconv(WINAPI) ?*CERT_CONTEXT; | |
| 31 | ) callconv(.winapi) ?*CERT_CONTEXT; |
lib/std/os/windows/kernel32.zig+95-96| ... | ... | @@ -41,7 +41,6 @@ const VECTORED_EXCEPTION_HANDLER = windows.VECTORED_EXCEPTION_HANDLER; |
| 41 | 41 | const WCHAR = windows.WCHAR; |
| 42 | 42 | const WIN32_FIND_DATAW = windows.WIN32_FIND_DATAW; |
| 43 | 43 | const Win32Error = windows.Win32Error; |
| 44 | const WINAPI = windows.WINAPI; | |
| 45 | 44 | const WORD = windows.WORD; |
| 46 | 45 | |
| 47 | 46 | // I/O - Filesystem |
| ... | ... | @@ -55,18 +54,18 @@ pub extern "kernel32" fn ReadDirectoryChangesW( |
| 55 | 54 | lpBytesReturned: ?*windows.DWORD, |
| 56 | 55 | lpOverlapped: ?*windows.OVERLAPPED, |
| 57 | 56 | lpCompletionRoutine: windows.LPOVERLAPPED_COMPLETION_ROUTINE, |
| 58 | ) callconv(windows.WINAPI) windows.BOOL; | |
| 57 | ) callconv(.winapi) windows.BOOL; | |
| 59 | 58 | |
| 60 | 59 | // TODO: Wrapper around NtCancelIoFile. |
| 61 | 60 | pub extern "kernel32" fn CancelIo( |
| 62 | 61 | hFile: HANDLE, |
| 63 | ) callconv(WINAPI) BOOL; | |
| 62 | ) callconv(.winapi) BOOL; | |
| 64 | 63 | |
| 65 | 64 | // TODO: Wrapper around NtCancelIoFileEx. |
| 66 | 65 | pub extern "kernel32" fn CancelIoEx( |
| 67 | 66 | hFile: HANDLE, |
| 68 | 67 | lpOverlapped: ?*OVERLAPPED, |
| 69 | ) callconv(WINAPI) BOOL; | |
| 68 | ) callconv(.winapi) BOOL; | |
| 70 | 69 | |
| 71 | 70 | pub extern "kernel32" fn CreateFileW( |
| 72 | 71 | lpFileName: LPCWSTR, |
| ... | ... | @@ -76,7 +75,7 @@ pub extern "kernel32" fn CreateFileW( |
| 76 | 75 | dwCreationDisposition: DWORD, |
| 77 | 76 | dwFlagsAndAttributes: DWORD, |
| 78 | 77 | hTemplateFile: ?HANDLE, |
| 79 | ) callconv(WINAPI) HANDLE; | |
| 78 | ) callconv(.winapi) HANDLE; | |
| 80 | 79 | |
| 81 | 80 | // TODO A bunch of logic around NtCreateNamedPipe |
| 82 | 81 | pub extern "kernel32" fn CreateNamedPipeW( |
| ... | ... | @@ -88,16 +87,16 @@ pub extern "kernel32" fn CreateNamedPipeW( |
| 88 | 87 | nInBufferSize: DWORD, |
| 89 | 88 | nDefaultTimeOut: DWORD, |
| 90 | 89 | lpSecurityAttributes: ?*const SECURITY_ATTRIBUTES, |
| 91 | ) callconv(WINAPI) HANDLE; | |
| 90 | ) callconv(.winapi) HANDLE; | |
| 92 | 91 | |
| 93 | 92 | pub extern "kernel32" fn FindFirstFileW( |
| 94 | 93 | lpFileName: LPCWSTR, |
| 95 | 94 | lpFindFileData: *WIN32_FIND_DATAW, |
| 96 | ) callconv(WINAPI) HANDLE; | |
| 95 | ) callconv(.winapi) HANDLE; | |
| 97 | 96 | |
| 98 | 97 | pub extern "kernel32" fn FindClose( |
| 99 | 98 | hFindFile: HANDLE, |
| 100 | ) callconv(WINAPI) BOOL; | |
| 99 | ) callconv(.winapi) BOOL; | |
| 101 | 100 | |
| 102 | 101 | // TODO: Wrapper around RtlGetFullPathName_UEx |
| 103 | 102 | pub extern "kernel32" fn GetFullPathNameW( |
| ... | ... | @@ -105,18 +104,18 @@ pub extern "kernel32" fn GetFullPathNameW( |
| 105 | 104 | nBufferLength: DWORD, |
| 106 | 105 | lpBuffer: LPWSTR, |
| 107 | 106 | lpFilePart: ?*?LPWSTR, |
| 108 | ) callconv(WINAPI) DWORD; | |
| 107 | ) callconv(.winapi) DWORD; | |
| 109 | 108 | |
| 110 | 109 | // TODO: Matches `STD_*_HANDLE` to peb().ProcessParameters.Standard* |
| 111 | 110 | pub extern "kernel32" fn GetStdHandle( |
| 112 | 111 | nStdHandle: DWORD, |
| 113 | ) callconv(WINAPI) ?HANDLE; | |
| 112 | ) callconv(.winapi) ?HANDLE; | |
| 114 | 113 | |
| 115 | 114 | pub extern "kernel32" fn MoveFileExW( |
| 116 | 115 | lpExistingFileName: LPCWSTR, |
| 117 | 116 | lpNewFileName: LPCWSTR, |
| 118 | 117 | dwFlags: DWORD, |
| 119 | ) callconv(WINAPI) BOOL; | |
| 118 | ) callconv(.winapi) BOOL; | |
| 120 | 119 | |
| 121 | 120 | // TODO: Wrapper around NtSetInformationFile + `FILE_POSITION_INFORMATION`. |
| 122 | 121 | // `FILE_STANDARD_INFORMATION` is also used if dwMoveMethod is `FILE_END` |
| ... | ... | @@ -125,7 +124,7 @@ pub extern "kernel32" fn SetFilePointerEx( |
| 125 | 124 | liDistanceToMove: LARGE_INTEGER, |
| 126 | 125 | lpNewFilePointer: ?*LARGE_INTEGER, |
| 127 | 126 | dwMoveMethod: DWORD, |
| 128 | ) callconv(WINAPI) BOOL; | |
| 127 | ) callconv(.winapi) BOOL; | |
| 129 | 128 | |
| 130 | 129 | // TODO: Wrapper around NtSetInformationFile + `FILE_BASIC_INFORMATION` |
| 131 | 130 | pub extern "kernel32" fn SetFileTime( |
| ... | ... | @@ -133,7 +132,7 @@ pub extern "kernel32" fn SetFileTime( |
| 133 | 132 | lpCreationTime: ?*const FILETIME, |
| 134 | 133 | lpLastAccessTime: ?*const FILETIME, |
| 135 | 134 | lpLastWriteTime: ?*const FILETIME, |
| 136 | ) callconv(WINAPI) BOOL; | |
| 135 | ) callconv(.winapi) BOOL; | |
| 137 | 136 | |
| 138 | 137 | pub extern "kernel32" fn WriteFile( |
| 139 | 138 | in_hFile: HANDLE, |
| ... | ... | @@ -141,35 +140,35 @@ pub extern "kernel32" fn WriteFile( |
| 141 | 140 | in_nNumberOfBytesToWrite: DWORD, |
| 142 | 141 | out_lpNumberOfBytesWritten: ?*DWORD, |
| 143 | 142 | in_out_lpOverlapped: ?*OVERLAPPED, |
| 144 | ) callconv(WINAPI) BOOL; | |
| 143 | ) callconv(.winapi) BOOL; | |
| 145 | 144 | |
| 146 | 145 | // TODO: wrapper for NtQueryInformationFile + `FILE_STANDARD_INFORMATION` |
| 147 | 146 | pub extern "kernel32" fn GetFileSizeEx( |
| 148 | 147 | hFile: HANDLE, |
| 149 | 148 | lpFileSize: *LARGE_INTEGER, |
| 150 | ) callconv(WINAPI) BOOL; | |
| 149 | ) callconv(.winapi) BOOL; | |
| 151 | 150 | |
| 152 | 151 | // TODO: Wrapper around GetStdHandle + NtFlushBuffersFile. |
| 153 | 152 | pub extern "kernel32" fn FlushFileBuffers( |
| 154 | 153 | hFile: HANDLE, |
| 155 | ) callconv(WINAPI) BOOL; | |
| 154 | ) callconv(.winapi) BOOL; | |
| 156 | 155 | |
| 157 | 156 | // TODO: Wrapper around NtSetInformationFile + `FILE_IO_COMPLETION_NOTIFICATION_INFORMATION`. |
| 158 | 157 | pub extern "kernel32" fn SetFileCompletionNotificationModes( |
| 159 | 158 | FileHandle: HANDLE, |
| 160 | 159 | Flags: UCHAR, |
| 161 | ) callconv(WINAPI) BOOL; | |
| 160 | ) callconv(.winapi) BOOL; | |
| 162 | 161 | |
| 163 | 162 | // TODO: `RtlGetCurrentDirectory_U(nBufferLength * 2, lpBuffer)` |
| 164 | 163 | pub extern "kernel32" fn GetCurrentDirectoryW( |
| 165 | 164 | nBufferLength: DWORD, |
| 166 | 165 | lpBuffer: ?[*]WCHAR, |
| 167 | ) callconv(WINAPI) DWORD; | |
| 166 | ) callconv(.winapi) DWORD; | |
| 168 | 167 | |
| 169 | 168 | // TODO: RtlDosPathNameToNtPathNameU_WithStatus + NtQueryAttributesFile. |
| 170 | 169 | pub extern "kernel32" fn GetFileAttributesW( |
| 171 | 170 | lpFileName: LPCWSTR, |
| 172 | ) callconv(WINAPI) DWORD; | |
| 171 | ) callconv(.winapi) DWORD; | |
| 173 | 172 | |
| 174 | 173 | pub extern "kernel32" fn ReadFile( |
| 175 | 174 | hFile: HANDLE, |
| ... | ... | @@ -177,12 +176,12 @@ pub extern "kernel32" fn ReadFile( |
| 177 | 176 | nNumberOfBytesToRead: DWORD, |
| 178 | 177 | lpNumberOfBytesRead: ?*DWORD, |
| 179 | 178 | lpOverlapped: ?*OVERLAPPED, |
| 180 | ) callconv(WINAPI) BOOL; | |
| 179 | ) callconv(.winapi) BOOL; | |
| 181 | 180 | |
| 182 | 181 | pub extern "kernel32" fn GetSystemDirectoryW( |
| 183 | 182 | lpBuffer: LPWSTR, |
| 184 | 183 | uSize: UINT, |
| 185 | ) callconv(WINAPI) UINT; | |
| 184 | ) callconv(.winapi) UINT; | |
| 186 | 185 | |
| 187 | 186 | // I/O - Kernel Objects |
| 188 | 187 | |
| ... | ... | @@ -192,7 +191,7 @@ pub extern "kernel32" fn CreateEventExW( |
| 192 | 191 | lpName: ?LPCWSTR, |
| 193 | 192 | dwFlags: DWORD, |
| 194 | 193 | dwDesiredAccess: DWORD, |
| 195 | ) callconv(WINAPI) ?HANDLE; | |
| 194 | ) callconv(.winapi) ?HANDLE; | |
| 196 | 195 | |
| 197 | 196 | // TODO: Wrapper around GetStdHandle + NtDuplicateObject. |
| 198 | 197 | pub extern "kernel32" fn DuplicateHandle( |
| ... | ... | @@ -203,14 +202,14 @@ pub extern "kernel32" fn DuplicateHandle( |
| 203 | 202 | dwDesiredAccess: DWORD, |
| 204 | 203 | bInheritHandle: BOOL, |
| 205 | 204 | dwOptions: DWORD, |
| 206 | ) callconv(WINAPI) BOOL; | |
| 205 | ) callconv(.winapi) BOOL; | |
| 207 | 206 | |
| 208 | 207 | // TODO: Wrapper around GetStdHandle + NtQueryObject + NtSetInformationObject with .ObjectHandleFlagInformation. |
| 209 | 208 | pub extern "kernel32" fn SetHandleInformation( |
| 210 | 209 | hObject: HANDLE, |
| 211 | 210 | dwMask: DWORD, |
| 212 | 211 | dwFlags: DWORD, |
| 213 | ) callconv(WINAPI) BOOL; | |
| 212 | ) callconv(.winapi) BOOL; | |
| 214 | 213 | |
| 215 | 214 | // TODO: Wrapper around NtRemoveIoCompletion. |
| 216 | 215 | pub extern "kernel32" fn GetQueuedCompletionStatus( |
| ... | ... | @@ -219,7 +218,7 @@ pub extern "kernel32" fn GetQueuedCompletionStatus( |
| 219 | 218 | lpCompletionKey: *ULONG_PTR, |
| 220 | 219 | lpOverlapped: *?*OVERLAPPED, |
| 221 | 220 | dwMilliseconds: DWORD, |
| 222 | ) callconv(WINAPI) BOOL; | |
| 221 | ) callconv(.winapi) BOOL; | |
| 223 | 222 | |
| 224 | 223 | // TODO: Wrapper around NtRemoveIoCompletionEx. |
| 225 | 224 | pub extern "kernel32" fn GetQueuedCompletionStatusEx( |
| ... | ... | @@ -229,7 +228,7 @@ pub extern "kernel32" fn GetQueuedCompletionStatusEx( |
| 229 | 228 | ulNumEntriesRemoved: *ULONG, |
| 230 | 229 | dwMilliseconds: DWORD, |
| 231 | 230 | fAlertable: BOOL, |
| 232 | ) callconv(WINAPI) BOOL; | |
| 231 | ) callconv(.winapi) BOOL; | |
| 233 | 232 | |
| 234 | 233 | // TODO: Wrapper around NtSetIoCompletion with `IoStatus = .SUCCESS`. |
| 235 | 234 | pub extern "kernel32" fn PostQueuedCompletionStatus( |
| ... | ... | @@ -237,7 +236,7 @@ pub extern "kernel32" fn PostQueuedCompletionStatus( |
| 237 | 236 | dwNumberOfBytesTransferred: DWORD, |
| 238 | 237 | dwCompletionKey: ULONG_PTR, |
| 239 | 238 | lpOverlapped: ?*OVERLAPPED, |
| 240 | ) callconv(WINAPI) BOOL; | |
| 239 | ) callconv(.winapi) BOOL; | |
| 241 | 240 | |
| 242 | 241 | // TODO: |
| 243 | 242 | // GetOverlappedResultEx with bAlertable=false, which calls: GetStdHandle + WaitForSingleObjectEx. |
| ... | ... | @@ -247,7 +246,7 @@ pub extern "kernel32" fn GetOverlappedResult( |
| 247 | 246 | lpOverlapped: *OVERLAPPED, |
| 248 | 247 | lpNumberOfBytesTransferred: *DWORD, |
| 249 | 248 | bWait: BOOL, |
| 250 | ) callconv(WINAPI) BOOL; | |
| 249 | ) callconv(.winapi) BOOL; | |
| 251 | 250 | |
| 252 | 251 | // TODO: Wrapper around NtCreateIoCompletion + NtSetInformationFile with FILE_COMPLETION_INFORMATION. |
| 253 | 252 | // This would be better splitting into two functions. |
| ... | ... | @@ -256,30 +255,30 @@ pub extern "kernel32" fn CreateIoCompletionPort( |
| 256 | 255 | ExistingCompletionPort: ?HANDLE, |
| 257 | 256 | CompletionKey: ULONG_PTR, |
| 258 | 257 | NumberOfConcurrentThreads: DWORD, |
| 259 | ) callconv(WINAPI) ?HANDLE; | |
| 258 | ) callconv(.winapi) ?HANDLE; | |
| 260 | 259 | |
| 261 | 260 | // TODO: Forwarder to NtAddVectoredExceptionHandler. |
| 262 | 261 | pub extern "kernel32" fn AddVectoredExceptionHandler( |
| 263 | 262 | First: ULONG, |
| 264 | 263 | Handler: ?VECTORED_EXCEPTION_HANDLER, |
| 265 | ) callconv(WINAPI) ?LPVOID; | |
| 264 | ) callconv(.winapi) ?LPVOID; | |
| 266 | 265 | |
| 267 | 266 | // TODO: Forwarder to NtRemoveVectoredExceptionHandler. |
| 268 | 267 | pub extern "kernel32" fn RemoveVectoredExceptionHandler( |
| 269 | 268 | Handle: HANDLE, |
| 270 | ) callconv(WINAPI) ULONG; | |
| 269 | ) callconv(.winapi) ULONG; | |
| 271 | 270 | |
| 272 | 271 | // TODO: Wrapper around RtlReportSilentProcessExit + NtTerminateProcess. |
| 273 | 272 | pub extern "kernel32" fn TerminateProcess( |
| 274 | 273 | hProcess: HANDLE, |
| 275 | 274 | uExitCode: UINT, |
| 276 | ) callconv(WINAPI) BOOL; | |
| 275 | ) callconv(.winapi) BOOL; | |
| 277 | 276 | |
| 278 | 277 | // TODO: WaitForSingleObjectEx with bAlertable=false. |
| 279 | 278 | pub extern "kernel32" fn WaitForSingleObject( |
| 280 | 279 | hHandle: HANDLE, |
| 281 | 280 | dwMilliseconds: DWORD, |
| 282 | ) callconv(WINAPI) DWORD; | |
| 281 | ) callconv(.winapi) DWORD; | |
| 283 | 282 | |
| 284 | 283 | // TODO: Wrapper for GetStdHandle + NtWaitForSingleObject. |
| 285 | 284 | // Sets up an activation context before calling NtWaitForSingleObject. |
| ... | ... | @@ -287,7 +286,7 @@ pub extern "kernel32" fn WaitForSingleObjectEx( |
| 287 | 286 | hHandle: HANDLE, |
| 288 | 287 | dwMilliseconds: DWORD, |
| 289 | 288 | bAlertable: BOOL, |
| 290 | ) callconv(WINAPI) DWORD; | |
| 289 | ) callconv(.winapi) DWORD; | |
| 291 | 290 | |
| 292 | 291 | // TODO: WaitForMultipleObjectsEx with alertable=false |
| 293 | 292 | pub extern "kernel32" fn WaitForMultipleObjects( |
| ... | ... | @@ -295,7 +294,7 @@ pub extern "kernel32" fn WaitForMultipleObjects( |
| 295 | 294 | lpHandle: [*]const HANDLE, |
| 296 | 295 | bWaitAll: BOOL, |
| 297 | 296 | dwMilliseconds: DWORD, |
| 298 | ) callconv(WINAPI) DWORD; | |
| 297 | ) callconv(.winapi) DWORD; | |
| 299 | 298 | |
| 300 | 299 | // TODO: Wrapper around NtWaitForMultipleObjects. |
| 301 | 300 | pub extern "kernel32" fn WaitForMultipleObjectsEx( |
| ... | ... | @@ -304,7 +303,7 @@ pub extern "kernel32" fn WaitForMultipleObjectsEx( |
| 304 | 303 | bWaitAll: BOOL, |
| 305 | 304 | dwMilliseconds: DWORD, |
| 306 | 305 | bAlertable: BOOL, |
| 307 | ) callconv(WINAPI) DWORD; | |
| 306 | ) callconv(.winapi) DWORD; | |
| 308 | 307 | |
| 309 | 308 | // Process Management |
| 310 | 309 | |
| ... | ... | @@ -319,57 +318,57 @@ pub extern "kernel32" fn CreateProcessW( |
| 319 | 318 | lpCurrentDirectory: ?LPCWSTR, |
| 320 | 319 | lpStartupInfo: *STARTUPINFOW, |
| 321 | 320 | lpProcessInformation: *PROCESS_INFORMATION, |
| 322 | ) callconv(WINAPI) BOOL; | |
| 321 | ) callconv(.winapi) BOOL; | |
| 323 | 322 | |
| 324 | 323 | // TODO: Fowarder to RtlExitUserProcess. |
| 325 | 324 | pub extern "kernel32" fn ExitProcess( |
| 326 | 325 | exit_code: UINT, |
| 327 | ) callconv(WINAPI) noreturn; | |
| 326 | ) callconv(.winapi) noreturn; | |
| 328 | 327 | |
| 329 | 328 | // TODO: SleepEx with bAlertable=false. |
| 330 | 329 | pub extern "kernel32" fn Sleep( |
| 331 | 330 | dwMilliseconds: DWORD, |
| 332 | ) callconv(WINAPI) void; | |
| 331 | ) callconv(.winapi) void; | |
| 333 | 332 | |
| 334 | 333 | // TODO: Wrapper around NtQueryInformationProcess with `PROCESS_BASIC_INFORMATION`. |
| 335 | 334 | pub extern "kernel32" fn GetExitCodeProcess( |
| 336 | 335 | hProcess: HANDLE, |
| 337 | 336 | lpExitCode: *DWORD, |
| 338 | ) callconv(WINAPI) BOOL; | |
| 337 | ) callconv(.winapi) BOOL; | |
| 339 | 338 | |
| 340 | 339 | // TODO: Already a wrapper for this, see `windows.GetCurrentProcess`. |
| 341 | pub extern "kernel32" fn GetCurrentProcess() callconv(WINAPI) HANDLE; | |
| 340 | pub extern "kernel32" fn GetCurrentProcess() callconv(.winapi) HANDLE; | |
| 342 | 341 | |
| 343 | 342 | // TODO: memcpy peb().ProcessParameters.Environment, mem.span(0). Requires locking the PEB. |
| 344 | pub extern "kernel32" fn GetEnvironmentStringsW() callconv(WINAPI) ?LPWSTR; | |
| 343 | pub extern "kernel32" fn GetEnvironmentStringsW() callconv(.winapi) ?LPWSTR; | |
| 345 | 344 | |
| 346 | 345 | // TODO: RtlFreeHeap on the output of GetEnvironmentStringsW. |
| 347 | 346 | pub extern "kernel32" fn FreeEnvironmentStringsW( |
| 348 | 347 | penv: LPWSTR, |
| 349 | ) callconv(WINAPI) BOOL; | |
| 348 | ) callconv(.winapi) BOOL; | |
| 350 | 349 | |
| 351 | 350 | // TODO: Wrapper around RtlQueryEnvironmentVariable. |
| 352 | 351 | pub extern "kernel32" fn GetEnvironmentVariableW( |
| 353 | 352 | lpName: ?LPCWSTR, |
| 354 | 353 | lpBuffer: ?[*]WCHAR, |
| 355 | 354 | nSize: DWORD, |
| 356 | ) callconv(WINAPI) DWORD; | |
| 355 | ) callconv(.winapi) DWORD; | |
| 357 | 356 | |
| 358 | 357 | // TODO: Wrapper around RtlSetEnvironmentVar. |
| 359 | 358 | pub extern "kernel32" fn SetEnvironmentVariableW( |
| 360 | 359 | lpName: LPCWSTR, |
| 361 | 360 | lpValue: ?LPCWSTR, |
| 362 | ) callconv(WINAPI) BOOL; | |
| 361 | ) callconv(.winapi) BOOL; | |
| 363 | 362 | |
| 364 | 363 | pub extern "kernel32" fn CreateToolhelp32Snapshot( |
| 365 | 364 | dwFlags: DWORD, |
| 366 | 365 | th32ProcessID: DWORD, |
| 367 | ) callconv(WINAPI) HANDLE; | |
| 366 | ) callconv(.winapi) HANDLE; | |
| 368 | 367 | |
| 369 | 368 | // Threading |
| 370 | 369 | |
| 371 | 370 | // TODO: Already a wrapper for this, see `windows.GetCurrentThreadId`. |
| 372 | pub extern "kernel32" fn GetCurrentThreadId() callconv(WINAPI) DWORD; | |
| 371 | pub extern "kernel32" fn GetCurrentThreadId() callconv(.winapi) DWORD; | |
| 373 | 372 | |
| 374 | 373 | // TODO: CreateRemoteThread with hProcess=NtCurrentProcess(). |
| 375 | 374 | pub extern "kernel32" fn CreateThread( |
| ... | ... | @@ -379,64 +378,64 @@ pub extern "kernel32" fn CreateThread( |
| 379 | 378 | lpParameter: ?LPVOID, |
| 380 | 379 | dwCreationFlags: DWORD, |
| 381 | 380 | lpThreadId: ?*DWORD, |
| 382 | ) callconv(WINAPI) ?HANDLE; | |
| 381 | ) callconv(.winapi) ?HANDLE; | |
| 383 | 382 | |
| 384 | 383 | // TODO: Wrapper around RtlDelayExecution. |
| 385 | pub extern "kernel32" fn SwitchToThread() callconv(WINAPI) BOOL; | |
| 384 | pub extern "kernel32" fn SwitchToThread() callconv(.winapi) BOOL; | |
| 386 | 385 | |
| 387 | 386 | // Locks, critical sections, initializers |
| 388 | 387 | |
| 389 | 388 | // TODO: Forwarder to RtlInitializeCriticalSection |
| 390 | 389 | pub extern "kernel32" fn InitializeCriticalSection( |
| 391 | 390 | lpCriticalSection: *CRITICAL_SECTION, |
| 392 | ) callconv(WINAPI) void; | |
| 391 | ) callconv(.winapi) void; | |
| 393 | 392 | |
| 394 | 393 | // TODO: Forwarder to RtlEnterCriticalSection |
| 395 | 394 | pub extern "kernel32" fn EnterCriticalSection( |
| 396 | 395 | lpCriticalSection: *CRITICAL_SECTION, |
| 397 | ) callconv(WINAPI) void; | |
| 396 | ) callconv(.winapi) void; | |
| 398 | 397 | |
| 399 | 398 | // TODO: Forwarder to RtlLeaveCriticalSection |
| 400 | 399 | pub extern "kernel32" fn LeaveCriticalSection( |
| 401 | 400 | lpCriticalSection: *CRITICAL_SECTION, |
| 402 | ) callconv(WINAPI) void; | |
| 401 | ) callconv(.winapi) void; | |
| 403 | 402 | |
| 404 | 403 | // TODO: Forwarder to RtlDeleteCriticalSection |
| 405 | 404 | pub extern "kernel32" fn DeleteCriticalSection( |
| 406 | 405 | lpCriticalSection: *CRITICAL_SECTION, |
| 407 | ) callconv(WINAPI) void; | |
| 406 | ) callconv(.winapi) void; | |
| 408 | 407 | |
| 409 | 408 | // TODO: Forwarder to RtlTryAcquireSRWLockExclusive |
| 410 | 409 | pub extern "kernel32" fn TryAcquireSRWLockExclusive( |
| 411 | 410 | SRWLock: *SRWLOCK, |
| 412 | ) callconv(WINAPI) BOOLEAN; | |
| 411 | ) callconv(.winapi) BOOLEAN; | |
| 413 | 412 | |
| 414 | 413 | // TODO: Forwarder to RtlAcquireSRWLockExclusive |
| 415 | 414 | pub extern "kernel32" fn AcquireSRWLockExclusive( |
| 416 | 415 | SRWLock: *SRWLOCK, |
| 417 | ) callconv(WINAPI) void; | |
| 416 | ) callconv(.winapi) void; | |
| 418 | 417 | |
| 419 | 418 | // TODO: Forwarder to RtlReleaseSRWLockExclusive |
| 420 | 419 | pub extern "kernel32" fn ReleaseSRWLockExclusive( |
| 421 | 420 | SRWLock: *SRWLOCK, |
| 422 | ) callconv(WINAPI) void; | |
| 421 | ) callconv(.winapi) void; | |
| 423 | 422 | |
| 424 | 423 | pub extern "kernel32" fn InitOnceExecuteOnce( |
| 425 | 424 | InitOnce: *INIT_ONCE, |
| 426 | 425 | InitFn: INIT_ONCE_FN, |
| 427 | 426 | Parameter: ?*anyopaque, |
| 428 | 427 | Context: ?*anyopaque, |
| 429 | ) callconv(WINAPI) BOOL; | |
| 428 | ) callconv(.winapi) BOOL; | |
| 430 | 429 | |
| 431 | 430 | // TODO: Forwarder to RtlWakeConditionVariable |
| 432 | 431 | pub extern "kernel32" fn WakeConditionVariable( |
| 433 | 432 | ConditionVariable: *CONDITION_VARIABLE, |
| 434 | ) callconv(WINAPI) void; | |
| 433 | ) callconv(.winapi) void; | |
| 435 | 434 | |
| 436 | 435 | // TODO: Forwarder to RtlWakeAllConditionVariable |
| 437 | 436 | pub extern "kernel32" fn WakeAllConditionVariable( |
| 438 | 437 | ConditionVariable: *CONDITION_VARIABLE, |
| 439 | ) callconv(WINAPI) void; | |
| 438 | ) callconv(.winapi) void; | |
| 440 | 439 | |
| 441 | 440 | // TODO: |
| 442 | 441 | // - dwMilliseconds -> LARGE_INTEGER. |
| ... | ... | @@ -447,40 +446,40 @@ pub extern "kernel32" fn SleepConditionVariableSRW( |
| 447 | 446 | SRWLock: *SRWLOCK, |
| 448 | 447 | dwMilliseconds: DWORD, |
| 449 | 448 | Flags: ULONG, |
| 450 | ) callconv(WINAPI) BOOL; | |
| 449 | ) callconv(.winapi) BOOL; | |
| 451 | 450 | |
| 452 | 451 | // Console management |
| 453 | 452 | |
| 454 | 453 | pub extern "kernel32" fn GetConsoleMode( |
| 455 | 454 | hConsoleHandle: HANDLE, |
| 456 | 455 | lpMode: *DWORD, |
| 457 | ) callconv(WINAPI) BOOL; | |
| 456 | ) callconv(.winapi) BOOL; | |
| 458 | 457 | |
| 459 | 458 | pub extern "kernel32" fn SetConsoleMode( |
| 460 | 459 | hConsoleHandle: HANDLE, |
| 461 | 460 | dwMode: DWORD, |
| 462 | ) callconv(WINAPI) BOOL; | |
| 461 | ) callconv(.winapi) BOOL; | |
| 463 | 462 | |
| 464 | 463 | pub extern "kernel32" fn GetConsoleScreenBufferInfo( |
| 465 | 464 | hConsoleOutput: HANDLE, |
| 466 | 465 | lpConsoleScreenBufferInfo: *CONSOLE_SCREEN_BUFFER_INFO, |
| 467 | ) callconv(WINAPI) BOOL; | |
| 466 | ) callconv(.winapi) BOOL; | |
| 468 | 467 | |
| 469 | 468 | pub extern "kernel32" fn SetConsoleTextAttribute( |
| 470 | 469 | hConsoleOutput: HANDLE, |
| 471 | 470 | wAttributes: WORD, |
| 472 | ) callconv(WINAPI) BOOL; | |
| 471 | ) callconv(.winapi) BOOL; | |
| 473 | 472 | |
| 474 | 473 | pub extern "kernel32" fn SetConsoleCtrlHandler( |
| 475 | 474 | HandlerRoutine: ?HANDLER_ROUTINE, |
| 476 | 475 | Add: BOOL, |
| 477 | ) callconv(WINAPI) BOOL; | |
| 476 | ) callconv(.winapi) BOOL; | |
| 478 | 477 | |
| 479 | 478 | pub extern "kernel32" fn SetConsoleOutputCP( |
| 480 | 479 | wCodePageID: UINT, |
| 481 | ) callconv(WINAPI) BOOL; | |
| 480 | ) callconv(.winapi) BOOL; | |
| 482 | 481 | |
| 483 | pub extern "kernel32" fn GetConsoleOutputCP() callconv(WINAPI) UINT; | |
| 482 | pub extern "kernel32" fn GetConsoleOutputCP() callconv(.winapi) UINT; | |
| 484 | 483 | |
| 485 | 484 | pub extern "kernel32" fn FillConsoleOutputAttribute( |
| 486 | 485 | hConsoleOutput: HANDLE, |
| ... | ... | @@ -488,7 +487,7 @@ pub extern "kernel32" fn FillConsoleOutputAttribute( |
| 488 | 487 | nLength: DWORD, |
| 489 | 488 | dwWriteCoord: COORD, |
| 490 | 489 | lpNumberOfAttrsWritten: *DWORD, |
| 491 | ) callconv(WINAPI) BOOL; | |
| 490 | ) callconv(.winapi) BOOL; | |
| 492 | 491 | |
| 493 | 492 | pub extern "kernel32" fn FillConsoleOutputCharacterW( |
| 494 | 493 | hConsoleOutput: HANDLE, |
| ... | ... | @@ -496,12 +495,12 @@ pub extern "kernel32" fn FillConsoleOutputCharacterW( |
| 496 | 495 | nLength: DWORD, |
| 497 | 496 | dwWriteCoord: COORD, |
| 498 | 497 | lpNumberOfCharsWritten: *DWORD, |
| 499 | ) callconv(WINAPI) BOOL; | |
| 498 | ) callconv(.winapi) BOOL; | |
| 500 | 499 | |
| 501 | 500 | pub extern "kernel32" fn SetConsoleCursorPosition( |
| 502 | 501 | hConsoleOutput: HANDLE, |
| 503 | 502 | dwCursorPosition: COORD, |
| 504 | ) callconv(WINAPI) BOOL; | |
| 503 | ) callconv(.winapi) BOOL; | |
| 505 | 504 | |
| 506 | 505 | pub extern "kernel32" fn WriteConsoleW( |
| 507 | 506 | hConsoleOutput: HANDLE, |
| ... | ... | @@ -509,7 +508,7 @@ pub extern "kernel32" fn WriteConsoleW( |
| 509 | 508 | nNumberOfCharsToWrite: DWORD, |
| 510 | 509 | lpNumberOfCharsWritten: ?*DWORD, |
| 511 | 510 | lpReserved: ?LPVOID, |
| 512 | ) callconv(WINAPI) BOOL; | |
| 511 | ) callconv(.winapi) BOOL; | |
| 513 | 512 | |
| 514 | 513 | pub extern "kernel32" fn ReadConsoleOutputCharacterW( |
| 515 | 514 | hConsoleOutput: HANDLE, |
| ... | ... | @@ -517,7 +516,7 @@ pub extern "kernel32" fn ReadConsoleOutputCharacterW( |
| 517 | 516 | nLength: DWORD, |
| 518 | 517 | dwReadCoord: COORD, |
| 519 | 518 | lpNumberOfCharsRead: *DWORD, |
| 520 | ) callconv(windows.WINAPI) BOOL; | |
| 519 | ) callconv(.winapi) BOOL; | |
| 521 | 520 | |
| 522 | 521 | // Memory Mapping/Allocation |
| 523 | 522 | |
| ... | ... | @@ -526,12 +525,12 @@ pub extern "kernel32" fn HeapCreate( |
| 526 | 525 | flOptions: DWORD, |
| 527 | 526 | dwInitialSize: SIZE_T, |
| 528 | 527 | dwMaximumSize: SIZE_T, |
| 529 | ) callconv(WINAPI) ?HANDLE; | |
| 528 | ) callconv(.winapi) ?HANDLE; | |
| 530 | 529 | |
| 531 | 530 | // TODO: Wrapper around RtlDestroyHeap (BOOLEAN -> BOOL). |
| 532 | 531 | pub extern "kernel32" fn HeapDestroy( |
| 533 | 532 | hHeap: HANDLE, |
| 534 | ) callconv(WINAPI) BOOL; | |
| 533 | ) callconv(.winapi) BOOL; | |
| 535 | 534 | |
| 536 | 535 | // TODO: Forwarder to RtlReAllocateHeap. |
| 537 | 536 | pub extern "kernel32" fn HeapReAlloc( |
| ... | ... | @@ -539,28 +538,28 @@ pub extern "kernel32" fn HeapReAlloc( |
| 539 | 538 | dwFlags: DWORD, |
| 540 | 539 | lpMem: *anyopaque, |
| 541 | 540 | dwBytes: SIZE_T, |
| 542 | ) callconv(WINAPI) ?*anyopaque; | |
| 541 | ) callconv(.winapi) ?*anyopaque; | |
| 543 | 542 | |
| 544 | 543 | // TODO: Fowrarder to RtlAllocateHeap. |
| 545 | 544 | pub extern "kernel32" fn HeapAlloc( |
| 546 | 545 | hHeap: HANDLE, |
| 547 | 546 | dwFlags: DWORD, |
| 548 | 547 | dwBytes: SIZE_T, |
| 549 | ) callconv(WINAPI) ?*anyopaque; | |
| 548 | ) callconv(.winapi) ?*anyopaque; | |
| 550 | 549 | |
| 551 | 550 | // TODO: Fowrarder to RtlFreeHeap. |
| 552 | 551 | pub extern "kernel32" fn HeapFree( |
| 553 | 552 | hHeap: HANDLE, |
| 554 | 553 | dwFlags: DWORD, |
| 555 | 554 | lpMem: LPVOID, |
| 556 | ) callconv(WINAPI) BOOL; | |
| 555 | ) callconv(.winapi) BOOL; | |
| 557 | 556 | |
| 558 | 557 | // TODO: Wrapper around RtlValidateHeap (BOOLEAN -> BOOL) |
| 559 | 558 | pub extern "kernel32" fn HeapValidate( |
| 560 | 559 | hHeap: HANDLE, |
| 561 | 560 | dwFlags: DWORD, |
| 562 | 561 | lpMem: ?*const anyopaque, |
| 563 | ) callconv(WINAPI) BOOL; | |
| 562 | ) callconv(.winapi) BOOL; | |
| 564 | 563 | |
| 565 | 564 | // TODO: Wrapper around NtAllocateVirtualMemory. |
| 566 | 565 | pub extern "kernel32" fn VirtualAlloc( |
| ... | ... | @@ -568,7 +567,7 @@ pub extern "kernel32" fn VirtualAlloc( |
| 568 | 567 | dwSize: SIZE_T, |
| 569 | 568 | flAllocationType: DWORD, |
| 570 | 569 | flProtect: DWORD, |
| 571 | ) callconv(WINAPI) ?LPVOID; | |
| 570 | ) callconv(.winapi) ?LPVOID; | |
| 572 | 571 | |
| 573 | 572 | // TODO: Wrapper around NtFreeVirtualMemory. |
| 574 | 573 | // If the return value is .INVALID_PAGE_PROTECTION, calls RtlFlushSecureMemoryCache and try again. |
| ... | ... | @@ -576,21 +575,21 @@ pub extern "kernel32" fn VirtualFree( |
| 576 | 575 | lpAddress: ?LPVOID, |
| 577 | 576 | dwSize: SIZE_T, |
| 578 | 577 | dwFreeType: DWORD, |
| 579 | ) callconv(WINAPI) BOOL; | |
| 578 | ) callconv(.winapi) BOOL; | |
| 580 | 579 | |
| 581 | 580 | // TODO: Wrapper around NtQueryVirtualMemory. |
| 582 | 581 | pub extern "kernel32" fn VirtualQuery( |
| 583 | 582 | lpAddress: ?LPVOID, |
| 584 | 583 | lpBuffer: PMEMORY_BASIC_INFORMATION, |
| 585 | 584 | dwLength: SIZE_T, |
| 586 | ) callconv(WINAPI) SIZE_T; | |
| 585 | ) callconv(.winapi) SIZE_T; | |
| 587 | 586 | |
| 588 | 587 | pub extern "kernel32" fn LocalFree( |
| 589 | 588 | hMem: HLOCAL, |
| 590 | ) callconv(WINAPI) ?HLOCAL; | |
| 589 | ) callconv(.winapi) ?HLOCAL; | |
| 591 | 590 | |
| 592 | 591 | // TODO: Getter for peb.ProcessHeap |
| 593 | pub extern "kernel32" fn GetProcessHeap() callconv(WINAPI) ?HANDLE; | |
| 592 | pub extern "kernel32" fn GetProcessHeap() callconv(.winapi) ?HANDLE; | |
| 594 | 593 | |
| 595 | 594 | // Code Libraries/Modules |
| 596 | 595 | |
| ... | ... | @@ -599,49 +598,49 @@ pub extern "kernel32" fn GetModuleFileNameW( |
| 599 | 598 | hModule: ?HMODULE, |
| 600 | 599 | lpFilename: [*]WCHAR, |
| 601 | 600 | nSize: DWORD, |
| 602 | ) callconv(WINAPI) DWORD; | |
| 601 | ) callconv(.winapi) DWORD; | |
| 603 | 602 | |
| 604 | 603 | extern "kernel32" fn K32GetModuleFileNameExW( |
| 605 | 604 | hProcess: HANDLE, |
| 606 | 605 | hModule: ?HMODULE, |
| 607 | 606 | lpFilename: LPWSTR, |
| 608 | 607 | nSize: DWORD, |
| 609 | ) callconv(WINAPI) DWORD; | |
| 608 | ) callconv(.winapi) DWORD; | |
| 610 | 609 | pub const GetModuleFileNameExW = K32GetModuleFileNameExW; |
| 611 | 610 | |
| 612 | 611 | // TODO: Wrapper around ntdll.LdrGetDllHandle, which is a wrapper around LdrGetDllHandleEx |
| 613 | 612 | pub extern "kernel32" fn GetModuleHandleW( |
| 614 | 613 | lpModuleName: ?LPCWSTR, |
| 615 | ) callconv(WINAPI) ?HMODULE; | |
| 614 | ) callconv(.winapi) ?HMODULE; | |
| 616 | 615 | |
| 617 | 616 | pub extern "kernel32" fn Module32First( |
| 618 | 617 | hSnapshot: HANDLE, |
| 619 | 618 | lpme: *MODULEENTRY32, |
| 620 | ) callconv(WINAPI) BOOL; | |
| 619 | ) callconv(.winapi) BOOL; | |
| 621 | 620 | |
| 622 | 621 | pub extern "kernel32" fn Module32Next( |
| 623 | 622 | hSnapshot: HANDLE, |
| 624 | 623 | lpme: *MODULEENTRY32, |
| 625 | ) callconv(WINAPI) BOOL; | |
| 624 | ) callconv(.winapi) BOOL; | |
| 626 | 625 | |
| 627 | 626 | pub extern "kernel32" fn LoadLibraryW( |
| 628 | 627 | lpLibFileName: LPCWSTR, |
| 629 | ) callconv(WINAPI) ?HMODULE; | |
| 628 | ) callconv(.winapi) ?HMODULE; | |
| 630 | 629 | |
| 631 | 630 | pub extern "kernel32" fn LoadLibraryExW( |
| 632 | 631 | lpLibFileName: LPCWSTR, |
| 633 | 632 | hFile: ?HANDLE, |
| 634 | 633 | dwFlags: DWORD, |
| 635 | ) callconv(WINAPI) ?HMODULE; | |
| 634 | ) callconv(.winapi) ?HMODULE; | |
| 636 | 635 | |
| 637 | 636 | pub extern "kernel32" fn GetProcAddress( |
| 638 | 637 | hModule: HMODULE, |
| 639 | 638 | lpProcName: LPCSTR, |
| 640 | ) callconv(WINAPI) ?FARPROC; | |
| 639 | ) callconv(.winapi) ?FARPROC; | |
| 641 | 640 | |
| 642 | 641 | pub extern "kernel32" fn FreeLibrary( |
| 643 | 642 | hModule: HMODULE, |
| 644 | ) callconv(WINAPI) BOOL; | |
| 643 | ) callconv(.winapi) BOOL; | |
| 645 | 644 | |
| 646 | 645 | // Error Management |
| 647 | 646 | |
| ... | ... | @@ -653,15 +652,15 @@ pub extern "kernel32" fn FormatMessageW( |
| 653 | 652 | lpBuffer: LPWSTR, |
| 654 | 653 | nSize: DWORD, |
| 655 | 654 | Arguments: ?*va_list, |
| 656 | ) callconv(WINAPI) DWORD; | |
| 655 | ) callconv(.winapi) DWORD; | |
| 657 | 656 | |
| 658 | 657 | // TODO: Getter for teb().LastErrorValue. |
| 659 | pub extern "kernel32" fn GetLastError() callconv(WINAPI) Win32Error; | |
| 658 | pub extern "kernel32" fn GetLastError() callconv(.winapi) Win32Error; | |
| 660 | 659 | |
| 661 | 660 | // TODO: Wrapper around RtlSetLastWin32Error. |
| 662 | 661 | pub extern "kernel32" fn SetLastError( |
| 663 | 662 | dwErrCode: Win32Error, |
| 664 | ) callconv(WINAPI) void; | |
| 663 | ) callconv(.winapi) void; | |
| 665 | 664 | |
| 666 | 665 | // Everything Else |
| 667 | 666 | |
| ... | ... | @@ -670,4 +669,4 @@ pub extern "kernel32" fn SetLastError( |
| 670 | 669 | // Much better to use NtQuerySystemTime or NtQuerySystemTimePrecise for guaranteed 0.1ns precision. |
| 671 | 670 | pub extern "kernel32" fn GetSystemTimeAsFileTime( |
| 672 | 671 | lpSystemTimeAsFileTime: *FILETIME, |
| 673 | ) callconv(WINAPI) void; | |
| 672 | ) callconv(.winapi) void; |
lib/std/os/windows/ntdll.zig+46-47| ... | ... | @@ -5,7 +5,6 @@ const BOOL = windows.BOOL; |
| 5 | 5 | const DWORD = windows.DWORD; |
| 6 | 6 | const DWORD64 = windows.DWORD64; |
| 7 | 7 | const ULONG = windows.ULONG; |
| 8 | const WINAPI = windows.WINAPI; | |
| 9 | 8 | const NTSTATUS = windows.NTSTATUS; |
| 10 | 9 | const WORD = windows.WORD; |
| 11 | 10 | const HANDLE = windows.HANDLE; |
| ... | ... | @@ -44,7 +43,7 @@ pub extern "ntdll" fn NtQueryInformationProcess( |
| 44 | 43 | ProcessInformation: *anyopaque, |
| 45 | 44 | ProcessInformationLength: ULONG, |
| 46 | 45 | ReturnLength: ?*ULONG, |
| 47 | ) callconv(WINAPI) NTSTATUS; | |
| 46 | ) callconv(.winapi) NTSTATUS; | |
| 48 | 47 | |
| 49 | 48 | pub extern "ntdll" fn NtQueryInformationThread( |
| 50 | 49 | ThreadHandle: HANDLE, |
| ... | ... | @@ -52,37 +51,37 @@ pub extern "ntdll" fn NtQueryInformationThread( |
| 52 | 51 | ThreadInformation: *anyopaque, |
| 53 | 52 | ThreadInformationLength: ULONG, |
| 54 | 53 | ReturnLength: ?*ULONG, |
| 55 | ) callconv(WINAPI) NTSTATUS; | |
| 54 | ) callconv(.winapi) NTSTATUS; | |
| 56 | 55 | |
| 57 | 56 | pub extern "ntdll" fn NtQuerySystemInformation( |
| 58 | 57 | SystemInformationClass: SYSTEM_INFORMATION_CLASS, |
| 59 | 58 | SystemInformation: PVOID, |
| 60 | 59 | SystemInformationLength: ULONG, |
| 61 | 60 | ReturnLength: ?*ULONG, |
| 62 | ) callconv(WINAPI) NTSTATUS; | |
| 61 | ) callconv(.winapi) NTSTATUS; | |
| 63 | 62 | |
| 64 | 63 | pub extern "ntdll" fn NtSetInformationThread( |
| 65 | 64 | ThreadHandle: HANDLE, |
| 66 | 65 | ThreadInformationClass: THREADINFOCLASS, |
| 67 | 66 | ThreadInformation: *const anyopaque, |
| 68 | 67 | ThreadInformationLength: ULONG, |
| 69 | ) callconv(WINAPI) NTSTATUS; | |
| 68 | ) callconv(.winapi) NTSTATUS; | |
| 70 | 69 | |
| 71 | 70 | pub extern "ntdll" fn RtlGetVersion( |
| 72 | 71 | lpVersionInformation: *RTL_OSVERSIONINFOW, |
| 73 | ) callconv(WINAPI) NTSTATUS; | |
| 72 | ) callconv(.winapi) NTSTATUS; | |
| 74 | 73 | pub extern "ntdll" fn RtlCaptureStackBackTrace( |
| 75 | 74 | FramesToSkip: DWORD, |
| 76 | 75 | FramesToCapture: DWORD, |
| 77 | 76 | BackTrace: **anyopaque, |
| 78 | 77 | BackTraceHash: ?*DWORD, |
| 79 | ) callconv(WINAPI) WORD; | |
| 80 | pub extern "ntdll" fn RtlCaptureContext(ContextRecord: *CONTEXT) callconv(WINAPI) void; | |
| 78 | ) callconv(.winapi) WORD; | |
| 79 | pub extern "ntdll" fn RtlCaptureContext(ContextRecord: *CONTEXT) callconv(.winapi) void; | |
| 81 | 80 | pub extern "ntdll" fn RtlLookupFunctionEntry( |
| 82 | 81 | ControlPc: DWORD64, |
| 83 | 82 | ImageBase: *DWORD64, |
| 84 | 83 | HistoryTable: *UNWIND_HISTORY_TABLE, |
| 85 | ) callconv(WINAPI) ?*RUNTIME_FUNCTION; | |
| 84 | ) callconv(.winapi) ?*RUNTIME_FUNCTION; | |
| 86 | 85 | pub extern "ntdll" fn RtlVirtualUnwind( |
| 87 | 86 | HandlerType: DWORD, |
| 88 | 87 | ImageBase: DWORD64, |
| ... | ... | @@ -92,33 +91,33 @@ pub extern "ntdll" fn RtlVirtualUnwind( |
| 92 | 91 | HandlerData: *?PVOID, |
| 93 | 92 | EstablisherFrame: *DWORD64, |
| 94 | 93 | ContextPointers: ?*KNONVOLATILE_CONTEXT_POINTERS, |
| 95 | ) callconv(WINAPI) *EXCEPTION_ROUTINE; | |
| 94 | ) callconv(.winapi) *EXCEPTION_ROUTINE; | |
| 96 | 95 | pub extern "ntdll" fn NtQueryInformationFile( |
| 97 | 96 | FileHandle: HANDLE, |
| 98 | 97 | IoStatusBlock: *IO_STATUS_BLOCK, |
| 99 | 98 | FileInformation: *anyopaque, |
| 100 | 99 | Length: ULONG, |
| 101 | 100 | FileInformationClass: FILE_INFORMATION_CLASS, |
| 102 | ) callconv(WINAPI) NTSTATUS; | |
| 101 | ) callconv(.winapi) NTSTATUS; | |
| 103 | 102 | pub extern "ntdll" fn NtSetInformationFile( |
| 104 | 103 | FileHandle: HANDLE, |
| 105 | 104 | IoStatusBlock: *IO_STATUS_BLOCK, |
| 106 | 105 | FileInformation: PVOID, |
| 107 | 106 | Length: ULONG, |
| 108 | 107 | FileInformationClass: FILE_INFORMATION_CLASS, |
| 109 | ) callconv(WINAPI) NTSTATUS; | |
| 108 | ) callconv(.winapi) NTSTATUS; | |
| 110 | 109 | |
| 111 | 110 | pub extern "ntdll" fn NtQueryAttributesFile( |
| 112 | 111 | ObjectAttributes: *OBJECT_ATTRIBUTES, |
| 113 | 112 | FileAttributes: *FILE_BASIC_INFORMATION, |
| 114 | ) callconv(WINAPI) NTSTATUS; | |
| 113 | ) callconv(.winapi) NTSTATUS; | |
| 115 | 114 | |
| 116 | pub extern "ntdll" fn RtlQueryPerformanceCounter(PerformanceCounter: *LARGE_INTEGER) callconv(WINAPI) BOOL; | |
| 117 | pub extern "ntdll" fn RtlQueryPerformanceFrequency(PerformanceFrequency: *LARGE_INTEGER) callconv(WINAPI) BOOL; | |
| 115 | pub extern "ntdll" fn RtlQueryPerformanceCounter(PerformanceCounter: *LARGE_INTEGER) callconv(.winapi) BOOL; | |
| 116 | pub extern "ntdll" fn RtlQueryPerformanceFrequency(PerformanceFrequency: *LARGE_INTEGER) callconv(.winapi) BOOL; | |
| 118 | 117 | pub extern "ntdll" fn NtQueryPerformanceCounter( |
| 119 | 118 | PerformanceCounter: *LARGE_INTEGER, |
| 120 | 119 | PerformanceFrequency: ?*LARGE_INTEGER, |
| 121 | ) callconv(WINAPI) NTSTATUS; | |
| 120 | ) callconv(.winapi) NTSTATUS; | |
| 122 | 121 | |
| 123 | 122 | pub extern "ntdll" fn NtCreateFile( |
| 124 | 123 | FileHandle: *HANDLE, |
| ... | ... | @@ -132,7 +131,7 @@ pub extern "ntdll" fn NtCreateFile( |
| 132 | 131 | CreateOptions: ULONG, |
| 133 | 132 | EaBuffer: ?*anyopaque, |
| 134 | 133 | EaLength: ULONG, |
| 135 | ) callconv(WINAPI) NTSTATUS; | |
| 134 | ) callconv(.winapi) NTSTATUS; | |
| 136 | 135 | pub extern "ntdll" fn NtCreateSection( |
| 137 | 136 | SectionHandle: *HANDLE, |
| 138 | 137 | DesiredAccess: ACCESS_MASK, |
| ... | ... | @@ -141,7 +140,7 @@ pub extern "ntdll" fn NtCreateSection( |
| 141 | 140 | SectionPageProtection: ULONG, |
| 142 | 141 | AllocationAttributes: ULONG, |
| 143 | 142 | FileHandle: ?HANDLE, |
| 144 | ) callconv(WINAPI) NTSTATUS; | |
| 143 | ) callconv(.winapi) NTSTATUS; | |
| 145 | 144 | pub extern "ntdll" fn NtMapViewOfSection( |
| 146 | 145 | SectionHandle: HANDLE, |
| 147 | 146 | ProcessHandle: HANDLE, |
| ... | ... | @@ -153,11 +152,11 @@ pub extern "ntdll" fn NtMapViewOfSection( |
| 153 | 152 | InheritDispostion: SECTION_INHERIT, |
| 154 | 153 | AllocationType: ULONG, |
| 155 | 154 | Win32Protect: ULONG, |
| 156 | ) callconv(WINAPI) NTSTATUS; | |
| 155 | ) callconv(.winapi) NTSTATUS; | |
| 157 | 156 | pub extern "ntdll" fn NtUnmapViewOfSection( |
| 158 | 157 | ProcessHandle: HANDLE, |
| 159 | 158 | BaseAddress: PVOID, |
| 160 | ) callconv(WINAPI) NTSTATUS; | |
| 159 | ) callconv(.winapi) NTSTATUS; | |
| 161 | 160 | pub extern "ntdll" fn NtDeviceIoControlFile( |
| 162 | 161 | FileHandle: HANDLE, |
| 163 | 162 | Event: ?HANDLE, |
| ... | ... | @@ -169,7 +168,7 @@ pub extern "ntdll" fn NtDeviceIoControlFile( |
| 169 | 168 | InputBufferLength: ULONG, |
| 170 | 169 | OutputBuffer: ?PVOID, |
| 171 | 170 | OutputBufferLength: ULONG, |
| 172 | ) callconv(WINAPI) NTSTATUS; | |
| 171 | ) callconv(.winapi) NTSTATUS; | |
| 173 | 172 | pub extern "ntdll" fn NtFsControlFile( |
| 174 | 173 | FileHandle: HANDLE, |
| 175 | 174 | Event: ?HANDLE, |
| ... | ... | @@ -181,15 +180,15 @@ pub extern "ntdll" fn NtFsControlFile( |
| 181 | 180 | InputBufferLength: ULONG, |
| 182 | 181 | OutputBuffer: ?PVOID, |
| 183 | 182 | OutputBufferLength: ULONG, |
| 184 | ) callconv(WINAPI) NTSTATUS; | |
| 185 | pub extern "ntdll" fn NtClose(Handle: HANDLE) callconv(WINAPI) NTSTATUS; | |
| 183 | ) callconv(.winapi) NTSTATUS; | |
| 184 | pub extern "ntdll" fn NtClose(Handle: HANDLE) callconv(.winapi) NTSTATUS; | |
| 186 | 185 | pub extern "ntdll" fn RtlDosPathNameToNtPathName_U( |
| 187 | 186 | DosPathName: [*:0]const u16, |
| 188 | 187 | NtPathName: *UNICODE_STRING, |
| 189 | 188 | NtFileNamePart: ?*?[*:0]const u16, |
| 190 | 189 | DirectoryInfo: ?*CURDIR, |
| 191 | ) callconv(WINAPI) BOOL; | |
| 192 | pub extern "ntdll" fn RtlFreeUnicodeString(UnicodeString: *UNICODE_STRING) callconv(WINAPI) void; | |
| 190 | ) callconv(.winapi) BOOL; | |
| 191 | pub extern "ntdll" fn RtlFreeUnicodeString(UnicodeString: *UNICODE_STRING) callconv(.winapi) void; | |
| 193 | 192 | |
| 194 | 193 | /// Returns the number of bytes written to `Buffer`. |
| 195 | 194 | /// If the returned count is larger than `BufferByteLength`, the buffer was too small. |
| ... | ... | @@ -199,7 +198,7 @@ pub extern "ntdll" fn RtlGetFullPathName_U( |
| 199 | 198 | BufferByteLength: ULONG, |
| 200 | 199 | Buffer: [*]u16, |
| 201 | 200 | ShortName: ?*[*:0]const u16, |
| 202 | ) callconv(windows.WINAPI) windows.ULONG; | |
| 201 | ) callconv(.winapi) windows.ULONG; | |
| 203 | 202 | |
| 204 | 203 | pub extern "ntdll" fn NtQueryDirectoryFile( |
| 205 | 204 | FileHandle: HANDLE, |
| ... | ... | @@ -213,30 +212,30 @@ pub extern "ntdll" fn NtQueryDirectoryFile( |
| 213 | 212 | ReturnSingleEntry: BOOLEAN, |
| 214 | 213 | FileName: ?*UNICODE_STRING, |
| 215 | 214 | RestartScan: BOOLEAN, |
| 216 | ) callconv(WINAPI) NTSTATUS; | |
| 215 | ) callconv(.winapi) NTSTATUS; | |
| 217 | 216 | |
| 218 | 217 | pub extern "ntdll" fn NtCreateKeyedEvent( |
| 219 | 218 | KeyedEventHandle: *HANDLE, |
| 220 | 219 | DesiredAccess: ACCESS_MASK, |
| 221 | 220 | ObjectAttributes: ?PVOID, |
| 222 | 221 | Flags: ULONG, |
| 223 | ) callconv(WINAPI) NTSTATUS; | |
| 222 | ) callconv(.winapi) NTSTATUS; | |
| 224 | 223 | |
| 225 | 224 | pub extern "ntdll" fn NtReleaseKeyedEvent( |
| 226 | 225 | EventHandle: ?HANDLE, |
| 227 | 226 | Key: ?*const anyopaque, |
| 228 | 227 | Alertable: BOOLEAN, |
| 229 | 228 | Timeout: ?*const LARGE_INTEGER, |
| 230 | ) callconv(WINAPI) NTSTATUS; | |
| 229 | ) callconv(.winapi) NTSTATUS; | |
| 231 | 230 | |
| 232 | 231 | pub extern "ntdll" fn NtWaitForKeyedEvent( |
| 233 | 232 | EventHandle: ?HANDLE, |
| 234 | 233 | Key: ?*const anyopaque, |
| 235 | 234 | Alertable: BOOLEAN, |
| 236 | 235 | Timeout: ?*const LARGE_INTEGER, |
| 237 | ) callconv(WINAPI) NTSTATUS; | |
| 236 | ) callconv(.winapi) NTSTATUS; | |
| 238 | 237 | |
| 239 | pub extern "ntdll" fn RtlSetCurrentDirectory_U(PathName: *UNICODE_STRING) callconv(WINAPI) NTSTATUS; | |
| 238 | pub extern "ntdll" fn RtlSetCurrentDirectory_U(PathName: *UNICODE_STRING) callconv(.winapi) NTSTATUS; | |
| 240 | 239 | |
| 241 | 240 | pub extern "ntdll" fn NtQueryObject( |
| 242 | 241 | Handle: HANDLE, |
| ... | ... | @@ -244,7 +243,7 @@ pub extern "ntdll" fn NtQueryObject( |
| 244 | 243 | ObjectInformation: PVOID, |
| 245 | 244 | ObjectInformationLength: ULONG, |
| 246 | 245 | ReturnLength: ?*ULONG, |
| 247 | ) callconv(WINAPI) NTSTATUS; | |
| 246 | ) callconv(.winapi) NTSTATUS; | |
| 248 | 247 | |
| 249 | 248 | pub extern "ntdll" fn NtQueryVolumeInformationFile( |
| 250 | 249 | FileHandle: HANDLE, |
| ... | ... | @@ -252,32 +251,32 @@ pub extern "ntdll" fn NtQueryVolumeInformationFile( |
| 252 | 251 | FsInformation: *anyopaque, |
| 253 | 252 | Length: ULONG, |
| 254 | 253 | FsInformationClass: FS_INFORMATION_CLASS, |
| 255 | ) callconv(WINAPI) NTSTATUS; | |
| 254 | ) callconv(.winapi) NTSTATUS; | |
| 256 | 255 | |
| 257 | 256 | pub extern "ntdll" fn RtlWakeAddressAll( |
| 258 | 257 | Address: ?*const anyopaque, |
| 259 | ) callconv(WINAPI) void; | |
| 258 | ) callconv(.winapi) void; | |
| 260 | 259 | |
| 261 | 260 | pub extern "ntdll" fn RtlWakeAddressSingle( |
| 262 | 261 | Address: ?*const anyopaque, |
| 263 | ) callconv(WINAPI) void; | |
| 262 | ) callconv(.winapi) void; | |
| 264 | 263 | |
| 265 | 264 | pub extern "ntdll" fn RtlWaitOnAddress( |
| 266 | 265 | Address: ?*const anyopaque, |
| 267 | 266 | CompareAddress: ?*const anyopaque, |
| 268 | 267 | AddressSize: SIZE_T, |
| 269 | 268 | Timeout: ?*const LARGE_INTEGER, |
| 270 | ) callconv(WINAPI) NTSTATUS; | |
| 269 | ) callconv(.winapi) NTSTATUS; | |
| 271 | 270 | |
| 272 | 271 | pub extern "ntdll" fn RtlEqualUnicodeString( |
| 273 | 272 | String1: *const UNICODE_STRING, |
| 274 | 273 | String2: *const UNICODE_STRING, |
| 275 | 274 | CaseInSensitive: BOOLEAN, |
| 276 | ) callconv(WINAPI) BOOLEAN; | |
| 275 | ) callconv(.winapi) BOOLEAN; | |
| 277 | 276 | |
| 278 | 277 | pub extern "ntdll" fn RtlUpcaseUnicodeChar( |
| 279 | 278 | SourceCharacter: u16, |
| 280 | ) callconv(WINAPI) u16; | |
| 279 | ) callconv(.winapi) u16; | |
| 281 | 280 | |
| 282 | 281 | pub extern "ntdll" fn NtLockFile( |
| 283 | 282 | FileHandle: HANDLE, |
| ... | ... | @@ -290,7 +289,7 @@ pub extern "ntdll" fn NtLockFile( |
| 290 | 289 | Key: ?*ULONG, |
| 291 | 290 | FailImmediately: BOOLEAN, |
| 292 | 291 | ExclusiveLock: BOOLEAN, |
| 293 | ) callconv(WINAPI) NTSTATUS; | |
| 292 | ) callconv(.winapi) NTSTATUS; | |
| 294 | 293 | |
| 295 | 294 | pub extern "ntdll" fn NtUnlockFile( |
| 296 | 295 | FileHandle: HANDLE, |
| ... | ... | @@ -298,13 +297,13 @@ pub extern "ntdll" fn NtUnlockFile( |
| 298 | 297 | ByteOffset: *const LARGE_INTEGER, |
| 299 | 298 | Length: *const LARGE_INTEGER, |
| 300 | 299 | Key: ?*ULONG, |
| 301 | ) callconv(WINAPI) NTSTATUS; | |
| 300 | ) callconv(.winapi) NTSTATUS; | |
| 302 | 301 | |
| 303 | 302 | pub extern "ntdll" fn NtOpenKey( |
| 304 | 303 | KeyHandle: *HANDLE, |
| 305 | 304 | DesiredAccess: ACCESS_MASK, |
| 306 | 305 | ObjectAttributes: OBJECT_ATTRIBUTES, |
| 307 | ) callconv(WINAPI) NTSTATUS; | |
| 306 | ) callconv(.winapi) NTSTATUS; | |
| 308 | 307 | |
| 309 | 308 | pub extern "ntdll" fn RtlQueryRegistryValues( |
| 310 | 309 | RelativeTo: ULONG, |
| ... | ... | @@ -312,7 +311,7 @@ pub extern "ntdll" fn RtlQueryRegistryValues( |
| 312 | 311 | QueryTable: [*]RTL_QUERY_REGISTRY_TABLE, |
| 313 | 312 | Context: ?*anyopaque, |
| 314 | 313 | Environment: ?*anyopaque, |
| 315 | ) callconv(WINAPI) NTSTATUS; | |
| 314 | ) callconv(.winapi) NTSTATUS; | |
| 316 | 315 | |
| 317 | 316 | pub extern "ntdll" fn NtReadVirtualMemory( |
| 318 | 317 | ProcessHandle: HANDLE, |
| ... | ... | @@ -320,7 +319,7 @@ pub extern "ntdll" fn NtReadVirtualMemory( |
| 320 | 319 | Buffer: LPVOID, |
| 321 | 320 | NumberOfBytesToRead: SIZE_T, |
| 322 | 321 | NumberOfBytesRead: ?*SIZE_T, |
| 323 | ) callconv(WINAPI) NTSTATUS; | |
| 322 | ) callconv(.winapi) NTSTATUS; | |
| 324 | 323 | |
| 325 | 324 | pub extern "ntdll" fn NtWriteVirtualMemory( |
| 326 | 325 | ProcessHandle: HANDLE, |
| ... | ... | @@ -328,7 +327,7 @@ pub extern "ntdll" fn NtWriteVirtualMemory( |
| 328 | 327 | Buffer: LPCVOID, |
| 329 | 328 | NumberOfBytesToWrite: SIZE_T, |
| 330 | 329 | NumberOfBytesWritten: ?*SIZE_T, |
| 331 | ) callconv(WINAPI) NTSTATUS; | |
| 330 | ) callconv(.winapi) NTSTATUS; | |
| 332 | 331 | |
| 333 | 332 | pub extern "ntdll" fn NtProtectVirtualMemory( |
| 334 | 333 | ProcessHandle: HANDLE, |
| ... | ... | @@ -336,11 +335,11 @@ pub extern "ntdll" fn NtProtectVirtualMemory( |
| 336 | 335 | NumberOfBytesToProtect: *SIZE_T, |
| 337 | 336 | NewAccessProtection: ULONG, |
| 338 | 337 | OldAccessProtection: *ULONG, |
| 339 | ) callconv(WINAPI) NTSTATUS; | |
| 338 | ) callconv(.winapi) NTSTATUS; | |
| 340 | 339 | |
| 341 | 340 | pub extern "ntdll" fn RtlExitUserProcess( |
| 342 | 341 | ExitStatus: u32, |
| 343 | ) callconv(WINAPI) noreturn; | |
| 342 | ) callconv(.winapi) noreturn; | |
| 344 | 343 | |
| 345 | 344 | pub extern "ntdll" fn NtCreateNamedPipeFile( |
| 346 | 345 | FileHandle: *HANDLE, |
| ... | ... | @@ -357,4 +356,4 @@ pub extern "ntdll" fn NtCreateNamedPipeFile( |
| 357 | 356 | InboundQuota: ULONG, |
| 358 | 357 | OutboundQuota: ULONG, |
| 359 | 358 | DefaultTimeout: *LARGE_INTEGER, |
| 360 | ) callconv(WINAPI) NTSTATUS; | |
| 359 | ) callconv(.winapi) NTSTATUS; |
lib/std/os/windows/test.zig+1-1| ... | ... | @@ -250,7 +250,7 @@ test "loadWinsockExtensionFunction" { |
| 250 | 250 | SendBufLen: windows.DWORD, |
| 251 | 251 | BytesSent: *windows.DWORD, |
| 252 | 252 | Overlapped: *windows.OVERLAPPED, |
| 253 | ) callconv(windows.WINAPI) windows.BOOL; | |
| 253 | ) callconv(.winapi) windows.BOOL; | |
| 254 | 254 | |
| 255 | 255 | _ = windows.loadWinsockExtensionFunction( |
| 256 | 256 | LPFN_CONNECTEX, |
lib/std/os/windows/ws2_32.zig+106-107| ... | ... | @@ -2,7 +2,6 @@ const std = @import("../../std.zig"); |
| 2 | 2 | const assert = std.debug.assert; |
| 3 | 3 | const windows = std.os.windows; |
| 4 | 4 | |
| 5 | const WINAPI = windows.WINAPI; | |
| 6 | 5 | const OVERLAPPED = windows.OVERLAPPED; |
| 7 | 6 | const WORD = windows.WORD; |
| 8 | 7 | const DWORD = windows.DWORD; |
| ... | ... | @@ -958,14 +957,14 @@ pub const LPCONDITIONPROC = *const fn ( |
| 958 | 957 | lpCalleeData: *WSABUF, |
| 959 | 958 | g: *u32, |
| 960 | 959 | dwCallbackData: usize, |
| 961 | ) callconv(WINAPI) i32; | |
| 960 | ) callconv(.winapi) i32; | |
| 962 | 961 | |
| 963 | 962 | pub const LPWSAOVERLAPPED_COMPLETION_ROUTINE = *const fn ( |
| 964 | 963 | dwError: u32, |
| 965 | 964 | cbTransferred: u32, |
| 966 | 965 | lpOverlapped: *OVERLAPPED, |
| 967 | 966 | dwFlags: u32, |
| 968 | ) callconv(WINAPI) void; | |
| 967 | ) callconv(.winapi) void; | |
| 969 | 968 | |
| 970 | 969 | pub const FLOWSPEC = extern struct { |
| 971 | 970 | TokenRate: u32, |
| ... | ... | @@ -1196,7 +1195,7 @@ pub const LPFN_TRANSMITFILE = *const fn ( |
| 1196 | 1195 | lpOverlapped: ?*OVERLAPPED, |
| 1197 | 1196 | lpTransmitBuffers: ?*TRANSMIT_FILE_BUFFERS, |
| 1198 | 1197 | dwReserved: u32, |
| 1199 | ) callconv(WINAPI) BOOL; | |
| 1198 | ) callconv(.winapi) BOOL; | |
| 1200 | 1199 | |
| 1201 | 1200 | pub const LPFN_ACCEPTEX = *const fn ( |
| 1202 | 1201 | sListenSocket: SOCKET, |
| ... | ... | @@ -1207,7 +1206,7 @@ pub const LPFN_ACCEPTEX = *const fn ( |
| 1207 | 1206 | dwRemoteAddressLength: u32, |
| 1208 | 1207 | lpdwBytesReceived: *u32, |
| 1209 | 1208 | lpOverlapped: *OVERLAPPED, |
| 1210 | ) callconv(WINAPI) BOOL; | |
| 1209 | ) callconv(.winapi) BOOL; | |
| 1211 | 1210 | |
| 1212 | 1211 | pub const LPFN_GETACCEPTEXSOCKADDRS = *const fn ( |
| 1213 | 1212 | lpOutputBuffer: *anyopaque, |
| ... | ... | @@ -1218,7 +1217,7 @@ pub const LPFN_GETACCEPTEXSOCKADDRS = *const fn ( |
| 1218 | 1217 | LocalSockaddrLength: *i32, |
| 1219 | 1218 | RemoteSockaddr: **sockaddr, |
| 1220 | 1219 | RemoteSockaddrLength: *i32, |
| 1221 | ) callconv(WINAPI) void; | |
| 1220 | ) callconv(.winapi) void; | |
| 1222 | 1221 | |
| 1223 | 1222 | pub const LPFN_WSASENDMSG = *const fn ( |
| 1224 | 1223 | s: SOCKET, |
| ... | ... | @@ -1227,7 +1226,7 @@ pub const LPFN_WSASENDMSG = *const fn ( |
| 1227 | 1226 | lpNumberOfBytesSent: ?*u32, |
| 1228 | 1227 | lpOverlapped: ?*OVERLAPPED, |
| 1229 | 1228 | lpCompletionRoutine: ?LPWSAOVERLAPPED_COMPLETION_ROUTINE, |
| 1230 | ) callconv(WINAPI) i32; | |
| 1229 | ) callconv(.winapi) i32; | |
| 1231 | 1230 | |
| 1232 | 1231 | pub const LPFN_WSARECVMSG = *const fn ( |
| 1233 | 1232 | s: SOCKET, |
| ... | ... | @@ -1235,12 +1234,12 @@ pub const LPFN_WSARECVMSG = *const fn ( |
| 1235 | 1234 | lpdwNumberOfBytesRecv: ?*u32, |
| 1236 | 1235 | lpOverlapped: ?*OVERLAPPED, |
| 1237 | 1236 | lpCompletionRoutine: ?LPWSAOVERLAPPED_COMPLETION_ROUTINE, |
| 1238 | ) callconv(WINAPI) i32; | |
| 1237 | ) callconv(.winapi) i32; | |
| 1239 | 1238 | |
| 1240 | 1239 | pub const LPSERVICE_CALLBACK_PROC = *const fn ( |
| 1241 | 1240 | lParam: LPARAM, |
| 1242 | 1241 | hAsyncTaskHandle: HANDLE, |
| 1243 | ) callconv(WINAPI) void; | |
| 1242 | ) callconv(.winapi) void; | |
| 1244 | 1243 | |
| 1245 | 1244 | pub const SERVICE_ASYNC_INFO = extern struct { |
| 1246 | 1245 | lpServiceCallbackProc: LPSERVICE_CALLBACK_PROC, |
| ... | ... | @@ -1252,7 +1251,7 @@ pub const LPLOOKUPSERVICE_COMPLETION_ROUTINE = *const fn ( |
| 1252 | 1251 | dwError: u32, |
| 1253 | 1252 | dwBytes: u32, |
| 1254 | 1253 | lpOverlapped: *OVERLAPPED, |
| 1255 | ) callconv(WINAPI) void; | |
| 1254 | ) callconv(.winapi) void; | |
| 1256 | 1255 | |
| 1257 | 1256 | pub const fd_set = extern struct { |
| 1258 | 1257 | fd_count: u32, |
| ... | ... | @@ -1725,41 +1724,41 @@ pub extern "ws2_32" fn accept( |
| 1725 | 1724 | s: SOCKET, |
| 1726 | 1725 | addr: ?*sockaddr, |
| 1727 | 1726 | addrlen: ?*i32, |
| 1728 | ) callconv(WINAPI) SOCKET; | |
| 1727 | ) callconv(.winapi) SOCKET; | |
| 1729 | 1728 | |
| 1730 | 1729 | pub extern "ws2_32" fn bind( |
| 1731 | 1730 | s: SOCKET, |
| 1732 | 1731 | name: *const sockaddr, |
| 1733 | 1732 | namelen: i32, |
| 1734 | ) callconv(WINAPI) i32; | |
| 1733 | ) callconv(.winapi) i32; | |
| 1735 | 1734 | |
| 1736 | 1735 | pub extern "ws2_32" fn closesocket( |
| 1737 | 1736 | s: SOCKET, |
| 1738 | ) callconv(WINAPI) i32; | |
| 1737 | ) callconv(.winapi) i32; | |
| 1739 | 1738 | |
| 1740 | 1739 | pub extern "ws2_32" fn connect( |
| 1741 | 1740 | s: SOCKET, |
| 1742 | 1741 | name: *const sockaddr, |
| 1743 | 1742 | namelen: i32, |
| 1744 | ) callconv(WINAPI) i32; | |
| 1743 | ) callconv(.winapi) i32; | |
| 1745 | 1744 | |
| 1746 | 1745 | pub extern "ws2_32" fn ioctlsocket( |
| 1747 | 1746 | s: SOCKET, |
| 1748 | 1747 | cmd: i32, |
| 1749 | 1748 | argp: *u32, |
| 1750 | ) callconv(WINAPI) i32; | |
| 1749 | ) callconv(.winapi) i32; | |
| 1751 | 1750 | |
| 1752 | 1751 | pub extern "ws2_32" fn getpeername( |
| 1753 | 1752 | s: SOCKET, |
| 1754 | 1753 | name: *sockaddr, |
| 1755 | 1754 | namelen: *i32, |
| 1756 | ) callconv(WINAPI) i32; | |
| 1755 | ) callconv(.winapi) i32; | |
| 1757 | 1756 | |
| 1758 | 1757 | pub extern "ws2_32" fn getsockname( |
| 1759 | 1758 | s: SOCKET, |
| 1760 | 1759 | name: *sockaddr, |
| 1761 | 1760 | namelen: *i32, |
| 1762 | ) callconv(WINAPI) i32; | |
| 1761 | ) callconv(.winapi) i32; | |
| 1763 | 1762 | |
| 1764 | 1763 | pub extern "ws2_32" fn getsockopt( |
| 1765 | 1764 | s: SOCKET, |
| ... | ... | @@ -1767,39 +1766,39 @@ pub extern "ws2_32" fn getsockopt( |
| 1767 | 1766 | optname: i32, |
| 1768 | 1767 | optval: [*]u8, |
| 1769 | 1768 | optlen: *i32, |
| 1770 | ) callconv(WINAPI) i32; | |
| 1769 | ) callconv(.winapi) i32; | |
| 1771 | 1770 | |
| 1772 | 1771 | pub extern "ws2_32" fn htonl( |
| 1773 | 1772 | hostlong: u32, |
| 1774 | ) callconv(WINAPI) u32; | |
| 1773 | ) callconv(.winapi) u32; | |
| 1775 | 1774 | |
| 1776 | 1775 | pub extern "ws2_32" fn htons( |
| 1777 | 1776 | hostshort: u16, |
| 1778 | ) callconv(WINAPI) u16; | |
| 1777 | ) callconv(.winapi) u16; | |
| 1779 | 1778 | |
| 1780 | 1779 | pub extern "ws2_32" fn inet_addr( |
| 1781 | 1780 | cp: ?[*]const u8, |
| 1782 | ) callconv(WINAPI) u32; | |
| 1781 | ) callconv(.winapi) u32; | |
| 1783 | 1782 | |
| 1784 | 1783 | pub extern "ws2_32" fn listen( |
| 1785 | 1784 | s: SOCKET, |
| 1786 | 1785 | backlog: i32, |
| 1787 | ) callconv(WINAPI) i32; | |
| 1786 | ) callconv(.winapi) i32; | |
| 1788 | 1787 | |
| 1789 | 1788 | pub extern "ws2_32" fn ntohl( |
| 1790 | 1789 | netlong: u32, |
| 1791 | ) callconv(WINAPI) u32; | |
| 1790 | ) callconv(.winapi) u32; | |
| 1792 | 1791 | |
| 1793 | 1792 | pub extern "ws2_32" fn ntohs( |
| 1794 | 1793 | netshort: u16, |
| 1795 | ) callconv(WINAPI) u16; | |
| 1794 | ) callconv(.winapi) u16; | |
| 1796 | 1795 | |
| 1797 | 1796 | pub extern "ws2_32" fn recv( |
| 1798 | 1797 | s: SOCKET, |
| 1799 | 1798 | buf: [*]u8, |
| 1800 | 1799 | len: i32, |
| 1801 | 1800 | flags: i32, |
| 1802 | ) callconv(WINAPI) i32; | |
| 1801 | ) callconv(.winapi) i32; | |
| 1803 | 1802 | |
| 1804 | 1803 | pub extern "ws2_32" fn recvfrom( |
| 1805 | 1804 | s: SOCKET, |
| ... | ... | @@ -1808,7 +1807,7 @@ pub extern "ws2_32" fn recvfrom( |
| 1808 | 1807 | flags: i32, |
| 1809 | 1808 | from: ?*sockaddr, |
| 1810 | 1809 | fromlen: ?*i32, |
| 1811 | ) callconv(WINAPI) i32; | |
| 1810 | ) callconv(.winapi) i32; | |
| 1812 | 1811 | |
| 1813 | 1812 | pub extern "ws2_32" fn select( |
| 1814 | 1813 | nfds: i32, |
| ... | ... | @@ -1816,14 +1815,14 @@ pub extern "ws2_32" fn select( |
| 1816 | 1815 | writefds: ?*fd_set, |
| 1817 | 1816 | exceptfds: ?*fd_set, |
| 1818 | 1817 | timeout: ?*const timeval, |
| 1819 | ) callconv(WINAPI) i32; | |
| 1818 | ) callconv(.winapi) i32; | |
| 1820 | 1819 | |
| 1821 | 1820 | pub extern "ws2_32" fn send( |
| 1822 | 1821 | s: SOCKET, |
| 1823 | 1822 | buf: [*]const u8, |
| 1824 | 1823 | len: i32, |
| 1825 | 1824 | flags: u32, |
| 1826 | ) callconv(WINAPI) i32; | |
| 1825 | ) callconv(.winapi) i32; | |
| 1827 | 1826 | |
| 1828 | 1827 | pub extern "ws2_32" fn sendto( |
| 1829 | 1828 | s: SOCKET, |
| ... | ... | @@ -1832,7 +1831,7 @@ pub extern "ws2_32" fn sendto( |
| 1832 | 1831 | flags: i32, |
| 1833 | 1832 | to: *const sockaddr, |
| 1834 | 1833 | tolen: i32, |
| 1835 | ) callconv(WINAPI) i32; | |
| 1834 | ) callconv(.winapi) i32; | |
| 1836 | 1835 | |
| 1837 | 1836 | pub extern "ws2_32" fn setsockopt( |
| 1838 | 1837 | s: SOCKET, |
| ... | ... | @@ -1840,37 +1839,37 @@ pub extern "ws2_32" fn setsockopt( |
| 1840 | 1839 | optname: i32, |
| 1841 | 1840 | optval: ?[*]const u8, |
| 1842 | 1841 | optlen: i32, |
| 1843 | ) callconv(WINAPI) i32; | |
| 1842 | ) callconv(.winapi) i32; | |
| 1844 | 1843 | |
| 1845 | 1844 | pub extern "ws2_32" fn shutdown( |
| 1846 | 1845 | s: SOCKET, |
| 1847 | 1846 | how: i32, |
| 1848 | ) callconv(WINAPI) i32; | |
| 1847 | ) callconv(.winapi) i32; | |
| 1849 | 1848 | |
| 1850 | 1849 | pub extern "ws2_32" fn socket( |
| 1851 | 1850 | af: i32, |
| 1852 | 1851 | @"type": i32, |
| 1853 | 1852 | protocol: i32, |
| 1854 | ) callconv(WINAPI) SOCKET; | |
| 1853 | ) callconv(.winapi) SOCKET; | |
| 1855 | 1854 | |
| 1856 | 1855 | pub extern "ws2_32" fn WSAStartup( |
| 1857 | 1856 | wVersionRequired: WORD, |
| 1858 | 1857 | lpWSAData: *WSADATA, |
| 1859 | ) callconv(WINAPI) i32; | |
| 1858 | ) callconv(.winapi) i32; | |
| 1860 | 1859 | |
| 1861 | pub extern "ws2_32" fn WSACleanup() callconv(WINAPI) i32; | |
| 1860 | pub extern "ws2_32" fn WSACleanup() callconv(.winapi) i32; | |
| 1862 | 1861 | |
| 1863 | pub extern "ws2_32" fn WSASetLastError(iError: i32) callconv(WINAPI) void; | |
| 1862 | pub extern "ws2_32" fn WSASetLastError(iError: i32) callconv(.winapi) void; | |
| 1864 | 1863 | |
| 1865 | pub extern "ws2_32" fn WSAGetLastError() callconv(WINAPI) WinsockError; | |
| 1864 | pub extern "ws2_32" fn WSAGetLastError() callconv(.winapi) WinsockError; | |
| 1866 | 1865 | |
| 1867 | pub extern "ws2_32" fn WSAIsBlocking() callconv(WINAPI) BOOL; | |
| 1866 | pub extern "ws2_32" fn WSAIsBlocking() callconv(.winapi) BOOL; | |
| 1868 | 1867 | |
| 1869 | pub extern "ws2_32" fn WSAUnhookBlockingHook() callconv(WINAPI) i32; | |
| 1868 | pub extern "ws2_32" fn WSAUnhookBlockingHook() callconv(.winapi) i32; | |
| 1870 | 1869 | |
| 1871 | pub extern "ws2_32" fn WSASetBlockingHook(lpBlockFunc: FARPROC) callconv(WINAPI) FARPROC; | |
| 1870 | pub extern "ws2_32" fn WSASetBlockingHook(lpBlockFunc: FARPROC) callconv(.winapi) FARPROC; | |
| 1872 | 1871 | |
| 1873 | pub extern "ws2_32" fn WSACancelBlockingCall() callconv(WINAPI) i32; | |
| 1872 | pub extern "ws2_32" fn WSACancelBlockingCall() callconv(.winapi) i32; | |
| 1874 | 1873 | |
| 1875 | 1874 | pub extern "ws2_32" fn WSAAsyncGetServByName( |
| 1876 | 1875 | hWnd: HWND, |
| ... | ... | @@ -1879,7 +1878,7 @@ pub extern "ws2_32" fn WSAAsyncGetServByName( |
| 1879 | 1878 | proto: ?[*:0]const u8, |
| 1880 | 1879 | buf: [*]u8, |
| 1881 | 1880 | buflen: i32, |
| 1882 | ) callconv(WINAPI) HANDLE; | |
| 1881 | ) callconv(.winapi) HANDLE; | |
| 1883 | 1882 | |
| 1884 | 1883 | pub extern "ws2_32" fn WSAAsyncGetServByPort( |
| 1885 | 1884 | hWnd: HWND, |
| ... | ... | @@ -1888,7 +1887,7 @@ pub extern "ws2_32" fn WSAAsyncGetServByPort( |
| 1888 | 1887 | proto: ?[*:0]const u8, |
| 1889 | 1888 | buf: [*]u8, |
| 1890 | 1889 | buflen: i32, |
| 1891 | ) callconv(WINAPI) HANDLE; | |
| 1890 | ) callconv(.winapi) HANDLE; | |
| 1892 | 1891 | |
| 1893 | 1892 | pub extern "ws2_32" fn WSAAsyncGetProtoByName( |
| 1894 | 1893 | hWnd: HWND, |
| ... | ... | @@ -1896,7 +1895,7 @@ pub extern "ws2_32" fn WSAAsyncGetProtoByName( |
| 1896 | 1895 | name: [*:0]const u8, |
| 1897 | 1896 | buf: [*]u8, |
| 1898 | 1897 | buflen: i32, |
| 1899 | ) callconv(WINAPI) HANDLE; | |
| 1898 | ) callconv(.winapi) HANDLE; | |
| 1900 | 1899 | |
| 1901 | 1900 | pub extern "ws2_32" fn WSAAsyncGetProtoByNumber( |
| 1902 | 1901 | hWnd: HWND, |
| ... | ... | @@ -1904,16 +1903,16 @@ pub extern "ws2_32" fn WSAAsyncGetProtoByNumber( |
| 1904 | 1903 | number: i32, |
| 1905 | 1904 | buf: [*]u8, |
| 1906 | 1905 | buflen: i32, |
| 1907 | ) callconv(WINAPI) HANDLE; | |
| 1906 | ) callconv(.winapi) HANDLE; | |
| 1908 | 1907 | |
| 1909 | pub extern "ws2_32" fn WSACancelAsyncRequest(hAsyncTaskHandle: HANDLE) callconv(WINAPI) i32; | |
| 1908 | pub extern "ws2_32" fn WSACancelAsyncRequest(hAsyncTaskHandle: HANDLE) callconv(.winapi) i32; | |
| 1910 | 1909 | |
| 1911 | 1910 | pub extern "ws2_32" fn WSAAsyncSelect( |
| 1912 | 1911 | s: SOCKET, |
| 1913 | 1912 | hWnd: HWND, |
| 1914 | 1913 | wMsg: u32, |
| 1915 | 1914 | lEvent: i32, |
| 1916 | ) callconv(WINAPI) i32; | |
| 1915 | ) callconv(.winapi) i32; | |
| 1917 | 1916 | |
| 1918 | 1917 | pub extern "ws2_32" fn WSAAccept( |
| 1919 | 1918 | s: SOCKET, |
| ... | ... | @@ -1921,9 +1920,9 @@ pub extern "ws2_32" fn WSAAccept( |
| 1921 | 1920 | addrlen: ?*i32, |
| 1922 | 1921 | lpfnCondition: ?LPCONDITIONPROC, |
| 1923 | 1922 | dwCallbackData: usize, |
| 1924 | ) callconv(WINAPI) SOCKET; | |
| 1923 | ) callconv(.winapi) SOCKET; | |
| 1925 | 1924 | |
| 1926 | pub extern "ws2_32" fn WSACloseEvent(hEvent: HANDLE) callconv(WINAPI) BOOL; | |
| 1925 | pub extern "ws2_32" fn WSACloseEvent(hEvent: HANDLE) callconv(.winapi) BOOL; | |
| 1927 | 1926 | |
| 1928 | 1927 | pub extern "ws2_32" fn WSAConnect( |
| 1929 | 1928 | s: SOCKET, |
| ... | ... | @@ -1933,7 +1932,7 @@ pub extern "ws2_32" fn WSAConnect( |
| 1933 | 1932 | lpCalleeData: ?*WSABUF, |
| 1934 | 1933 | lpSQOS: ?*QOS, |
| 1935 | 1934 | lpGQOS: ?*QOS, |
| 1936 | ) callconv(WINAPI) i32; | |
| 1935 | ) callconv(.winapi) i32; | |
| 1937 | 1936 | |
| 1938 | 1937 | pub extern "ws2_32" fn WSAConnectByNameW( |
| 1939 | 1938 | s: SOCKET, |
| ... | ... | @@ -1945,7 +1944,7 @@ pub extern "ws2_32" fn WSAConnectByNameW( |
| 1945 | 1944 | RemoteAddress: ?*sockaddr, |
| 1946 | 1945 | timeout: ?*const timeval, |
| 1947 | 1946 | Reserved: *OVERLAPPED, |
| 1948 | ) callconv(WINAPI) BOOL; | |
| 1947 | ) callconv(.winapi) BOOL; | |
| 1949 | 1948 | |
| 1950 | 1949 | pub extern "ws2_32" fn WSAConnectByNameA( |
| 1951 | 1950 | s: SOCKET, |
| ... | ... | @@ -1957,7 +1956,7 @@ pub extern "ws2_32" fn WSAConnectByNameA( |
| 1957 | 1956 | RemoteAddress: ?*sockaddr, |
| 1958 | 1957 | timeout: ?*const timeval, |
| 1959 | 1958 | Reserved: *OVERLAPPED, |
| 1960 | ) callconv(WINAPI) BOOL; | |
| 1959 | ) callconv(.winapi) BOOL; | |
| 1961 | 1960 | |
| 1962 | 1961 | pub extern "ws2_32" fn WSAConnectByList( |
| 1963 | 1962 | s: SOCKET, |
| ... | ... | @@ -1968,45 +1967,45 @@ pub extern "ws2_32" fn WSAConnectByList( |
| 1968 | 1967 | RemoteAddress: ?*sockaddr, |
| 1969 | 1968 | timeout: ?*const timeval, |
| 1970 | 1969 | Reserved: *OVERLAPPED, |
| 1971 | ) callconv(WINAPI) BOOL; | |
| 1970 | ) callconv(.winapi) BOOL; | |
| 1972 | 1971 | |
| 1973 | pub extern "ws2_32" fn WSACreateEvent() callconv(WINAPI) HANDLE; | |
| 1972 | pub extern "ws2_32" fn WSACreateEvent() callconv(.winapi) HANDLE; | |
| 1974 | 1973 | |
| 1975 | 1974 | pub extern "ws2_32" fn WSADuplicateSocketA( |
| 1976 | 1975 | s: SOCKET, |
| 1977 | 1976 | dwProcessId: u32, |
| 1978 | 1977 | lpProtocolInfo: *WSAPROTOCOL_INFOA, |
| 1979 | ) callconv(WINAPI) i32; | |
| 1978 | ) callconv(.winapi) i32; | |
| 1980 | 1979 | |
| 1981 | 1980 | pub extern "ws2_32" fn WSADuplicateSocketW( |
| 1982 | 1981 | s: SOCKET, |
| 1983 | 1982 | dwProcessId: u32, |
| 1984 | 1983 | lpProtocolInfo: *WSAPROTOCOL_INFOW, |
| 1985 | ) callconv(WINAPI) i32; | |
| 1984 | ) callconv(.winapi) i32; | |
| 1986 | 1985 | |
| 1987 | 1986 | pub extern "ws2_32" fn WSAEnumNetworkEvents( |
| 1988 | 1987 | s: SOCKET, |
| 1989 | 1988 | hEventObject: HANDLE, |
| 1990 | 1989 | lpNetworkEvents: *WSANETWORKEVENTS, |
| 1991 | ) callconv(WINAPI) i32; | |
| 1990 | ) callconv(.winapi) i32; | |
| 1992 | 1991 | |
| 1993 | 1992 | pub extern "ws2_32" fn WSAEnumProtocolsA( |
| 1994 | 1993 | lpiProtocols: ?*i32, |
| 1995 | 1994 | lpProtocolBuffer: ?*WSAPROTOCOL_INFOA, |
| 1996 | 1995 | lpdwBufferLength: *u32, |
| 1997 | ) callconv(WINAPI) i32; | |
| 1996 | ) callconv(.winapi) i32; | |
| 1998 | 1997 | |
| 1999 | 1998 | pub extern "ws2_32" fn WSAEnumProtocolsW( |
| 2000 | 1999 | lpiProtocols: ?*i32, |
| 2001 | 2000 | lpProtocolBuffer: ?*WSAPROTOCOL_INFOW, |
| 2002 | 2001 | lpdwBufferLength: *u32, |
| 2003 | ) callconv(WINAPI) i32; | |
| 2002 | ) callconv(.winapi) i32; | |
| 2004 | 2003 | |
| 2005 | 2004 | pub extern "ws2_32" fn WSAEventSelect( |
| 2006 | 2005 | s: SOCKET, |
| 2007 | 2006 | hEventObject: HANDLE, |
| 2008 | 2007 | lNetworkEvents: i32, |
| 2009 | ) callconv(WINAPI) i32; | |
| 2008 | ) callconv(.winapi) i32; | |
| 2010 | 2009 | |
| 2011 | 2010 | pub extern "ws2_32" fn WSAGetOverlappedResult( |
| 2012 | 2011 | s: SOCKET, |
| ... | ... | @@ -2014,25 +2013,25 @@ pub extern "ws2_32" fn WSAGetOverlappedResult( |
| 2014 | 2013 | lpcbTransfer: *u32, |
| 2015 | 2014 | fWait: BOOL, |
| 2016 | 2015 | lpdwFlags: *u32, |
| 2017 | ) callconv(WINAPI) BOOL; | |
| 2016 | ) callconv(.winapi) BOOL; | |
| 2018 | 2017 | |
| 2019 | 2018 | pub extern "ws2_32" fn WSAGetQOSByName( |
| 2020 | 2019 | s: SOCKET, |
| 2021 | 2020 | lpQOSName: *WSABUF, |
| 2022 | 2021 | lpQOS: *QOS, |
| 2023 | ) callconv(WINAPI) BOOL; | |
| 2022 | ) callconv(.winapi) BOOL; | |
| 2024 | 2023 | |
| 2025 | 2024 | pub extern "ws2_32" fn WSAHtonl( |
| 2026 | 2025 | s: SOCKET, |
| 2027 | 2026 | hostlong: u32, |
| 2028 | 2027 | lpnetlong: *u32, |
| 2029 | ) callconv(WINAPI) i32; | |
| 2028 | ) callconv(.winapi) i32; | |
| 2030 | 2029 | |
| 2031 | 2030 | pub extern "ws2_32" fn WSAHtons( |
| 2032 | 2031 | s: SOCKET, |
| 2033 | 2032 | hostshort: u16, |
| 2034 | 2033 | lpnetshort: *u16, |
| 2035 | ) callconv(WINAPI) i32; | |
| 2034 | ) callconv(.winapi) i32; | |
| 2036 | 2035 | |
| 2037 | 2036 | pub extern "ws2_32" fn WSAIoctl( |
| 2038 | 2037 | s: SOCKET, |
| ... | ... | @@ -2044,7 +2043,7 @@ pub extern "ws2_32" fn WSAIoctl( |
| 2044 | 2043 | lpcbBytesReturned: *u32, |
| 2045 | 2044 | lpOverlapped: ?*OVERLAPPED, |
| 2046 | 2045 | lpCompletionRoutine: ?LPWSAOVERLAPPED_COMPLETION_ROUTINE, |
| 2047 | ) callconv(WINAPI) i32; | |
| 2046 | ) callconv(.winapi) i32; | |
| 2048 | 2047 | |
| 2049 | 2048 | pub extern "ws2_32" fn WSAJoinLeaf( |
| 2050 | 2049 | s: SOCKET, |
| ... | ... | @@ -2055,19 +2054,19 @@ pub extern "ws2_32" fn WSAJoinLeaf( |
| 2055 | 2054 | lpSQOS: ?*QOS, |
| 2056 | 2055 | lpGQOS: ?*QOS, |
| 2057 | 2056 | dwFlags: u32, |
| 2058 | ) callconv(WINAPI) SOCKET; | |
| 2057 | ) callconv(.winapi) SOCKET; | |
| 2059 | 2058 | |
| 2060 | 2059 | pub extern "ws2_32" fn WSANtohl( |
| 2061 | 2060 | s: SOCKET, |
| 2062 | 2061 | netlong: u32, |
| 2063 | 2062 | lphostlong: *u32, |
| 2064 | ) callconv(WINAPI) u32; | |
| 2063 | ) callconv(.winapi) u32; | |
| 2065 | 2064 | |
| 2066 | 2065 | pub extern "ws2_32" fn WSANtohs( |
| 2067 | 2066 | s: SOCKET, |
| 2068 | 2067 | netshort: u16, |
| 2069 | 2068 | lphostshort: *u16, |
| 2070 | ) callconv(WINAPI) i32; | |
| 2069 | ) callconv(.winapi) i32; | |
| 2071 | 2070 | |
| 2072 | 2071 | pub extern "ws2_32" fn WSARecv( |
| 2073 | 2072 | s: SOCKET, |
| ... | ... | @@ -2077,12 +2076,12 @@ pub extern "ws2_32" fn WSARecv( |
| 2077 | 2076 | lpFlags: *u32, |
| 2078 | 2077 | lpOverlapped: ?*OVERLAPPED, |
| 2079 | 2078 | lpCompletionRoutine: ?LPWSAOVERLAPPED_COMPLETION_ROUTINE, |
| 2080 | ) callconv(WINAPI) i32; | |
| 2079 | ) callconv(.winapi) i32; | |
| 2081 | 2080 | |
| 2082 | 2081 | pub extern "ws2_32" fn WSARecvDisconnect( |
| 2083 | 2082 | s: SOCKET, |
| 2084 | 2083 | lpInboundDisconnectData: ?*WSABUF, |
| 2085 | ) callconv(WINAPI) i32; | |
| 2084 | ) callconv(.winapi) i32; | |
| 2086 | 2085 | |
| 2087 | 2086 | pub extern "ws2_32" fn WSARecvFrom( |
| 2088 | 2087 | s: SOCKET, |
| ... | ... | @@ -2094,9 +2093,9 @@ pub extern "ws2_32" fn WSARecvFrom( |
| 2094 | 2093 | lpFromlen: ?*i32, |
| 2095 | 2094 | lpOverlapped: ?*OVERLAPPED, |
| 2096 | 2095 | lpCompletionRoutine: ?LPWSAOVERLAPPED_COMPLETION_ROUTINE, |
| 2097 | ) callconv(WINAPI) i32; | |
| 2096 | ) callconv(.winapi) i32; | |
| 2098 | 2097 | |
| 2099 | pub extern "ws2_32" fn WSAResetEvent(hEvent: HANDLE) callconv(WINAPI) i32; | |
| 2098 | pub extern "ws2_32" fn WSAResetEvent(hEvent: HANDLE) callconv(.winapi) i32; | |
| 2100 | 2099 | |
| 2101 | 2100 | pub extern "ws2_32" fn WSASend( |
| 2102 | 2101 | s: SOCKET, |
| ... | ... | @@ -2106,7 +2105,7 @@ pub extern "ws2_32" fn WSASend( |
| 2106 | 2105 | dwFlags: u32, |
| 2107 | 2106 | lpOverlapped: ?*OVERLAPPED, |
| 2108 | 2107 | lpCompletionRoutine: ?LPWSAOVERLAPPED_COMPLETION_ROUTINE, |
| 2109 | ) callconv(WINAPI) i32; | |
| 2108 | ) callconv(.winapi) i32; | |
| 2110 | 2109 | |
| 2111 | 2110 | pub extern "ws2_32" fn WSASendMsg( |
| 2112 | 2111 | s: SOCKET, |
| ... | ... | @@ -2115,7 +2114,7 @@ pub extern "ws2_32" fn WSASendMsg( |
| 2115 | 2114 | lpNumberOfBytesSent: ?*u32, |
| 2116 | 2115 | lpOverlapped: ?*OVERLAPPED, |
| 2117 | 2116 | lpCompletionRoutine: ?LPWSAOVERLAPPED_COMPLETION_ROUTINE, |
| 2118 | ) callconv(WINAPI) i32; | |
| 2117 | ) callconv(.winapi) i32; | |
| 2119 | 2118 | |
| 2120 | 2119 | pub extern "ws2_32" fn WSARecvMsg( |
| 2121 | 2120 | s: SOCKET, |
| ... | ... | @@ -2123,12 +2122,12 @@ pub extern "ws2_32" fn WSARecvMsg( |
| 2123 | 2122 | lpdwNumberOfBytesRecv: ?*u32, |
| 2124 | 2123 | lpOverlapped: ?*OVERLAPPED, |
| 2125 | 2124 | lpCompletionRoutine: ?LPWSAOVERLAPPED_COMPLETION_ROUTINE, |
| 2126 | ) callconv(WINAPI) i32; | |
| 2125 | ) callconv(.winapi) i32; | |
| 2127 | 2126 | |
| 2128 | 2127 | pub extern "ws2_32" fn WSASendDisconnect( |
| 2129 | 2128 | s: SOCKET, |
| 2130 | 2129 | lpOutboundDisconnectData: ?*WSABUF, |
| 2131 | ) callconv(WINAPI) i32; | |
| 2130 | ) callconv(.winapi) i32; | |
| 2132 | 2131 | |
| 2133 | 2132 | pub extern "ws2_32" fn WSASendTo( |
| 2134 | 2133 | s: SOCKET, |
| ... | ... | @@ -2140,11 +2139,11 @@ pub extern "ws2_32" fn WSASendTo( |
| 2140 | 2139 | iToLen: i32, |
| 2141 | 2140 | lpOverlapped: ?*OVERLAPPED, |
| 2142 | 2141 | lpCompletionRounte: ?LPWSAOVERLAPPED_COMPLETION_ROUTINE, |
| 2143 | ) callconv(WINAPI) i32; | |
| 2142 | ) callconv(.winapi) i32; | |
| 2144 | 2143 | |
| 2145 | 2144 | pub extern "ws2_32" fn WSASetEvent( |
| 2146 | 2145 | hEvent: HANDLE, |
| 2147 | ) callconv(WINAPI) BOOL; | |
| 2146 | ) callconv(.winapi) BOOL; | |
| 2148 | 2147 | |
| 2149 | 2148 | pub extern "ws2_32" fn WSASocketA( |
| 2150 | 2149 | af: i32, |
| ... | ... | @@ -2153,7 +2152,7 @@ pub extern "ws2_32" fn WSASocketA( |
| 2153 | 2152 | lpProtocolInfo: ?*WSAPROTOCOL_INFOA, |
| 2154 | 2153 | g: u32, |
| 2155 | 2154 | dwFlags: u32, |
| 2156 | ) callconv(WINAPI) SOCKET; | |
| 2155 | ) callconv(.winapi) SOCKET; | |
| 2157 | 2156 | |
| 2158 | 2157 | pub extern "ws2_32" fn WSASocketW( |
| 2159 | 2158 | af: i32, |
| ... | ... | @@ -2162,7 +2161,7 @@ pub extern "ws2_32" fn WSASocketW( |
| 2162 | 2161 | lpProtocolInfo: ?*WSAPROTOCOL_INFOW, |
| 2163 | 2162 | g: u32, |
| 2164 | 2163 | dwFlags: u32, |
| 2165 | ) callconv(WINAPI) SOCKET; | |
| 2164 | ) callconv(.winapi) SOCKET; | |
| 2166 | 2165 | |
| 2167 | 2166 | pub extern "ws2_32" fn WSAWaitForMultipleEvents( |
| 2168 | 2167 | cEvents: u32, |
| ... | ... | @@ -2170,7 +2169,7 @@ pub extern "ws2_32" fn WSAWaitForMultipleEvents( |
| 2170 | 2169 | fWaitAll: BOOL, |
| 2171 | 2170 | dwTimeout: u32, |
| 2172 | 2171 | fAlertable: BOOL, |
| 2173 | ) callconv(WINAPI) u32; | |
| 2172 | ) callconv(.winapi) u32; | |
| 2174 | 2173 | |
| 2175 | 2174 | pub extern "ws2_32" fn WSAAddressToStringA( |
| 2176 | 2175 | lpsaAddress: *sockaddr, |
| ... | ... | @@ -2178,7 +2177,7 @@ pub extern "ws2_32" fn WSAAddressToStringA( |
| 2178 | 2177 | lpProtocolInfo: ?*WSAPROTOCOL_INFOA, |
| 2179 | 2178 | lpszAddressString: [*]u8, |
| 2180 | 2179 | lpdwAddressStringLength: *u32, |
| 2181 | ) callconv(WINAPI) i32; | |
| 2180 | ) callconv(.winapi) i32; | |
| 2182 | 2181 | |
| 2183 | 2182 | pub extern "ws2_32" fn WSAAddressToStringW( |
| 2184 | 2183 | lpsaAddress: *sockaddr, |
| ... | ... | @@ -2186,7 +2185,7 @@ pub extern "ws2_32" fn WSAAddressToStringW( |
| 2186 | 2185 | lpProtocolInfo: ?*WSAPROTOCOL_INFOW, |
| 2187 | 2186 | lpszAddressString: [*]u16, |
| 2188 | 2187 | lpdwAddressStringLength: *u32, |
| 2189 | ) callconv(WINAPI) i32; | |
| 2188 | ) callconv(.winapi) i32; | |
| 2190 | 2189 | |
| 2191 | 2190 | pub extern "ws2_32" fn WSAStringToAddressA( |
| 2192 | 2191 | AddressString: [*:0]const u8, |
| ... | ... | @@ -2194,7 +2193,7 @@ pub extern "ws2_32" fn WSAStringToAddressA( |
| 2194 | 2193 | lpProtocolInfo: ?*WSAPROTOCOL_INFOA, |
| 2195 | 2194 | lpAddress: *sockaddr, |
| 2196 | 2195 | lpAddressLength: *i32, |
| 2197 | ) callconv(WINAPI) i32; | |
| 2196 | ) callconv(.winapi) i32; | |
| 2198 | 2197 | |
| 2199 | 2198 | pub extern "ws2_32" fn WSAStringToAddressW( |
| 2200 | 2199 | AddressString: [*:0]const u16, |
| ... | ... | @@ -2202,26 +2201,26 @@ pub extern "ws2_32" fn WSAStringToAddressW( |
| 2202 | 2201 | lpProtocolInfo: ?*WSAPROTOCOL_INFOW, |
| 2203 | 2202 | lpAddrses: *sockaddr, |
| 2204 | 2203 | lpAddressLength: *i32, |
| 2205 | ) callconv(WINAPI) i32; | |
| 2204 | ) callconv(.winapi) i32; | |
| 2206 | 2205 | |
| 2207 | 2206 | pub extern "ws2_32" fn WSAProviderConfigChange( |
| 2208 | 2207 | lpNotificationHandle: *HANDLE, |
| 2209 | 2208 | lpOverlapped: ?*OVERLAPPED, |
| 2210 | 2209 | lpCompletionRoutine: ?LPWSAOVERLAPPED_COMPLETION_ROUTINE, |
| 2211 | ) callconv(WINAPI) i32; | |
| 2210 | ) callconv(.winapi) i32; | |
| 2212 | 2211 | |
| 2213 | 2212 | pub extern "ws2_32" fn WSAPoll( |
| 2214 | 2213 | fdArray: [*]WSAPOLLFD, |
| 2215 | 2214 | fds: u32, |
| 2216 | 2215 | timeout: i32, |
| 2217 | ) callconv(WINAPI) i32; | |
| 2216 | ) callconv(.winapi) i32; | |
| 2218 | 2217 | |
| 2219 | 2218 | pub extern "mswsock" fn WSARecvEx( |
| 2220 | 2219 | s: SOCKET, |
| 2221 | 2220 | buf: [*]u8, |
| 2222 | 2221 | len: i32, |
| 2223 | 2222 | flags: *i32, |
| 2224 | ) callconv(WINAPI) i32; | |
| 2223 | ) callconv(.winapi) i32; | |
| 2225 | 2224 | |
| 2226 | 2225 | pub extern "mswsock" fn TransmitFile( |
| 2227 | 2226 | hSocket: SOCKET, |
| ... | ... | @@ -2231,7 +2230,7 @@ pub extern "mswsock" fn TransmitFile( |
| 2231 | 2230 | lpOverlapped: ?*OVERLAPPED, |
| 2232 | 2231 | lpTransmitBuffers: ?*TRANSMIT_FILE_BUFFERS, |
| 2233 | 2232 | dwReserved: u32, |
| 2234 | ) callconv(WINAPI) BOOL; | |
| 2233 | ) callconv(.winapi) BOOL; | |
| 2235 | 2234 | |
| 2236 | 2235 | pub extern "mswsock" fn AcceptEx( |
| 2237 | 2236 | sListenSocket: SOCKET, |
| ... | ... | @@ -2242,7 +2241,7 @@ pub extern "mswsock" fn AcceptEx( |
| 2242 | 2241 | dwRemoteAddressLength: u32, |
| 2243 | 2242 | lpdwBytesReceived: *u32, |
| 2244 | 2243 | lpOverlapped: *OVERLAPPED, |
| 2245 | ) callconv(WINAPI) BOOL; | |
| 2244 | ) callconv(.winapi) BOOL; | |
| 2246 | 2245 | |
| 2247 | 2246 | pub extern "mswsock" fn GetAcceptExSockaddrs( |
| 2248 | 2247 | lpOutputBuffer: *anyopaque, |
| ... | ... | @@ -2253,24 +2252,24 @@ pub extern "mswsock" fn GetAcceptExSockaddrs( |
| 2253 | 2252 | LocalSockaddrLength: *i32, |
| 2254 | 2253 | RemoteSockaddr: **sockaddr, |
| 2255 | 2254 | RemoteSockaddrLength: *i32, |
| 2256 | ) callconv(WINAPI) void; | |
| 2255 | ) callconv(.winapi) void; | |
| 2257 | 2256 | |
| 2258 | 2257 | pub extern "ws2_32" fn WSAProviderCompleteAsyncCall( |
| 2259 | 2258 | hAsyncCall: HANDLE, |
| 2260 | 2259 | iRetCode: i32, |
| 2261 | ) callconv(WINAPI) i32; | |
| 2260 | ) callconv(.winapi) i32; | |
| 2262 | 2261 | |
| 2263 | 2262 | pub extern "mswsock" fn EnumProtocolsA( |
| 2264 | 2263 | lpiProtocols: ?*i32, |
| 2265 | 2264 | lpProtocolBuffer: *anyopaque, |
| 2266 | 2265 | lpdwBufferLength: *u32, |
| 2267 | ) callconv(WINAPI) i32; | |
| 2266 | ) callconv(.winapi) i32; | |
| 2268 | 2267 | |
| 2269 | 2268 | pub extern "mswsock" fn EnumProtocolsW( |
| 2270 | 2269 | lpiProtocols: ?*i32, |
| 2271 | 2270 | lpProtocolBuffer: *anyopaque, |
| 2272 | 2271 | lpdwBufferLength: *u32, |
| 2273 | ) callconv(WINAPI) i32; | |
| 2272 | ) callconv(.winapi) i32; | |
| 2274 | 2273 | |
| 2275 | 2274 | pub extern "mswsock" fn GetAddressByNameA( |
| 2276 | 2275 | dwNameSpace: u32, |
| ... | ... | @@ -2282,7 +2281,7 @@ pub extern "mswsock" fn GetAddressByNameA( |
| 2282 | 2281 | lpCsaddrBuffer: *anyopaque, |
| 2283 | 2282 | lpAliasBuffer: ?[*:0]const u8, |
| 2284 | 2283 | lpdwAliasBufferLength: *u32, |
| 2285 | ) callconv(WINAPI) i32; | |
| 2284 | ) callconv(.winapi) i32; | |
| 2286 | 2285 | |
| 2287 | 2286 | pub extern "mswsock" fn GetAddressByNameW( |
| 2288 | 2287 | dwNameSpace: u32, |
| ... | ... | @@ -2295,36 +2294,36 @@ pub extern "mswsock" fn GetAddressByNameW( |
| 2295 | 2294 | ldwBufferLEngth: *u32, |
| 2296 | 2295 | lpAliasBuffer: ?[*:0]u16, |
| 2297 | 2296 | lpdwAliasBufferLength: *u32, |
| 2298 | ) callconv(WINAPI) i32; | |
| 2297 | ) callconv(.winapi) i32; | |
| 2299 | 2298 | |
| 2300 | 2299 | pub extern "mswsock" fn GetTypeByNameA( |
| 2301 | 2300 | lpServiceName: [*:0]u8, |
| 2302 | 2301 | lpServiceType: *GUID, |
| 2303 | ) callconv(WINAPI) i32; | |
| 2302 | ) callconv(.winapi) i32; | |
| 2304 | 2303 | |
| 2305 | 2304 | pub extern "mswsock" fn GetTypeByNameW( |
| 2306 | 2305 | lpServiceName: [*:0]u16, |
| 2307 | 2306 | lpServiceType: *GUID, |
| 2308 | ) callconv(WINAPI) i32; | |
| 2307 | ) callconv(.winapi) i32; | |
| 2309 | 2308 | |
| 2310 | 2309 | pub extern "mswsock" fn GetNameByTypeA( |
| 2311 | 2310 | lpServiceType: *GUID, |
| 2312 | 2311 | lpServiceName: [*:0]u8, |
| 2313 | 2312 | dwNameLength: u32, |
| 2314 | ) callconv(WINAPI) i32; | |
| 2313 | ) callconv(.winapi) i32; | |
| 2315 | 2314 | |
| 2316 | 2315 | pub extern "mswsock" fn GetNameByTypeW( |
| 2317 | 2316 | lpServiceType: *GUID, |
| 2318 | 2317 | lpServiceName: [*:0]u16, |
| 2319 | 2318 | dwNameLength: u32, |
| 2320 | ) callconv(WINAPI) i32; | |
| 2319 | ) callconv(.winapi) i32; | |
| 2321 | 2320 | |
| 2322 | 2321 | pub extern "ws2_32" fn getaddrinfo( |
| 2323 | 2322 | pNodeName: ?[*:0]const u8, |
| 2324 | 2323 | pServiceName: ?[*:0]const u8, |
| 2325 | 2324 | pHints: ?*const addrinfoa, |
| 2326 | 2325 | ppResult: *?*addrinfoa, |
| 2327 | ) callconv(WINAPI) i32; | |
| 2326 | ) callconv(.winapi) i32; | |
| 2328 | 2327 | |
| 2329 | 2328 | pub extern "ws2_32" fn GetAddrInfoExA( |
| 2330 | 2329 | pName: ?[*:0]const u8, |
| ... | ... | @@ -2336,23 +2335,23 @@ pub extern "ws2_32" fn GetAddrInfoExA( |
| 2336 | 2335 | timeout: ?*timeval, |
| 2337 | 2336 | lpOverlapped: ?*OVERLAPPED, |
| 2338 | 2337 | lpCompletionRoutine: ?LPLOOKUPSERVICE_COMPLETION_ROUTINE, |
| 2339 | ) callconv(WINAPI) i32; | |
| 2338 | ) callconv(.winapi) i32; | |
| 2340 | 2339 | |
| 2341 | 2340 | pub extern "ws2_32" fn GetAddrInfoExCancel( |
| 2342 | 2341 | lpHandle: *HANDLE, |
| 2343 | ) callconv(WINAPI) i32; | |
| 2342 | ) callconv(.winapi) i32; | |
| 2344 | 2343 | |
| 2345 | 2344 | pub extern "ws2_32" fn GetAddrInfoExOverlappedResult( |
| 2346 | 2345 | lpOverlapped: *OVERLAPPED, |
| 2347 | ) callconv(WINAPI) i32; | |
| 2346 | ) callconv(.winapi) i32; | |
| 2348 | 2347 | |
| 2349 | 2348 | pub extern "ws2_32" fn freeaddrinfo( |
| 2350 | 2349 | pAddrInfo: ?*addrinfoa, |
| 2351 | ) callconv(WINAPI) void; | |
| 2350 | ) callconv(.winapi) void; | |
| 2352 | 2351 | |
| 2353 | 2352 | pub extern "ws2_32" fn FreeAddrInfoEx( |
| 2354 | 2353 | pAddrInfoEx: ?*addrinfoexA, |
| 2355 | ) callconv(WINAPI) void; | |
| 2354 | ) callconv(.winapi) void; | |
| 2356 | 2355 | |
| 2357 | 2356 | pub extern "ws2_32" fn getnameinfo( |
| 2358 | 2357 | pSockaddr: *const sockaddr, |
| ... | ... | @@ -2362,8 +2361,8 @@ pub extern "ws2_32" fn getnameinfo( |
| 2362 | 2361 | pServiceBuffer: ?[*]u8, |
| 2363 | 2362 | ServiceBufferName: u32, |
| 2364 | 2363 | Flags: i32, |
| 2365 | ) callconv(WINAPI) i32; | |
| 2364 | ) callconv(.winapi) i32; | |
| 2366 | 2365 | |
| 2367 | 2366 | pub extern "iphlpapi" fn if_nametoindex( |
| 2368 | 2367 | InterfaceName: [*:0]const u8, |
| 2369 | ) callconv(WINAPI) u32; | |
| 2368 | ) callconv(.winapi) u32; |
lib/std/start.zig+17-17| ... | ... | @@ -29,7 +29,7 @@ comptime { |
| 29 | 29 | if (simplified_logic) { |
| 30 | 30 | if (builtin.output_mode == .Exe) { |
| 31 | 31 | if ((builtin.link_libc or builtin.object_format == .c) and @hasDecl(root, "main")) { |
| 32 | if (@typeInfo(@TypeOf(root.main)).@"fn".calling_convention != .C) { | |
| 32 | if (!@typeInfo(@TypeOf(root.main)).@"fn".calling_convention.eql(.c)) { | |
| 33 | 33 | @export(&main2, .{ .name = "main" }); |
| 34 | 34 | } |
| 35 | 35 | } else if (builtin.os.tag == .windows) { |
| ... | ... | @@ -96,7 +96,7 @@ comptime { |
| 96 | 96 | |
| 97 | 97 | // Simplified start code for stage2 until it supports more language features /// |
| 98 | 98 | |
| 99 | fn main2() callconv(.C) c_int { | |
| 99 | fn main2() callconv(.c) c_int { | |
| 100 | 100 | root.main(); |
| 101 | 101 | return 0; |
| 102 | 102 | } |
| ... | ... | @@ -110,11 +110,11 @@ fn callMain2() noreturn { |
| 110 | 110 | exit2(0); |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | fn spirvMain2() callconv(.Kernel) void { | |
| 113 | fn spirvMain2() callconv(.kernel) void { | |
| 114 | 114 | root.main(); |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | fn wWinMainCRTStartup2() callconv(.C) noreturn { | |
| 117 | fn wWinMainCRTStartup2() callconv(.c) noreturn { | |
| 118 | 118 | root.main(); |
| 119 | 119 | exit2(0); |
| 120 | 120 | } |
| ... | ... | @@ -172,7 +172,7 @@ fn _DllMainCRTStartup( |
| 172 | 172 | hinstDLL: std.os.windows.HINSTANCE, |
| 173 | 173 | fdwReason: std.os.windows.DWORD, |
| 174 | 174 | lpReserved: std.os.windows.LPVOID, |
| 175 | ) callconv(std.os.windows.WINAPI) std.os.windows.BOOL { | |
| 175 | ) callconv(.winapi) std.os.windows.BOOL { | |
| 176 | 176 | if (!builtin.single_threaded and !builtin.link_libc) { |
| 177 | 177 | _ = @import("os/windows/tls.zig"); |
| 178 | 178 | } |
| ... | ... | @@ -184,13 +184,13 @@ fn _DllMainCRTStartup( |
| 184 | 184 | return std.os.windows.TRUE; |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | fn wasm_freestanding_start() callconv(.C) void { | |
| 187 | fn wasm_freestanding_start() callconv(.c) void { | |
| 188 | 188 | // This is marked inline because for some reason LLVM in |
| 189 | 189 | // release mode fails to inline it, and we want fewer call frames in stack traces. |
| 190 | 190 | _ = @call(.always_inline, callMain, .{}); |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | fn wasi_start() callconv(.C) void { | |
| 193 | fn wasi_start() callconv(.c) void { | |
| 194 | 194 | // The function call is marked inline because for some reason LLVM in |
| 195 | 195 | // release mode fails to inline it, and we want fewer call frames in stack traces. |
| 196 | 196 | switch (builtin.wasi_exec_model) { |
| ... | ... | @@ -199,7 +199,7 @@ fn wasi_start() callconv(.C) void { |
| 199 | 199 | } |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | fn EfiMain(handle: uefi.Handle, system_table: *uefi.tables.SystemTable) callconv(.C) usize { | |
| 202 | fn EfiMain(handle: uefi.Handle, system_table: *uefi.tables.SystemTable) callconv(.c) usize { | |
| 203 | 203 | uefi.handle = handle; |
| 204 | 204 | uefi.system_table = system_table; |
| 205 | 205 | |
| ... | ... | @@ -221,7 +221,7 @@ fn EfiMain(handle: uefi.Handle, system_table: *uefi.tables.SystemTable) callconv |
| 221 | 221 | } |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | fn _start() callconv(.Naked) noreturn { | |
| 224 | fn _start() callconv(.naked) noreturn { | |
| 225 | 225 | // TODO set Top of Stack on non x86_64-plan9 |
| 226 | 226 | if (native_os == .plan9 and native_arch == .x86_64) { |
| 227 | 227 | // from /sys/src/libc/amd64/main9.s |
| ... | ... | @@ -426,7 +426,7 @@ fn _start() callconv(.Naked) noreturn { |
| 426 | 426 | ); |
| 427 | 427 | } |
| 428 | 428 | |
| 429 | fn WinStartup() callconv(.withStackAlign(.winapi, 1)) noreturn { | |
| 429 | fn WinStartup() callconv(.withStackAlign(.c, 1)) noreturn { | |
| 430 | 430 | if (!builtin.single_threaded and !builtin.link_libc) { |
| 431 | 431 | _ = @import("os/windows/tls.zig"); |
| 432 | 432 | } |
| ... | ... | @@ -436,7 +436,7 @@ fn WinStartup() callconv(.withStackAlign(.winapi, 1)) noreturn { |
| 436 | 436 | std.os.windows.ntdll.RtlExitUserProcess(callMain()); |
| 437 | 437 | } |
| 438 | 438 | |
| 439 | fn wWinMainCRTStartup() callconv(.withStackAlign(.winapi, 1)) noreturn { | |
| 439 | fn wWinMainCRTStartup() callconv(.withStackAlign(.c, 1)) noreturn { | |
| 440 | 440 | if (!builtin.single_threaded and !builtin.link_libc) { |
| 441 | 441 | _ = @import("os/windows/tls.zig"); |
| 442 | 442 | } |
| ... | ... | @@ -447,7 +447,7 @@ fn wWinMainCRTStartup() callconv(.withStackAlign(.winapi, 1)) noreturn { |
| 447 | 447 | std.os.windows.ntdll.RtlExitUserProcess(@as(std.os.windows.UINT, @bitCast(result))); |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | fn posixCallMainAndExit(argc_argv_ptr: [*]usize) callconv(.C) noreturn { | |
| 450 | fn posixCallMainAndExit(argc_argv_ptr: [*]usize) callconv(.c) noreturn { | |
| 451 | 451 | // We're not ready to panic until thread local storage is initialized. |
| 452 | 452 | @setRuntimeSafety(false); |
| 453 | 453 | // Code coverage instrumentation might try to use thread local variables. |
| ... | ... | @@ -514,11 +514,11 @@ fn posixCallMainAndExit(argc_argv_ptr: [*]usize) callconv(.C) noreturn { |
| 514 | 514 | // to ask for more stack space. |
| 515 | 515 | expandStackSize(phdrs); |
| 516 | 516 | |
| 517 | const opt_init_array_start = @extern([*]*const fn () callconv(.C) void, .{ | |
| 517 | const opt_init_array_start = @extern([*]*const fn () callconv(.c) void, .{ | |
| 518 | 518 | .name = "__init_array_start", |
| 519 | 519 | .linkage = .weak, |
| 520 | 520 | }); |
| 521 | const opt_init_array_end = @extern([*]*const fn () callconv(.C) void, .{ | |
| 521 | const opt_init_array_end = @extern([*]*const fn () callconv(.c) void, .{ | |
| 522 | 522 | .name = "__init_array_end", |
| 523 | 523 | .linkage = .weak, |
| 524 | 524 | }); |
| ... | ... | @@ -577,7 +577,7 @@ inline fn callMainWithArgs(argc: usize, argv: [*][*:0]u8, envp: [][*:0]u8) u8 { |
| 577 | 577 | return callMain(); |
| 578 | 578 | } |
| 579 | 579 | |
| 580 | fn main(c_argc: c_int, c_argv: [*][*:0]c_char, c_envp: [*:null]?[*:0]c_char) callconv(.C) c_int { | |
| 580 | fn main(c_argc: c_int, c_argv: [*][*:0]c_char, c_envp: [*:null]?[*:0]c_char) callconv(.c) c_int { | |
| 581 | 581 | var env_count: usize = 0; |
| 582 | 582 | while (c_envp[env_count] != null) : (env_count += 1) {} |
| 583 | 583 | const envp = @as([*][*:0]u8, @ptrCast(c_envp))[0..env_count]; |
| ... | ... | @@ -592,7 +592,7 @@ fn main(c_argc: c_int, c_argv: [*][*:0]c_char, c_envp: [*:null]?[*:0]c_char) cal |
| 592 | 592 | return callMainWithArgs(@as(usize, @intCast(c_argc)), @as([*][*:0]u8, @ptrCast(c_argv)), envp); |
| 593 | 593 | } |
| 594 | 594 | |
| 595 | fn mainWithoutEnv(c_argc: c_int, c_argv: [*][*:0]c_char) callconv(.C) c_int { | |
| 595 | fn mainWithoutEnv(c_argc: c_int, c_argv: [*][*:0]c_char) callconv(.c) c_int { | |
| 596 | 596 | std.os.argv = @as([*][*:0]u8, @ptrCast(c_argv))[0..@as(usize, @intCast(c_argc))]; |
| 597 | 597 | return callMain(); |
| 598 | 598 | } |
| ... | ... | @@ -702,4 +702,4 @@ fn maybeIgnoreSigpipe() void { |
| 702 | 702 | } |
| 703 | 703 | } |
| 704 | 704 | |
| 705 | fn noopSigHandler(_: i32) callconv(.C) void {} | |
| 705 | fn noopSigHandler(_: i32) callconv(.c) void {} |
src/Sema.zig+30-3| ... | ... | @@ -7574,13 +7574,13 @@ fn analyzeCall( |
| 7574 | 7574 | if (try sema.resolveValue(func)) |func_val| |
| 7575 | 7575 | if (func_val.isUndef(zcu)) |
| 7576 | 7576 | return sema.failWithUseOfUndef(block, call_src); |
| 7577 | if (cc == .naked) { | |
| 7577 | if (!callConvIsCallable(cc)) { | |
| 7578 | 7578 | const maybe_func_inst = try sema.funcDeclSrcInst(func); |
| 7579 | 7579 | const msg = msg: { |
| 7580 | 7580 | const msg = try sema.errMsg( |
| 7581 | 7581 | func_src, |
| 7582 | "unable to call function with naked calling convention", | |
| 7583 | .{}, | |
| 7582 | "unable to call function with calling convention '{s}'", | |
| 7583 | .{@tagName(cc)}, | |
| 7584 | 7584 | ); |
| 7585 | 7585 | errdefer msg.destroy(sema.gpa); |
| 7586 | 7586 | |
| ... | ... | @@ -9764,6 +9764,33 @@ fn checkCallConvSupportsVarArgs(sema: *Sema, block: *Block, src: LazySrcLoc, cc: |
| 9764 | 9764 | } |
| 9765 | 9765 | } |
| 9766 | 9766 | |
| 9767 | fn callConvIsCallable(cc: std.builtin.CallingConvention.Tag) bool { | |
| 9768 | return switch (cc) { | |
| 9769 | .naked, | |
| 9770 | ||
| 9771 | .arm_interrupt, | |
| 9772 | .avr_interrupt, | |
| 9773 | .avr_signal, | |
| 9774 | .csky_interrupt, | |
| 9775 | .m68k_interrupt, | |
| 9776 | .mips_interrupt, | |
| 9777 | .mips64_interrupt, | |
| 9778 | .riscv32_interrupt, | |
| 9779 | .riscv64_interrupt, | |
| 9780 | .x86_interrupt, | |
| 9781 | .x86_64_interrupt, | |
| 9782 | ||
| 9783 | .amdgcn_kernel, | |
| 9784 | .nvptx_kernel, | |
| 9785 | .spirv_kernel, | |
| 9786 | .spirv_fragment, | |
| 9787 | .spirv_vertex, | |
| 9788 | => false, | |
| 9789 | ||
| 9790 | else => true, | |
| 9791 | }; | |
| 9792 | } | |
| 9793 | ||
| 9767 | 9794 | fn checkMergeAllowed(sema: *Sema, block: *Block, src: LazySrcLoc, peer_ty: Type) !void { |
| 9768 | 9795 | const pt = sema.pt; |
| 9769 | 9796 | const zcu = pt.zcu; |
src/Zcu.zig+24-1| ... | ... | @@ -3607,18 +3607,37 @@ pub fn callconvSupported(zcu: *Zcu, cc: std.builtin.CallingConvention) union(enu |
| 3607 | 3607 | .x86_64_vectorcall, |
| 3608 | 3608 | .x86_64_regcall_v3_sysv, |
| 3609 | 3609 | .x86_64_regcall_v4_win, |
| 3610 | .x86_64_interrupt, | |
| 3610 | 3611 | .x86_fastcall, |
| 3611 | 3612 | .x86_thiscall, |
| 3612 | 3613 | .x86_vectorcall, |
| 3613 | 3614 | .x86_regcall_v3, |
| 3614 | 3615 | .x86_regcall_v4_win, |
| 3616 | .x86_interrupt, | |
| 3615 | 3617 | .aarch64_vfabi, |
| 3616 | 3618 | .aarch64_vfabi_sve, |
| 3617 | 3619 | .arm_aapcs, |
| 3618 | .arm_aapcs_vfp, | |
| 3620 | .csky_interrupt, | |
| 3619 | 3621 | .riscv64_lp64_v, |
| 3620 | 3622 | .riscv32_ilp32_v, |
| 3621 | 3623 | .m68k_rtd, |
| 3624 | .m68k_interrupt, | |
| 3625 | => |opts| opts.incoming_stack_alignment == null, | |
| 3626 | ||
| 3627 | .arm_aapcs_vfp, | |
| 3628 | => |opts| opts.incoming_stack_alignment == null and target.os.tag != .watchos, | |
| 3629 | .arm_aapcs16_vfp, | |
| 3630 | => |opts| opts.incoming_stack_alignment == null and target.os.tag == .watchos, | |
| 3631 | ||
| 3632 | .arm_interrupt, | |
| 3633 | => |opts| opts.incoming_stack_alignment == null, | |
| 3634 | ||
| 3635 | .mips_interrupt, | |
| 3636 | .mips64_interrupt, | |
| 3637 | => |opts| opts.incoming_stack_alignment == null, | |
| 3638 | ||
| 3639 | .riscv32_interrupt, | |
| 3640 | .riscv64_interrupt, | |
| 3622 | 3641 | => |opts| opts.incoming_stack_alignment == null, |
| 3623 | 3642 | |
| 3624 | 3643 | .x86_sysv, |
| ... | ... | @@ -3626,6 +3645,10 @@ pub fn callconvSupported(zcu: *Zcu, cc: std.builtin.CallingConvention) union(enu |
| 3626 | 3645 | .x86_stdcall, |
| 3627 | 3646 | => |opts| opts.incoming_stack_alignment == null and opts.register_params == 0, |
| 3628 | 3647 | |
| 3648 | .avr_interrupt, | |
| 3649 | .avr_signal, | |
| 3650 | => true, | |
| 3651 | ||
| 3629 | 3652 | .naked => true, |
| 3630 | 3653 | |
| 3631 | 3654 | else => false, |
src/codegen/c.zig+34-1| ... | ... | @@ -7622,11 +7622,44 @@ fn toCallingConvention(cc: std.builtin.CallingConvention, zcu: *Zcu) ?[]const u8 |
| 7622 | 7622 | |
| 7623 | 7623 | .aarch64_vfabi => "aarch64_vector_pcs", |
| 7624 | 7624 | .aarch64_vfabi_sve => "aarch64_sve_pcs", |
| 7625 | ||
| 7625 | 7626 | .arm_aapcs => "pcs(\"aapcs\")", |
| 7626 | .arm_aapcs_vfp => "pcs(\"aapcs-vfp\")", | |
| 7627 | .arm_aapcs_vfp, .arm_aapcs16_vfp => "pcs(\"aapcs-vfp\")", | |
| 7628 | ||
| 7629 | .arm_interrupt => |opts| switch (opts.type) { | |
| 7630 | .generic => "interrupt", | |
| 7631 | .irq => "interrupt(\"IRQ\")", | |
| 7632 | .fiq => "interrupt(\"FIQ\")", | |
| 7633 | .swi => "interrupt(\"SWI\")", | |
| 7634 | .abort => "interrupt(\"ABORT\")", | |
| 7635 | .undef => "interrupt(\"UNDEF\")", | |
| 7636 | }, | |
| 7637 | ||
| 7638 | .avr_signal => "signal", | |
| 7639 | ||
| 7640 | .mips_interrupt, | |
| 7641 | .mips64_interrupt, | |
| 7642 | => |opts| switch (opts.mode) { | |
| 7643 | inline else => |m| "interrupt(\"" ++ @tagName(m) ++ "\")", | |
| 7644 | }, | |
| 7645 | ||
| 7627 | 7646 | .riscv64_lp64_v, .riscv32_ilp32_v => "riscv_vector_cc", |
| 7647 | ||
| 7648 | .riscv32_interrupt, | |
| 7649 | .riscv64_interrupt, | |
| 7650 | => |opts| switch (opts.mode) { | |
| 7651 | inline else => |m| "interrupt(\"" ++ @tagName(m) ++ "\")", | |
| 7652 | }, | |
| 7653 | ||
| 7628 | 7654 | .m68k_rtd => "m68k_rtd", |
| 7629 | 7655 | |
| 7656 | .avr_interrupt, | |
| 7657 | .csky_interrupt, | |
| 7658 | .m68k_interrupt, | |
| 7659 | .x86_interrupt, | |
| 7660 | .x86_64_interrupt, | |
| 7661 | => "interrupt", | |
| 7662 | ||
| 7630 | 7663 | else => unreachable, // `Zcu.callconvSupported` |
| 7631 | 7664 | }; |
| 7632 | 7665 | } |
src/codegen/llvm.zig+11-5| ... | ... | @@ -11749,7 +11749,14 @@ fn toLlvmCallConvTag(cc_tag: std.builtin.CallingConvention.Tag, target: std.Targ |
| 11749 | 11749 | .aarch64_vfabi_sve => .aarch64_sve_vector_pcs, |
| 11750 | 11750 | .arm_apcs => .arm_apcscc, |
| 11751 | 11751 | .arm_aapcs => .arm_aapcscc, |
| 11752 | .arm_aapcs_vfp => .arm_aapcs_vfpcc, | |
| 11752 | .arm_aapcs_vfp => if (target.os.tag != .watchos) | |
| 11753 | .arm_aapcs_vfpcc | |
| 11754 | else | |
| 11755 | null, | |
| 11756 | .arm_aapcs16_vfp => if (target.os.tag == .watchos) | |
| 11757 | .arm_aapcs_vfpcc | |
| 11758 | else | |
| 11759 | null, | |
| 11753 | 11760 | .riscv64_lp64_v => .riscv_vectorcallcc, |
| 11754 | 11761 | .riscv32_ilp32_v => .riscv_vectorcallcc, |
| 11755 | 11762 | .avr_builtin => .avr_builtincc, |
| ... | ... | @@ -11779,7 +11786,6 @@ fn toLlvmCallConvTag(cc_tag: std.builtin.CallingConvention.Tag, target: std.Targ |
| 11779 | 11786 | .aarch64_aapcs, |
| 11780 | 11787 | .aarch64_aapcs_darwin, |
| 11781 | 11788 | .aarch64_aapcs_win, |
| 11782 | .arm_aapcs16_vfp, | |
| 11783 | 11789 | .mips64_n64, |
| 11784 | 11790 | .mips64_n32, |
| 11785 | 11791 | .mips_o32, |
| ... | ... | @@ -11977,7 +11983,7 @@ fn firstParamSRet(fn_info: InternPool.Key.FuncType, zcu: *Zcu, target: std.Targe |
| 11977 | 11983 | .aarch64_aapcs_darwin, |
| 11978 | 11984 | .aarch64_aapcs_win, |
| 11979 | 11985 | => aarch64_c_abi.classifyType(return_type, zcu) == .memory, |
| 11980 | .arm_aapcs, .arm_aapcs_vfp => switch (arm_c_abi.classifyType(return_type, zcu, .ret)) { | |
| 11986 | .arm_aapcs, .arm_aapcs_vfp, .arm_aapcs16_vfp => switch (arm_c_abi.classifyType(return_type, zcu, .ret)) { | |
| 11981 | 11987 | .memory, .i64_array => true, |
| 11982 | 11988 | .i32_array => |size| size != 1, |
| 11983 | 11989 | .byval => false, |
| ... | ... | @@ -12027,7 +12033,7 @@ fn lowerFnRetTy(o: *Object, fn_info: InternPool.Key.FuncType) Allocator.Error!Bu |
| 12027 | 12033 | .integer => return o.builder.intType(@intCast(return_type.bitSize(zcu))), |
| 12028 | 12034 | .double_integer => return o.builder.arrayType(2, .i64), |
| 12029 | 12035 | }, |
| 12030 | .arm_aapcs, .arm_aapcs_vfp => switch (arm_c_abi.classifyType(return_type, zcu, .ret)) { | |
| 12036 | .arm_aapcs, .arm_aapcs_vfp, .arm_aapcs16_vfp => switch (arm_c_abi.classifyType(return_type, zcu, .ret)) { | |
| 12031 | 12037 | .memory, .i64_array => return .void, |
| 12032 | 12038 | .i32_array => |len| return if (len == 1) .i32 else .void, |
| 12033 | 12039 | .byval => return o.lowerType(return_type), |
| ... | ... | @@ -12276,7 +12282,7 @@ const ParamTypeIterator = struct { |
| 12276 | 12282 | .double_integer => return Lowering{ .i64_array = 2 }, |
| 12277 | 12283 | } |
| 12278 | 12284 | }, |
| 12279 | .arm_aapcs, .arm_aapcs_vfp => { | |
| 12285 | .arm_aapcs, .arm_aapcs_vfp, .arm_aapcs16_vfp => { | |
| 12280 | 12286 | it.zig_index += 1; |
| 12281 | 12287 | it.llvm_index += 1; |
| 12282 | 12288 | switch (arm_c_abi.classifyType(ty, zcu, .arg)) { |
src/crash_report.zig+1-1| ... | ... | @@ -229,7 +229,7 @@ const WindowsSegfaultMessage = union(enum) { |
| 229 | 229 | illegal_instruction: void, |
| 230 | 230 | }; |
| 231 | 231 | |
| 232 | fn handleSegfaultWindows(info: *windows.EXCEPTION_POINTERS) callconv(windows.WINAPI) c_long { | |
| 232 | fn handleSegfaultWindows(info: *windows.EXCEPTION_POINTERS) callconv(.winapi) c_long { | |
| 233 | 233 | switch (info.ExceptionRecord.ExceptionCode) { |
| 234 | 234 | windows.EXCEPTION_DATATYPE_MISALIGNMENT => handleSegfaultWindowsExtra(info, .{ .literal = "Unaligned Memory Access" }), |
| 235 | 235 | windows.EXCEPTION_ACCESS_VIOLATION => handleSegfaultWindowsExtra(info, .segfault), |
src/link/Dwarf.zig+11-10| ... | ... | @@ -3415,8 +3415,8 @@ fn updateType( |
| 3415 | 3415 | .x86_64_regcall_v3_sysv => .LLVM_X86RegCall, |
| 3416 | 3416 | .x86_64_regcall_v4_win => .LLVM_X86RegCall, |
| 3417 | 3417 | .x86_64_vectorcall => .LLVM_vectorcall, |
| 3418 | .x86_sysv => .nocall, | |
| 3419 | .x86_win => .nocall, | |
| 3418 | .x86_sysv => .normal, | |
| 3419 | .x86_win => .normal, | |
| 3420 | 3420 | .x86_stdcall => .BORLAND_stdcall, |
| 3421 | 3421 | .x86_fastcall => .BORLAND_msfastcall, |
| 3422 | 3422 | .x86_thiscall => .BORLAND_thiscall, |
| ... | ... | @@ -3425,16 +3425,17 @@ fn updateType( |
| 3425 | 3425 | .x86_regcall_v4_win => .LLVM_X86RegCall, |
| 3426 | 3426 | .x86_vectorcall => .LLVM_vectorcall, |
| 3427 | 3427 | |
| 3428 | .aarch64_aapcs => .LLVM_AAPCS, | |
| 3429 | .aarch64_aapcs_darwin => .LLVM_AAPCS, | |
| 3430 | .aarch64_aapcs_win => .LLVM_AAPCS, | |
| 3428 | .aarch64_aapcs => .normal, | |
| 3429 | .aarch64_aapcs_darwin => .normal, | |
| 3430 | .aarch64_aapcs_win => .normal, | |
| 3431 | 3431 | .aarch64_vfabi => .LLVM_AAPCS, |
| 3432 | 3432 | .aarch64_vfabi_sve => .LLVM_AAPCS, |
| 3433 | 3433 | |
| 3434 | .arm_apcs => .nocall, | |
| 3434 | .arm_apcs => .normal, | |
| 3435 | 3435 | .arm_aapcs => .LLVM_AAPCS, |
| 3436 | .arm_aapcs_vfp => .LLVM_AAPCS_VFP, | |
| 3437 | .arm_aapcs16_vfp => .nocall, | |
| 3436 | .arm_aapcs_vfp, | |
| 3437 | .arm_aapcs16_vfp, | |
| 3438 | => .LLVM_AAPCS_VFP, | |
| 3438 | 3439 | |
| 3439 | 3440 | .riscv64_lp64_v, |
| 3440 | 3441 | .riscv32_ilp32_v, |
| ... | ... | @@ -3442,10 +3443,10 @@ fn updateType( |
| 3442 | 3443 | |
| 3443 | 3444 | .m68k_rtd => .LLVM_M68kRTD, |
| 3444 | 3445 | |
| 3445 | .amdgcn_kernel, | |
| 3446 | .amdgcn_kernel => .LLVM_OpenCLKernel, | |
| 3446 | 3447 | .nvptx_kernel, |
| 3447 | 3448 | .spirv_kernel, |
| 3448 | => .LLVM_OpenCLKernel, | |
| 3449 | => .nocall, | |
| 3449 | 3450 | |
| 3450 | 3451 | .x86_64_interrupt, |
| 3451 | 3452 | .x86_interrupt, |
test/cases/compile_errors/calling_function_with_naked_calling_convention.zig+2-2| ... | ... | @@ -1,11 +1,11 @@ |
| 1 | 1 | export fn entry() void { |
| 2 | 2 | foo(); |
| 3 | 3 | } |
| 4 | fn foo() callconv(.Naked) void {} | |
| 4 | fn foo() callconv(.naked) void {} | |
| 5 | 5 | |
| 6 | 6 | // error |
| 7 | 7 | // backend=llvm |
| 8 | 8 | // target=native |
| 9 | 9 | // |
| 10 | // :2:5: error: unable to call function with naked calling convention | |
| 10 | // :2:5: error: unable to call function with calling convention 'naked' | |
| 11 | 11 | // :4:1: note: function declared here |
tools/update_clang_options.zig+1-1| ... | ... | @@ -576,7 +576,7 @@ fn knownOption(name: []const u8) ?[]const u8 { |
| 576 | 576 | |
| 577 | 577 | const cpu_targets = struct { |
| 578 | 578 | pub const aarch64 = std.Target.aarch64; |
| 579 | pub const amdgpu = std.Target.amdgpu; | |
| 579 | pub const amdgcn = std.Target.amdgcn; | |
| 580 | 580 | pub const arc = std.Target.arc; |
| 581 | 581 | pub const arm = std.Target.arm; |
| 582 | 582 | pub const avr = std.Target.avr; |
tools/update_cpu_features.zig+1-1| ... | ... | @@ -390,7 +390,7 @@ const llvm_targets = [_]LlvmTarget{ |
| 390 | 390 | }, |
| 391 | 391 | }, |
| 392 | 392 | .{ |
| 393 | .zig_name = "amdgpu", | |
| 393 | .zig_name = "amdgcn", | |
| 394 | 394 | .llvm_name = "AMDGPU", |
| 395 | 395 | .td_name = "AMDGPU.td", |
| 396 | 396 | .feature_overrides = &.{ |