profile
viewpoint

Ask questionsstage1 C ABI compatibility

This issue is to track C ABI compatibility support in the stage1 compiler.

Here's what support looks like currently:

  • [x] integers, floats, pointers, enums, bools work on every target, as parameters and return values
  • [x] x86_64: struct & union parameters & return values larger than 16 bytes
  • [x] x86_64: struct & union parameters that have at least 1 integer in them
  • [x] x86_64: struct & union parameters <= 16 bytes which break structs into parameters
  • [x] x86_64: struct & union parameters <= 16 bytes which are all floats
  • [ ] x86_64: struct & union return values <= 16 bytes
  • [x] ARM: struct & union return values
  • [ ] ARM: struct & union parameters
  • [x] C ABI for parameters that is unsupported gives a compile error linking to this issue
  • [x] C ABI for return values that is unsupported gives a compile error linking to this issue
  • [ ] other architectures structs & unions parameters & return values

For those who find this issue from the compile error, leave a comment detailing your specific needs and I'll see if I can code those up for you to unblock you, so you don't have to wait for this issue to be 100% solved.

ziglang/zig

Answer questions shawnl

It has been mentioned on the LLVM mailing list, but LLVM is the place where the C ABI needs to be implemented, instead of the hacked together interaction between clang and LLVM.

El jue., 8 jul. 2021 15:37, Exonorid ***@***.***> escribió:

Vulkan's debug utilities use a callback of the type fn (VkDebugUtilsMessageSeverityFlagBitsEXT, VkDebugUtilsMessageTypeFlagsEXT, *const VkDebugUtilsMessengerCallbackDataEXT, ?*c_void) callconv(.C) u32 which doesn't compile

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ziglang/zig/issues/1481#issuecomment-876366047, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD4W4U5MDWYJ2T45UOF7ULTWWEVZANCNFSM4FTUZZGA .

useful!
source:https://uonfu.com/
Github User Rank List