News for hackers. Stuff that matters.
Re:The Art of 64-bit Assembly by Joker_vD on Saturday August 01, 2026 @12:07PM (#49135604)
Last time I checked, software compiled with both Cygwin and MSYS2 internally uses SysV calling convention, only switching to WINAPI when calling, well, Win32 API.
Re:The Art of 64-bit Assembly by okanat on Saturday August 01, 2026 @06:37PM (#49139203)
It is more complicated than that. MSYS2 isn't just Cygwin. It has different environments.

MSYS environment is just Cygwin and it uses Itanium IIRC for C and C++ non-Win32 calls since it emulates POSIX. If it links with Windows C runtime they use __cdecl. Win32 API calls always use __stdcall convention / ABI.

However, Mingw environments (Mingw64, UCRT, CLANG etc.) are intended for native Windows development, hence, they use normal MSVC __cdecl ABI for C library calls and internal function calls too. Win32 calls are again __stdcall.

Unlike C, for C++ all MSYS environments use Itanium ABI since they link with GNU libstdc++ or Clang libc++. I think it is possible to use MSVC C++ ABI with Clang but it could be complicated since it requires recompilation of at least libc++.

Re:The Art of 64-bit Assembly by Joker_vD on Sunday August 02, 2026 @02:12AM (#49141613)
TL;DR: You can mix and match calling conventions as long as you actually track what piece of (compiled) software uses what convention.