fix: made suggested changes to add a playdate subtarget, updated help text and reduce required build flags for playdate to just the subtarget, no-movt and cortex-m7 added to default on playdate subtarget flag.

This commit is contained in:
MauriceElliott
2026-07-01 21:18:28 +01:00
parent a3fa3476c6
commit 56cee0c2cf
5 changed files with 24 additions and 17 deletions

View File

@@ -452,7 +452,7 @@ gb_internal lbProcedure *lb_create_dummy_procedure(lbModule *m, String link_name
Type *pt = p->type;
lbCallingConventionKind cc_kind = lbCallingConvention_C;
if (is_cortex_m7()) {
if (selected_subtarget == Subtarget_Playdate) {
cc_kind = lbCallingConvention_ARM_AAPCS_VFP;
} else if (!is_arch_wasm()) {
cc_kind = lb_calling_convention_map[pt->Proc.calling_convention];
@@ -996,7 +996,7 @@ gb_internal lbValue lb_emit_call_internal(lbProcedure *p, lbValue value, lbValue
LLVMValueRef ret = LLVMBuildCall2(p->builder, fnp, fn, args, arg_count, "");
auto llvm_cc = lb_calling_convention_map[proc_type->Proc.calling_convention];
if (is_cortex_m7()) {
if (selected_subtarget == Subtarget_Playdate) {
llvm_cc = lbCallingConvention_ARM_AAPCS_VFP;
}
LLVMSetInstructionCallConv(ret, llvm_cc);