lightning
[Top][All Lists]
Advanced

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

Re: Check results on PowerPC


From: Paulo César Pereira de Andrade
Subject: Re: Check results on PowerPC
Date: Fri, 19 Aug 2022 09:44:50 -0300

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

  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.

  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]