lightning
[Top][All Lists]
Advanced

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

Re: Check results on PowerPC


From: Paul Cercueil
Subject: Re: Check results on PowerPC
Date: Sat, 20 Aug 2022 17:58:42 +0200

Hi Paulo,

Le ven., août 19 2022 at 09:44:50 -0300, Paulo César Pereira de Andrade <paulo.cesar.pereira.de.andrade@gmail.com> a écrit :
Em sex., 19 de ago. de 2022 às 04:47, Paul Cercueil
<paul@crapouillou.net> escreveu:

  Hi Paul,

 >>  I don't know if that's a known thing, but there are several
 >> breakages
 >>  on PowerPC (PPC32BE):
 >
 >   What operating system?

 Linux, under qemu-user.

 >>  FAIL: 3to2
...

  Please confirm running:

$ cpp -dM /dev/null | grep _CALL

prints a definition for _CALL_SYSV

I do get _CALL_SYSV set to 1, yes.


  Maybe it is some different processor that lacks some feature,
or uses a different abi.

  It might also be a problem with glibc, as it might be an issue
only with variadic functions, in this case, printf, that might be
expecting float values in float registers for variadic arguments.

  If yes, please test this reduced test:

"""
.data    32
dfmt:
.c    "%1.0f\n"

.code
    jmpi main

#define def_test_double(a, b, c)        \
    name test_double_##a##_##b##_##c    \
test_double_##a##_##b##_##c:            \
    prolog                    \
    arg_d $d0                \
    arg_d $d1                \
    getarg_d %b $d0                \
    getarg_d %c $d1                \
    subr_d %a %b %c                \
    retr_d %a                \
    epilog
#define test_double(a, b, c, x, y)        \
    prepare                    \
        pushargi_d x            \
        pushargi_d y            \
    finishi test_double_##a##_##b##_##c    \
    retval_d %f0                \
    prepare                    \
        pushargi dfmt            \
        ellipsis            \
        pushargr_d %f0            \
    finishi @printf

def_test_double(f0, f0, f0)

    name main
main:
    prolog
    test_double(f0, f0, f0, 3.0, 2.0)
    ret
    epilog
"""

and run it as:

$ cd check
$ make debug
...
(gdb) break _jit_emit
(gdb) run test.tst  # << assuming you called the sample file test.tst
...
(gdb) finish
(gdb) x/48i _jit.code.ptr

  Please copy&paste the output.

So I could not test it with the 'make debug' GDB instance because I'm running things in qemu-user, so my host's GDB is for x86_64 while my check/lightning binary is ppc.

When I run the test program like this: 'check/lightning check/test.tst'
It just prints '0'.

I believe I'll need to cross-compile GDB to ppc and run it with qemu-user.

Cheers,
-Paul

  You might truncate it as it should be less than 48 instructions.

Actually I tested at the lightning-2.1.3 tag now, and these tests fail
 as well.

 >   Apparently it is an issue with floating point registers.

 I think so too.

 Cheers,
 -Paul







reply via email to

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