blob: 2c41180d91077de06b68b92fbd11960d677fbb28 [file] [log] [blame]
Andrew Geissler87f5cff2022-09-30 13:13:31 -05001From ca8f7d968a212f2da64492faac4f80384a5ba395 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 11 Sep 2022 13:23:19 -0700
4Subject: [PATCH] Use builtin for clear_cache
5
6This makes it compile on mips/clang and also portable across platforms
7
8Upstream-Status: Pending
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 src/lj_mcode.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/src/lj_mcode.c b/src/lj_mcode.c
15index 163aada4..471897da 100644
16--- a/src/lj_mcode.c
17+++ b/src/lj_mcode.c
18@@ -46,7 +46,7 @@ void lj_mcode_sync(void *start, void *end)
19 #elif LJ_TARGET_PPC
20 lj_vm_cachesync(start, end);
21 #elif defined(__GNUC__) || defined(__clang__)
22- __clear_cache(start, end);
23+ __builtin___clear_cache(start, end);
24 #else
25 #error "Missing builtin to flush instruction cache"
26 #endif
27--
282.37.3
29