diff options
| author | gingerBill <bill@gingerbill.org> | 2021-04-11 18:59:54 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-04-11 18:59:54 +0100 |
| commit | e8bf1f2064da8e4c7811e4f8d94a8c05fd848efe (patch) | |
| tree | 17541f21a748bc06e9de8d97d83f9e8aa3db8a0a /src/llvm_backend.cpp | |
| parent | 1156bd9dd05becd536feeed90f8d33dc4cc30078 (diff) | |
Minor fixes to platform checking code
Diffstat (limited to 'src/llvm_backend.cpp')
| -rw-r--r-- | src/llvm_backend.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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 {}; |