From be0775c2e7e585f82b87bdc258df0b23ebd94398 Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Thu, 25 Apr 2013 17:09:22 +0200 Subject: [PATCH] orc: fix cache flush for iOS MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Apple does not provide an implementation of __clear_cache in ARM but sys_icache_invalidate can be used instead review-by: Sebastian Dröge --- orc/orcarm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/orc/orcarm.c b/orc/orcarm.c index d66e55f..3622ac3 100644 --- a/orc/orcarm.c +++ b/orc/orcarm.c @@ -14,6 +14,12 @@ #include #include +#ifdef HAVE_ARM +#if defined(__APPLE__) +#include +#endif +#endif + /** * SECTION:orcarm * @title: ARM @@ -724,8 +730,12 @@ void orc_arm_flush_cache (OrcCode *code) { #ifdef HAVE_ARM +#ifdef __APPLE__ + sys_icache_invalidate(code->code, code->code_size); +#else __clear_cache (code->code, code->code + code->code_size); #endif +#endif } void -- 2.7.4