From 65e8b27775d07128d64b311756597c3229ff2eb0 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 8 Apr 2021 00:40:51 +0000 Subject: [PATCH] chore: Mask ARM source if not AARCH64 not defined --- runtime/include/arch/aarch64/context.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/runtime/include/arch/aarch64/context.h b/runtime/include/arch/aarch64/context.h index 95f7125..addc382 100644 --- a/runtime/include/arch/aarch64/context.h +++ b/runtime/include/arch/aarch64/context.h @@ -1,4 +1,5 @@ #pragma once +#if defined(AARCH64) || defined(aarch64) #include #include "arch/common.h" @@ -129,11 +130,15 @@ arch_context_switch(struct arch_context *a, struct arch_context *b) ".align 8\n\t" "exit%=:\n\t" : - : [ a ] "r"(a_registers), [ b ] "r"(b_registers), [ av ] "r"(&a->variant), [ bv ] "r"(&b->variant), - [ slowpath ] "r"(&arch_context_restore_preempted) + : [a] "r"(a_registers), [b] "r"(b_registers), [av] "r"(&a->variant), [bv] "r"(&b->variant), + [slowpath] "r"(&arch_context_restore_preempted) : "memory", "cc", "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23", "x24", "d8", "d9", "d10", "d11", "d12", "d13", "d14", "d15"); return 0; } + +#else +#warning "Neither AARCH64 nor aarch64 was defined, but aarch64/context.h was included!" +#endif