lightning.git - Portable just-in-time compiler library

index : lightning.git
Portable just-in-time compiler library
summary refs log tree commit diff
path: root/lib/jit_ppc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/jit_ppc.c')
-rw-r--r--lib/jit_ppc.c 16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/jit_ppc.c b/lib/jit_ppc.c
index 2bd92cb..8a75cef 100644
--- a/lib/jit_ppc.c
+++ b/lib/jit_ppc.c
@@ -1372,8 +1372,7 @@ _emit_code(jit_state_t *_jit)
patch_at(_jitc->patches.ptr[offset].inst, word);
}
- word = sysconf(_SC_PAGE_SIZE);
- __clear_cache(_jit->code.ptr, (void *)((_jit->pc.w + word) & -word));
+ jit_flush(_jit->code.ptr, _jit->pc.uc);
return (_jit->code.ptr);
}
@@ -1384,6 +1383,19 @@ _emit_code(jit_state_t *_jit)
#undef CODE
void
+jit_flush(void *fptr, void *tptr)
+{
+#if defined(__GNUC__)
+ jit_word_t f, t, s;
+
+ s = sysconf(_SC_PAGE_SIZE);
+ f = (jit_word_t)fptr & -s;
+ t = (((jit_word_t)tptr) + s - 1) & -s;
+ __clear_cache((void *)f, (void *)t);
+#endif
+}
+
+void
_emit_ldxi(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1, jit_word_t i0)
{
#if __WORDSIZE == 32
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月18日 19:19:46 +0000

AltStyle によって変換されたページ (->オリジナル) /