diff --git a/core/iwasm/compilation/aot_llvm.c b/core/iwasm/compilation/aot_llvm.c index d52a486a0..8c989ed6e 100644 --- a/core/iwasm/compilation/aot_llvm.c +++ b/core/iwasm/compilation/aot_llvm.c @@ -3121,7 +3121,8 @@ aot_create_comp_context(const AOTCompData *comp_data, aot_comp_option_t option) #endif if (option->enable_simd && strcmp(comp_ctx->target_arch, "x86_64") != 0 - && strncmp(comp_ctx->target_arch, "aarch64", 7) != 0) { + && strncmp(comp_ctx->target_arch, "aarch64", 7) != 0 + && strcmp(comp_ctx->target_arch, "arc") != 0) { /* Disable simd if it isn't supported by target arch */ option->enable_simd = false; } diff --git a/core/iwasm/compilation/aot_llvm_extra.cpp b/core/iwasm/compilation/aot_llvm_extra.cpp index fc0ece069..e6770eb45 100644 --- a/core/iwasm/compilation/aot_llvm_extra.cpp +++ b/core/iwasm/compilation/aot_llvm_extra.cpp @@ -176,6 +176,9 @@ aot_check_simd_compatibility(const char *arch_c_str, const char *cpu_c_str) else if (targetArch == llvm::Triple::aarch64) { return subTargetInfo->checkFeatures("+neon"); } + else if (targetArch == llvm::Triple::arc) { + return true; + } else { return false; } diff --git a/core/shared/platform/include/platform_api_extension.h b/core/shared/platform/include/platform_api_extension.h index e165e5ef2..b1c3b4f4a 100644 --- a/core/shared/platform/include/platform_api_extension.h +++ b/core/shared/platform/include/platform_api_extension.h @@ -104,8 +104,9 @@ os_thread_exit(void *retval); #endif /* Clang's __GNUC_PREREQ macro has a different meaning than GCC one, - so we have to handle this case specially */ -#if defined(__clang__) + so we have to handle this case specially(except the CCAC compiler + provided by MetaWare, which doesn't support atomic operations) */ +#if defined(__clang__) && !defined(__CCAC__) /* Clang provides stdatomic.h since 3.6.0 See https://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html */ #if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 6)