This patchset is based on Zixing Liu's initial support patch:
https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631260.html

Updates
v1 -> v2: Rebased onto the dmd/druntime upstream state.
v2 -> v3: Dropped unnecessary changes.

Regtested on loongarch64-linux-gnu with the following result:

                === libphobos Summary ===

FAIL: libphobos.config/test22523.d -- --DRT-testmode=run-main execution test
FAIL: libphobos.gc/precisegc.d execution test
FAIL: libphobos.phobos/std/datetime/systime.d (test for excess errors)
UNRESOLVED: libphobos.phobos/std/datetime/systime.d compilation failed to 
produce executable
UNSUPPORTED: libphobos.phobos/std/net/curl.d: skipped test
UNSUPPORTED: libphobos.phobos_shared/std/net/curl.d: skipped test
FAIL: libphobos.shared/loadDR.c -ldl -pthread -g execution test (out-of-tree 
testing)

# of expected passes            1024
# of unexpected failures        4
# of unresolved testcases       1
# of unsupported tests          2

                === gdc Summary ===

FAIL: gdc.test/runnable/testaa.d   execution test
FAIL: gdc.test/runnable/testaa.d -fPIC   execution test

# of expected passes            10353
# of unexpected failures        2
# of unsupported tests          631


Yang Yujie (2):
  libruntime: Add fiber context switch code for LoongArch.
  libphobos: Update build scripts for LoongArch64.

 libphobos/configure                           |  21 ++-
 libphobos/libdruntime/Makefile.am             |   3 +
 libphobos/libdruntime/Makefile.in             |  98 ++++++++-----
 .../config/loongarch/switchcontext.S          | 133 ++++++++++++++++++
 libphobos/m4/druntime/cpu.m4                  |   5 +
 5 files changed, 220 insertions(+), 40 deletions(-)
 create mode 100644 libphobos/libdruntime/config/loongarch/switchcontext.S

-- 
2.43.0

Reply via email to