hnes / libaco

A blazing fast and lightweight C asymmetric coroutine library 💎 ⛅🚀⛅🌞
https://libaco.org
Apache License 2.0
3.5k stars 391 forks source link

Proposal: Add the MacOS support #11

Closed hnes closed 6 years ago

hnes commented 6 years ago

According to MacOS's IA-32 Function Calling Conventions:

The function calling conventions used in the IA-32 environment are the same as those used in the System V IA-32 ABI, with the following exceptions:

  • Different rules for returning structures

  • The stack is 16-byte aligned at the point of function calls

  • Large data types (larger than 4 bytes) are kept at their natural alignment

  • Most floating-point operations are carried out using the SSE unit instead of the x87 FPU, except when operating on long double values. (The IA-32 environment defaults to 64-bit internal precision for the x87 FPU.)

The content of this article is largely based in System V Application Binary Interface: Intel386 Architecture Processor Supplement, available at http://www.sco.com/developers/devspecs/abi386-4.pdf.

and MacOS's x86-64 Function Calling Conventions:

The OS X x86-64 function calling conventions are the same as the function calling conventions described in System V Application Binary Interface AMD64 Architecture Processor Supplement.

That means libaco already supports MacOS, but there still exist some build problems due to the differences of compiler toolchains between linux and mac.

The support for MacOS would be finally released in the v1.2.3 (would come in several days).

hnes commented 6 years ago

The v1.2.3 has already been released ;-)