cccfastcc = 8coldccghcccwebkit_jscc = 12anyregccpreserve_mostccpreserve_allccswiftcccxx_fast_tlscctailcccfguard_checkccswifttailccx86_stdcallcc = 64x86_fastcallccarm_apcsccarm_aapcsccarm_aapcs_vfpccmsp430_intrccx86_thiscallccptx_kernelptx_devicespir_func = 75spir_kernelintel_ocl_biccx86_64_sysvccwin64ccx86_vectorcallcchhvmcchhvm_cccx86_intrccavr_intrccavr_signalccavr_builtinccamdgpu_vs = 87amdgpu_gsamdgpu_psamdgpu_csamdgpu_kernelx86_regcallccamdgpu_hsmsp430_builtinccamdgpu_ls = 95amdgpu_esaarch64_vector_pcsaarch64_sve_vector_pcsamdgpu_gfx = 100m68k_intrccaarch64_sme_preservemost_from_x0 = 102aarch64_sme_preservemost_from_x2m68k_rtdcc = 106riscv_vectorcallcc = 110_pub fn format( self: CallConv, comptime _: []const u8, _: std.fmt.FormatOptions, writer: anytype, ) @TypeOf(writer).Error!voidpub fn format(
self: CallConv,
comptime _: []const u8,
_: std.fmt.FormatOptions,
writer: anytype,
) @TypeOf(writer).Error!void {
switch (self) {
default => {},
.fastcc,
.coldcc,
.ghccc,
.webkit_jscc,
.anyregcc,
.preserve_mostcc,
.preserve_allcc,
.swiftcc,
.cxx_fast_tlscc,
.tailcc,
.cfguard_checkcc,
.swifttailcc,
.x86_stdcallcc,
.x86_fastcallcc,
.arm_apcscc,
.arm_aapcscc,
.arm_aapcs_vfpcc,
.msp430_intrcc,
.x86_thiscallcc,
.ptx_kernel,
.ptx_device,
.spir_func,
.spir_kernel,
.intel_ocl_bicc,
.x86_64_sysvcc,
.win64cc,
.x86_vectorcallcc,
.hhvmcc,
.hhvm_ccc,
.x86_intrcc,
.avr_intrcc,
.avr_signalcc,
.avr_builtincc,
.amdgpu_vs,
.amdgpu_gs,
.amdgpu_ps,
.amdgpu_cs,
.amdgpu_kernel,
.x86_regcallcc,
.amdgpu_hs,
.msp430_builtincc,
.amdgpu_ls,
.amdgpu_es,
.aarch64_vector_pcs,
.aarch64_sve_vector_pcs,
.amdgpu_gfx,
.m68k_intrcc,
.aarch64_sme_preservemost_from_x0,
.aarch64_sme_preservemost_from_x2,
.m68k_rtdcc,
.riscv_vectorcallcc,
=> try writer.print(" {s}", .{@tagName(self)}),
_ => try writer.print(" cc{d}", .{@intFromEnum(self)}),
}
}pub const CallConv = enum(u10) {
ccc,
fastcc = 8,
coldcc,
ghccc,
webkit_jscc = 12,
anyregcc,
preserve_mostcc,
preserve_allcc,
swiftcc,
cxx_fast_tlscc,
tailcc,
cfguard_checkcc,
swifttailcc,
x86_stdcallcc = 64,
x86_fastcallcc,
arm_apcscc,
arm_aapcscc,
arm_aapcs_vfpcc,
msp430_intrcc,
x86_thiscallcc,
ptx_kernel,
ptx_device,
spir_func = 75,
spir_kernel,
intel_ocl_bicc,
x86_64_sysvcc,
win64cc,
x86_vectorcallcc,
hhvmcc,
hhvm_ccc,
x86_intrcc,
avr_intrcc,
avr_signalcc,
avr_builtincc,
amdgpu_vs = 87,
amdgpu_gs,
amdgpu_ps,
amdgpu_cs,
amdgpu_kernel,
x86_regcallcc,
amdgpu_hs,
msp430_builtincc,
amdgpu_ls = 95,
amdgpu_es,
aarch64_vector_pcs,
aarch64_sve_vector_pcs,
amdgpu_gfx = 100,
m68k_intrcc,
aarch64_sme_preservemost_from_x0 = 102,
aarch64_sme_preservemost_from_x2,
m68k_rtdcc = 106,
riscv_vectorcallcc = 110,
_,
pub const default = CallConv.ccc;
pub fn format(
self: CallConv,
comptime _: []const u8,
_: std.fmt.FormatOptions,
writer: anytype,
) @TypeOf(writer).Error!void {
switch (self) {
default => {},
.fastcc,
.coldcc,
.ghccc,
.webkit_jscc,
.anyregcc,
.preserve_mostcc,
.preserve_allcc,
.swiftcc,
.cxx_fast_tlscc,
.tailcc,
.cfguard_checkcc,
.swifttailcc,
.x86_stdcallcc,
.x86_fastcallcc,
.arm_apcscc,
.arm_aapcscc,
.arm_aapcs_vfpcc,
.msp430_intrcc,
.x86_thiscallcc,
.ptx_kernel,
.ptx_device,
.spir_func,
.spir_kernel,
.intel_ocl_bicc,
.x86_64_sysvcc,
.win64cc,
.x86_vectorcallcc,
.hhvmcc,
.hhvm_ccc,
.x86_intrcc,
.avr_intrcc,
.avr_signalcc,
.avr_builtincc,
.amdgpu_vs,
.amdgpu_gs,
.amdgpu_ps,
.amdgpu_cs,
.amdgpu_kernel,
.x86_regcallcc,
.amdgpu_hs,
.msp430_builtincc,
.amdgpu_ls,
.amdgpu_es,
.aarch64_vector_pcs,
.aarch64_sve_vector_pcs,
.amdgpu_gfx,
.m68k_intrcc,
.aarch64_sme_preservemost_from_x0,
.aarch64_sme_preservemost_from_x2,
.m68k_rtdcc,
.riscv_vectorcallcc,
=> try writer.print(" {s}", .{@tagName(self)}),
_ => try writer.print(" cc{d}", .{@intFromEnum(self)}),
}
}
}