From e8bf1f2064da8e4c7811e4f8d94a8c05fd848efe Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 11 Apr 2021 18:59:54 +0100 Subject: Minor fixes to platform checking code --- src/llvm_backend.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/llvm_backend.cpp') diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index b6f2b2d68..eb4f3c300 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -8988,6 +8988,16 @@ lbValue lb_build_builtin_proc(lbProcedure *p, Ast *expr, TypeAndValue const &tv, ); GB_ASSERT(the_asm != nullptr); LLVMBuildCall2(p->builder, func_type, the_asm, nullptr, 0, ""); + } else if (build_context.metrics.arch == TargetArch_arm64) { + LLVMTypeRef func_type = LLVMFunctionType(LLVMVoidTypeInContext(p->module->ctx), nullptr, 0, false); + LLVMValueRef the_asm = LLVMGetInlineAsm(func_type, + cast(char *)"yield", 5, + cast(char *)"", 0, + /*HasSideEffects*/true, /*IsAlignStack*/false, + LLVMInlineAsmDialectATT + ); + GB_ASSERT(the_asm != nullptr); + LLVMBuildCall2(p->builder, func_type, the_asm, nullptr, 0, ""); } return {}; -- cgit v1.2.3