lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] mips: Add missing JAL() macro


From: Paul Cercueil
Subject: Re: [PATCH] mips: Add missing JAL() macro
Date: Sat, 10 Sep 2022 21:08:16 +0100

Hi Paulo,

Le sam., sept. 10 2022 at 13:14:30 -0300, Paulo César Pereira de Andrade <paulo.cesar.pereira.de.andrade@gmail.com> a écrit :
Em sáb., 10 de set. de 2022 às 12:48, Paulo César Pereira de Andrade
<paulo.cesar.pereira.de.andrade@gmail.com> escreveu:

  Hi Paul,

  NVM. This fix make check.

"""
_mulr(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1, jit_int32_t r2)
 {
-    if (__WORDSIZE == 32)
-        MUL(r0, r1, r2);
+    if (jit_mips2_p() && __WORDSIZE == 32)

Oh, sorry about that. I had no idea MUL was not in MIPS32r1.

Cheers,
-Paul

+       MUL(r0, r1, r2);
     else {
         multu(r1, r2);
         MFLO(r0);
"""

 Em sáb., 10 de set. de 2022 às 09:37, Paul Cercueil
 <paul@crapouillou.net> escreveu:

   Hi Paul,

 > It was accidentally left over in my previous commit (8f6580a).
 >
 > Signed-off-by: Paul Cercueil <paul@crapouillou.net>
 > ---
 >  lib/jit_mips-cpu.c | 1 +
 >  1 file changed, 1 insertion(+)
 >
 > diff --git a/lib/jit_mips-cpu.c b/lib/jit_mips-cpu.c
 > index 0862592..8d22393 100644
 > --- a/lib/jit_mips-cpu.c
 > +++ b/lib/jit_mips-cpu.c
 > @@ -400,6 +400,7 @@ static void _nop(jit_state_t*,jit_int32_t);
> # define JR(r0) hrrrit(MIPS_SPECIAL,r0,0,0,0,MIPS_JR)
 >  #  endif
 >  #  define J(i0)                                hi(MIPS_J,i0)
 > +#  define JAL(i0)                      hi(MIPS_JAL,i0)
> # define MOVN(rd,rs,rt) hrrrit(0,rs,rt,rd,0,MIPS_MOVN) > # define MOVZ(rd,rs,rt) hrrrit(0,rs,rt,rd,0,MIPS_MOVZ)
 >  #  define comr(r0,r1)                  xori(r0,r1,-1)
 > --
 > 2.35.1

About https://git.savannah.gnu.org/cgit/lightning.git/commit/?id=f579802f4f1533cd9b3de77b8b298ed1a109f5cf
 can you still check this environment?

   What you see in:

 # cat /proc/cpuinfo
 # cpp -dM </dev/null

   I am getting a SIGILL because of that. There are a few other
"make check" failures that might be related to the other mips related
 optimizations.

   I just managed to get my very old
 https://wiki.debian.org/DebianYeeloong
to work and am making tests on it. Hopefully I can get some preprocessor or /proc/cpuinfo information and use the old implementation on those cases.

   So far are failing:
 allocar
 rpn
 alu_mul
 stack
 clobber
 range
 ranger
 catomic

catomic is timing out with fallack.c code, so, need to debug it further.
 it works with a patch to use cpu atomic operations.

   What I see is:

 debian:~/lightning-2.1.3/check# cat /proc/cpuinfo
 system type        : lemote-notebook
 processor        : 0
 cpu model        : ICT Loongson-2 V0.3  FPU V0.1
 BogoMIPS        : 132.09
 wait instruction    : yes
 microsecond timers    : yes
 tlb_entries        : 64
 extra interrupt vector    : no
 hardware watchpoint    : no
 ASEs implemented    :
 shadow register sets    : 1
 core            : 0
 VCED exceptions        : not available
 VCEI exceptions        : not available

 debian:~/lightning-2.1.3/check# cpp -dM </dev/null
 #define __DBL_MIN_EXP__ (-1021)
 #define __FLT_MIN__ 1.17549435e-38F
 #define __DEC64_DEN__ 0.000000000000001E-383DD
 #define __CHAR_BIT__ 8
 #define R3000 1
 #define __WCHAR_MAX__ 2147483647
 #define __DBL_DENORM_MIN__ 4.9406564584124654e-324
 #define __FLT_EVAL_METHOD__ 0
 #define _MIPS_ISA _MIPS_ISA_MIPS1
 #define __LANGUAGE_C 1
 #define __DBL_MIN_10_EXP__ (-307)
 #define __FINITE_MATH_ONLY__ 0
 #define _MIPS_TUNE "mips1"
 #define __GNUC_PATCHLEVEL__ 3
 #define __DEC64_MAX_EXP__ 384
 #define _ABIO32 1
 #define __SHRT_MAX__ 32767
 #define __LDBL_MAX__ 1.7976931348623157e+308L
 #define __LANGUAGE_C__ 1
 #define __UINTMAX_TYPE__ long long unsigned int
 #define __linux 1
 #define __DEC32_EPSILON__ 1E-6DF
 #define __unix 1
 #define __LDBL_MAX_EXP__ 1024
 #define __MIPSEL__ 1
 #define __linux__ 1
 #define __SCHAR_MAX__ 127
 #define __USER_LABEL_PREFIX__
 #define __STDC_HOSTED__ 1
 #define __LDBL_HAS_INFINITY__ 1
 #define __DEC64_MIN_EXP__ (-383)
 #define __mips_fpr 32
 #define __DBL_DIG__ 15
 #define __FLT_EPSILON__ 1.19209290e-7F
 #define __mips__ 1
 #define __LDBL_MIN__ 2.2250738585072014e-308L
 #define __DEC32_MAX__ 9.999999E96DF
 #define MIPSEL 1
 #define __unix__ 1
 #define __DECIMAL_DIG__ 17
 #define __gnu_linux__ 1
 #define __LDBL_HAS_QUIET_NAN__ 1
 #define __GNUC__ 4
 #define __FLT_HAS_DENORM__ 1
 #define _R3000 1
 #define __DBL_MAX__ 1.7976931348623157e+308
 #define __DBL_HAS_INFINITY__ 1
 #define __DEC32_MIN_EXP__ (-95)
 #define __LDBL_HAS_DENORM__ 1
 #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
 #define __DEC32_MIN__ 1E-95DF
 #define __DBL_MAX_EXP__ 1024
 #define __R3000__ 1
 #define __DEC128_EPSILON__ 1E-33DL
 #define __LONG_LONG_MAX__ 9223372036854775807LL
 #define _MIPS_ARCH_MIPS1 1
 #define __GXX_ABI_VERSION 1002
 #define __FLT_MIN_EXP__ (-125)
 #define _MIPSEL 1
 #define __DBL_MIN__ 2.2250738585072014e-308
 #define _MIPS_ARCH "mips1"
 #define __DBL_HAS_QUIET_NAN__ 1
 #define __DEC128_MIN__ 1E-6143DL
 #define __REGISTER_PREFIX__
 #define __DBL_HAS_DENORM__ 1
 #define __NO_INLINE__ 1
 #define __R3000 1
 #define __DEC_EVAL_METHOD__ 2
 #define __FLT_MANT_DIG__ 24
 #define __VERSION__ "4.2.3 (Debian 4.2.3-3)"
 #define _MIPS_TUNE_MIPS1 1
 #define __DEC64_EPSILON__ 1E-15DD
 #define __DEC128_MIN_EXP__ (-6143)
 #define unix 1
 #define __SIZE_TYPE__ unsigned int
 #define __DEC32_DEN__ 0.000001E-95DF
 #define __ELF__ 1
 #define __FLT_RADIX__ 2
 #define __LDBL_EPSILON__ 2.2204460492503131e-16L
 #define __LDBL_DIG__ 15
 #define _MIPS_SZPTR 32
 #define __FLT_HAS_QUIET_NAN__ 1
 #define __FLT_MAX_10_EXP__ 38
 #define __LONG_MAX__ 2147483647L
 #define __FLT_HAS_INFINITY__ 1
 #define __DEC64_MAX__ 9.999999999999999E384DD
 #define __DEC64_MANT_DIG__ 16
 #define _mips 1
 #define __DEC32_MAX_EXP__ 96
 #define linux 1
 #define __DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL
 #define _MIPS_SZINT 32
 #define __LDBL_MANT_DIG__ 53
 #define __MIPSEL 1
 #define __WCHAR_TYPE__ int
 #define __pic__ 1
 #define __FLT_DIG__ 6
 #define __INT_MAX__ 2147483647
 #define mips 1
 #define __FLT_MAX_EXP__ 128
 #define _MIPS_SIM _ABIO32
 #define __DBL_MANT_DIG__ 53
 #define __DEC64_MIN__ 1E-383DD
 #define __WINT_TYPE__ unsigned int
 #define __LDBL_MIN_EXP__ (-1021)
 #define _MIPS_FPSET 16
 #define __LDBL_MAX_10_EXP__ 308
 #define __DBL_EPSILON__ 2.2204460492503131e-16
 #define __INTMAX_MAX__ 9223372036854775807LL
 #define __FLT_DENORM_MIN__ 1.40129846e-45F
 #define __PIC__ 1
 #define __FLT_MAX__ 3.40282347e+38F
 #define LANGUAGE_C 1
 #define __FLT_MIN_10_EXP__ (-37)
 #define __INTMAX_TYPE__ long long int
 #define _LANGUAGE_C 1
 #define __DEC128_MAX_EXP__ 6144
 #define __GNUC_MINOR__ 2
 #define __DEC32_MANT_DIG__ 7
 #define __DBL_MAX_10_EXP__ 308
 #define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
 #define __STDC__ 1
 #define __mips_hard_float 1
 #define __PTRDIFF_TYPE__ int
 #define __mips 1
 #define _MIPS_SZLONG 32
 #define __DEC128_MANT_DIG__ 34
 #define __LDBL_MIN_10_EXP__ (-307)
 #define __GNUC_GNU_INLINE__ 1
 debian:~/lightning-2.1.3/check#





reply via email to

[Prev in Thread] Current Thread [Next in Thread]