aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2026-01-15 17:52:36 +0000
committergingerBill <gingerBill@users.noreply.github.com>2026-01-15 17:52:36 +0000
commit59ae82634ed69b019a8965d1120dd8c7c5a7a605 (patch)
tree48b83381b47c4ae73dd5e87d1a3c71629cf176e9
parentb3f4807b2d11d9e3f18279dcb51ffc1ec031abbc (diff)
Add `preserve/most` and `preserve/all`bill/must-tail
-rw-r--r--src/llvm_backend.hpp2
-rw-r--r--src/parser.cpp2
-rw-r--r--src/parser.hpp4
3 files changed, 8 insertions, 0 deletions
diff --git a/src/llvm_backend.hpp b/src/llvm_backend.hpp
index 884b87998..e10471527 100644
--- a/src/llvm_backend.hpp
+++ b/src/llvm_backend.hpp
@@ -726,6 +726,8 @@ lbCallingConventionKind const lb_calling_convention_map[ProcCC_MAX] = {
lbCallingConvention_X86_64_SysV, // ProcCC_SysV,
lbCallingConvention_PreserveNone, // ProcCC_PreserveNone,
+ lbCallingConvention_PreserveMost, // ProcCC_PreserveMost,
+ lbCallingConvention_PreserveAll, // ProcCC_PreserveAll,
};
diff --git a/src/parser.cpp b/src/parser.cpp
index 8782b3a2b..fc55dae97 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -4022,6 +4022,8 @@ gb_internal ProcCallingConvention string_to_calling_convention(String const &s)
if (s == "sysv") return ProcCC_SysV;
if (s == "preserve/none") return ProcCC_PreserveNone;
+ if (s == "preserve/most") return ProcCC_PreserveMost;
+ if (s == "preserve/all") return ProcCC_PreserveAll;
if (s == "system") {
if (build_context.metrics.os == TargetOs_windows) {
diff --git a/src/parser.hpp b/src/parser.hpp
index 77d38b291..011330438 100644
--- a/src/parser.hpp
+++ b/src/parser.hpp
@@ -302,6 +302,8 @@ enum ProcCallingConvention : i32 {
ProcCC_SysV = 10,
ProcCC_PreserveNone = 11,
+ ProcCC_PreserveMost = 12,
+ ProcCC_PreserveAll = 13,
ProcCC_MAX,
@@ -322,6 +324,8 @@ gb_global char const *proc_calling_convention_strings[ProcCC_MAX] = {
"win64",
"sysv",
"preserve/none",
+ "preserve/most",
+ "preserve/all",
};
gb_internal ProcCallingConvention default_calling_convention(void) {