Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame^] | 1 | From ca8f7d968a212f2da64492faac4f80384a5ba395 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sun, 11 Sep 2022 13:23:19 -0700 |
| 4 | Subject: [PATCH] Use builtin for clear_cache |
| 5 | |
| 6 | This makes it compile on mips/clang and also portable across platforms |
| 7 | |
| 8 | Upstream-Status: Pending |
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 10 | --- |
| 11 | src/lj_mcode.c | 2 +- |
| 12 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 13 | |
| 14 | diff --git a/src/lj_mcode.c b/src/lj_mcode.c |
| 15 | index 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 | -- |
| 28 | 2.37.3 |
| 29 | |