Windows support (wip): target layer, Microsoft x64 ABI, portable runtime, CI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Nexoniarz 2026-10-08 20:46:51 +02:00
commit 84cbbb3e16
18 changed files with 481 additions and 94 deletions

View file

@ -101,9 +101,11 @@ struct ModuleScope {
std::set<std::string> imports; // Finch modules visible here
};
// How a C struct travels through registers (System V x86-64).
// How a C struct travels: System V x86-64 (Linux) or Microsoft x64 (Windows).
struct AbiArg {
enum Kind { Direct, Expand, Memory } kind = Direct;
// Direct: as is. Expand: split into register-sized parts. Memory: on the stack (byval), or
// returned through a hidden pointer (sret). Indirect (Windows): a pointer to a copy the caller made.
enum Kind { Direct, Expand, Memory, Indirect } kind = Direct;
std::vector<llvm::Type *> parts; // Expand: one value per eightbyte
llvm::Type *coerced = nullptr; // Expand: { parts... } for returns
};