Fix build on mips64el - 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/lightning.c
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2023年10月05日 14:24:13 +0200
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2023年10月05日 15:19:11 -0300
commit90f5c78f47dfb1ae4b953b0e30c7ef72a6438396 (patch)
tree9045e3be875b4b14dc3c516d25b998fd64d84c4d /lib/lightning.c
parentb3681decc7c4f9e90b9bee083213327251d666d7 (diff)
downloadlightning-90f5c78f47dfb1ae4b953b0e30c7ef72a6438396.tar.gz
Fix build on mips64el
The "cvt_offset" field may be used for anything non-ARM in jit_fallback.c, so enable this field on anything non-ARM. Worst case scenario, this field is not used and it only occupies 4 bytes of RAM. Besides, when building for mips64el with the N32 ABI, the __WORDSIZE ends up being 32 and not 64 (which may be a problem in itself), which caused some more issues as the movi_d_w() macro referenced by jit_mips.c was not defined anywhere. This caused Buildroot's CI to fail when building on mips64el: http://autobuild.buildroot.net/results/f951d91d2ca4647170a52499a243d45d13d3bced/ Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Diffstat (limited to 'lib/lightning.c')
-rw-r--r--lib/lightning.c 4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lightning.c b/lib/lightning.c
index d5ea330..39c4fc2 100644
--- a/lib/lightning.c
+++ b/lib/lightning.c
@@ -4285,7 +4285,7 @@ static void _htoni_ul(jit_state_t*, jit_int32_t, jit_word_t);
#endif
# define movi_f_w(r0, i0) _movi_f_w(_jit, r0, i0)
static void _movi_f_w(jit_state_t*, jit_int32_t, jit_float32_t);
-#if __WORDSIZE == 32
+#if __WORDSIZE == 32 && !(defined(__mips__) && NEW_ABI)
# define movi_d_ww(r0, r1, i0) _movi_d_ww(_jit, r0, r1, i0)
static void _movi_d_ww(jit_state_t*, jit_int32_t, jit_int32_t, jit_float64_t);
#else
@@ -4569,7 +4569,7 @@ _movi_f_w(jit_state_t *_jit, jit_int32_t r0, jit_float32_t i0)
movi(r0, data.i);
}
-#if __WORDSIZE == 32
+#if __WORDSIZE == 32 && !(defined(__mips__) && NEW_ABI)
static void
_movi_d_ww(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1, jit_float64_t i0)
{
generated by cgit v1.2.3 (git 2.39.1) at 2025年10月01日 06:44:45 +0000

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