Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 30 Aug 2023 09:22:25 -0300
From: Matheus Tavares Bernardino <quic_mathbern@...cinc.com>
To: <musl@...ts.openwall.com>
CC: Brian Cain <bcain@...cinc.com>, Sid Manning <sidneym@...cinc.com>,
        "Rich
 Felker" <dalias@...c.org>, Fangrui Song <i@...kray.me>,
        Szabolcs Nagy
	<nsz@...t70.net>
Subject: [RFC PATCH 0/5] Add support to Hexagon DSP

Hi,

I'd like to restart the conversations from
https://marc.info/?l=musl&w=2&r=1&s=Hexagon+DSP+support&q=b about
adding Hexagon support to musl.

I've read the comments from the two previous iterations and it looks
like Sid has addressed them all already (please let me know if there is
something missing, though). So I've only rebased/reorganized the patches
with minor cleanup changes.

These patches are also available at my git tree:
https://github.com/quic/musl/tree/mathbern/to-upstream
You will noticed that this tree contains an extra downstream-only commit
at the tip, which is intended as a convenience for running libc-test
with musl + Hexagon (note that we use a small patch for libc-test).

Speaking of which, here is the latest src/REPORT from running the test
suite with these patches applied:
https://gist.github.com/quic-mathbern/e063344dd92e24f97c5a235e389495a3

More specifically, these are the failures we're still seeing and what
they might represent, according to a previous message from Rich
(https://marc.info/?l=musl&m=158697899609026):


"Atomics bugs or emulation being slow"
FAIL src/regression/pthread_cond-smasher-static.exe [status 1]
FAIL src/regression/pthread_cond-smasher.exe [status 1]

"Atomics bugs"
FAIL src/regression/pthread_cond_wait-cancel_ignored-static.exe [status 1]
FAIL src/regression/pthread_cond_wait-cancel_ignored.exe [status 1]

Unknown
FAIL src/functional/pthread_cancel-static.exe [timed out]
FAIL src/regression/tls_get_new-dtv.exe [status 1]

Expected: functionality not yet supported by musl?
FAIL src/functional/strptime.exe [status 1]
FAIL src/functional/strptime-static.exe [status 1]

Expected failures in qemu-user?
FAIL src/regression/malloc-brk-fail.exe [status 1]
FAIL src/functional/pthread_robust-static.exe [timed out]
FAIL src/functional/pthread_robust.exe [timed out]
FAIL src/regression/pthread-robust-detach-static.exe [status 1]
FAIL src/regression/pthread-robust-detach.exe [status 1]

Clang deficiency?
FAIL src/functional/dlopen.exe [status 1]

Target independent failures?
FAIL src/math/acoshl.exe [status 1]
FAIL src/math/asinhl.exe [status 1]
FAIL src/math/erfcl.exe [status 1]
FAIL src/math/exp2l.exe [status 1]
FAIL src/math/ilogb.exe [status 1]
FAIL src/math/ilogbf.exe [status 1]
FAIL src/math/ilogbl.exe [status 1]
FAIL src/math/lgammal.exe [status 1]
FAIL src/math/powf.exe [status 1]
FAIL src/math/powl.exe [status 1]
FAIL src/math/tgamma.exe [status 1]
FAIL src/math/tgammaf.exe [status 1]
FAIL src/math/tgammal.exe [status 1]
FAIL src/math/y0.exe [status 1]
FAIL src/math/y0f.exe [status 1]
FAIL src/math/y1.exe [status 1]
FAIL src/math/y1f.exe [status 1]
FAIL src/math/yn.exe [status 1]
FAIL src/math/ynf.exe [status 1]


I’ve revised all the hexagon atomics and they look right to me, so I
don’t know what could be causing those first four failing tests…

Any help and/or feedback will be highly appreciated!

Thanks in advance,
Matheus
(please keep me in CC, as I'm not subscribed)



Brian Cain (2):
  hexagon: add fenv header and implementation
  hexagon: add bits/user.h

Matheus Tavares Bernardino (1):
  INSTALL: add 'Hexagon' to list of supported targets

Sid Manning (2):
  Add support to Hexagon arch
  hexagon: add fma/fmaxf/fminf routines

 INSTALL                                |   2 +
 arch/hexagon/atomic_arch.h             | 191 +++++++++++++++
 arch/hexagon/bits/alltypes.h.in        |  18 ++
 arch/hexagon/bits/fenv.h               |  20 ++
 arch/hexagon/bits/float.h              |  16 ++
 arch/hexagon/bits/ipcstat.h            |   1 +
 arch/hexagon/bits/msg.h                |  18 ++
 arch/hexagon/bits/posix.h              |   2 +
 arch/hexagon/bits/sem.h                |  13 +
 arch/hexagon/bits/setjmp.h             |   1 +
 arch/hexagon/bits/shm.h                |  31 +++
 arch/hexagon/bits/signal.h             | 103 ++++++++
 arch/hexagon/bits/stat.h               |  20 ++
 arch/hexagon/bits/stdint.h             |  20 ++
 arch/hexagon/bits/syscall.h.in         | 327 +++++++++++++++++++++++++
 arch/hexagon/bits/user.h               |  60 +++++
 arch/hexagon/crt_arch.h                |  22 ++
 arch/hexagon/kstat.h                   |  21 ++
 arch/hexagon/pthread_arch.h            |  13 +
 arch/hexagon/reloc.h                   |  16 ++
 arch/hexagon/syscall_arch.h            |  78 ++++++
 configure                              |   1 +
 include/elf.h                          | 101 ++++++++
 src/fenv/hexagon/fenv.S                | 144 +++++++++++
 src/math/hexagon/fmaf.c                |   8 +
 src/math/hexagon/fmaxf.c               |   8 +
 src/math/hexagon/fminf.c               |   8 +
 src/setjmp/hexagon/longjmp.s           |  25 ++
 src/setjmp/hexagon/setjmp.s            |  24 ++
 src/signal/hexagon/restore.s           |  11 +
 src/signal/hexagon/sigsetjmp.s         |  28 +++
 src/thread/hexagon/__set_thread_area.s |   7 +
 src/thread/hexagon/__unmapself.s       |  11 +
 src/thread/hexagon/clone.s             |  37 +++
 src/thread/hexagon/syscall_cp.s        |  35 +++
 35 files changed, 1441 insertions(+)
 create mode 100644 arch/hexagon/atomic_arch.h
 create mode 100644 arch/hexagon/bits/alltypes.h.in
 create mode 100644 arch/hexagon/bits/fenv.h
 create mode 100644 arch/hexagon/bits/float.h
 create mode 100644 arch/hexagon/bits/ipcstat.h
 create mode 100644 arch/hexagon/bits/msg.h
 create mode 100644 arch/hexagon/bits/posix.h
 create mode 100644 arch/hexagon/bits/sem.h
 create mode 100644 arch/hexagon/bits/setjmp.h
 create mode 100644 arch/hexagon/bits/shm.h
 create mode 100644 arch/hexagon/bits/signal.h
 create mode 100644 arch/hexagon/bits/stat.h
 create mode 100644 arch/hexagon/bits/stdint.h
 create mode 100644 arch/hexagon/bits/syscall.h.in
 create mode 100644 arch/hexagon/bits/user.h
 create mode 100644 arch/hexagon/crt_arch.h
 create mode 100644 arch/hexagon/kstat.h
 create mode 100644 arch/hexagon/pthread_arch.h
 create mode 100644 arch/hexagon/reloc.h
 create mode 100644 arch/hexagon/syscall_arch.h
 create mode 100644 src/fenv/hexagon/fenv.S
 create mode 100644 src/math/hexagon/fmaf.c
 create mode 100644 src/math/hexagon/fmaxf.c
 create mode 100644 src/math/hexagon/fminf.c
 create mode 100644 src/setjmp/hexagon/longjmp.s
 create mode 100644 src/setjmp/hexagon/setjmp.s
 create mode 100644 src/signal/hexagon/restore.s
 create mode 100644 src/signal/hexagon/sigsetjmp.s
 create mode 100644 src/thread/hexagon/__set_thread_area.s
 create mode 100644 src/thread/hexagon/__unmapself.s
 create mode 100644 src/thread/hexagon/clone.s
 create mode 100644 src/thread/hexagon/syscall_cp.s

-- 
2.37.2

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.