[PATCH v4 12/12] LoongArch Port: Add doc.

2021-12-24 Thread chenglulu
* contrib/config-list.mk: Add LoongArch triplet. * gcc/doc/install.texi: Add LoongArch options section. * gcc/doc/invoke.texi: Add LoongArch options section. * gcc/doc/md.texi: Add LoongArch options section. --- contrib/config-list.mk | 5 +- gcc/doc/install.texi

[PATCH v4 06/12] LoongArch Port: Builtin functions.

2021-12-24 Thread chenglulu
gcc/ * config/loongarch/larchintrin.h: New file. * config/loongarch/loongarch-builtins.c: New file. --- gcc/config/loongarch/larchintrin.h| 413 + gcc/config/loongarch/loongarch-builtins.c | 511 ++ 2 files changed, 924 insertions(+)

[PATCH v4 10/12] LoongArch Port: libgomp

2021-12-24 Thread chenglulu
libgomp/ * configure.tgt: Add LoongArch triplet. --- libgomp/configure.tgt | 4 1 file changed, 4 insertions(+) diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt index d4f1e741b5a..2cd7272fcd8 100644 --- a/libgomp/configure.tgt +++ b/libgomp/configure.tgt @@ -56,6 +56,10

[PATCH v4 07/12] LoongArch Port: Builtin macros.

2021-12-24 Thread chenglulu
gcc/ *config/loongarch/loongarch-c.c --- gcc/config/loongarch/loongarch-c.c | 111 + 1 file changed, 111 insertions(+) create mode 100644 gcc/config/loongarch/loongarch-c.c diff --git a/gcc/config/loongarch/loongarch-c.c b/gcc/config/loongarch/loongarch-c.c

[PATCH v4 00/12] Add LoongArch support.

2021-12-24 Thread chenglulu
. 4. Change GLIBC_DYNAMIC_LINKER_LP64 name. v2 -> v3 1. Change some code style. 2. Bug fix. v3 -> v4 1. Change some code style. 2. Bug fix. 3. Delete some builtin macros. Add LoongArch support. chenglulu (12): LoongArch Port: Regenerate configure LoongArch Port: gcc build Loong

[PATCH v4 03/12] LoongArch Port: Regenerate gcc/configure.

2021-12-24 Thread chenglulu
--- gcc/configure | 85 +++ 1 file changed, 79 insertions(+), 6 deletions(-) diff --git a/gcc/configure b/gcc/configure index 992a9d70092..999557a3b51 100755 --- a/gcc/configure +++ b/gcc/configure @@ -5352,7 +5352,26 @@ else

[PATCH v4 01/12] LoongArch Port: Regenerate configure

2021-12-24 Thread chenglulu
* config/picflag.m4: Default add build option '-fpic' for LoongArch. * configure: Add LoongArch tuples. * configure.ac: Like wise. --- config/picflag.m4 | 3 +++ configure | 10 +- configure.ac | 10 +- 3 files changed, 21 insertions(+), 2

[PATCH v4 09/12] LoongArch Port: Regenerate libgcc/configure.

2021-12-24 Thread chenglulu
--- libgcc/configure | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgcc/configure b/libgcc/configure index 4919a56f518..ce04c4f529f 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -2412,6 +2412,9 @@ case "${host}" in # sets the default TLS model and

[PATCH v4 02/12] LoongArch Port: gcc build

2021-12-24 Thread chenglulu
gcc/ * common/config/loongarch/loongarch-common.c: New file. * config/loongarch/genopts/genstr.sh: New file. * config/loongarch/genopts/loongarch-strings: New file. * config/loongarch/genopts/loongarch.opt.in: New file. * config/loongarch/gnu-user.h: New

[PATCH v4 08/12] LoongArch Port: libgcc

2021-12-24 Thread chenglulu
libgcc/ * config/loongarch/crtfastmath.c: New file. * config/loongarch/crti.S: Like wise. * config/loongarch/crtn.S: Like wise. * config/loongarch/lib2funcs.c: Like wise. * config/loongarch/linux-unwind.h: Like wise. *

[PATCH v4 11/12] LoongArch Port: gcc/testsuite

2021-12-24 Thread chenglulu
gcc/testsuite/ * g++.dg/cpp0x/constexpr-rom.C: Add build options for LoongArch. * g++.old-deja/g++.abi/ptrmem.C: Add LoongArch support. * g++.old-deja/g++.pt/ptrmem6.C: xfail for LoongArch. * gcc.dg/20020312-2.c: Add LoongArch support. * gcc.dg/loop-8.c:

[PATCH 10/12] LoongArch Port: gcc/testsuite

2021-11-27 Thread chenglulu
gcc/testsuite/ * g++.dg/cpp0x/constexpr-rom.C: Add build options for LoongArch. * g++.old-deja/g++.abi/ptrmem.C: Add LoongArch support. * g++.old-deja/g++.pt/ptrmem6.C: xfail for LoongArch. * gcc.dg/20020312-2.c: Add LoongArch support. * gcc.dg/loop-8.c:

[PATCH 06/12] LoongArch Port: Builtin macros.

2021-11-27 Thread chenglulu
gcc/ *config/loongarch/loongarch-c.c --- gcc/config/loongarch/loongarch-c.c | 136 + 1 file changed, 136 insertions(+) create mode 100644 gcc/config/loongarch/loongarch-c.c diff --git a/gcc/config/loongarch/loongarch-c.c b/gcc/config/loongarch/loongarch-c.c

[PATCH 08/12] LoongArch Port: Regenerate libgcc/configure.

2021-11-27 Thread chenglulu
--- libgcc/configure | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgcc/configure b/libgcc/configure index 4919a56f518..ce04c4f529f 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -2412,6 +2412,9 @@ case "${host}" in # sets the default TLS model and

[PATCH 09/12] LoongArch Port: libgomp

2021-11-27 Thread chenglulu
libgomp/ * configure.tgt: Add LoongArch triplet. --- libgomp/configure.tgt | 4 1 file changed, 4 insertions(+) diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt index d4f1e741b5a..2cd7272fcd8 100644 --- a/libgomp/configure.tgt +++ b/libgomp/configure.tgt @@ -56,6 +56,10

[PATCH 11/12] LoongArch Port: Regenerate configure

2021-11-27 Thread chenglulu
* config/picflag.m4: Default add build option '-fpic' for LoongArch. * configure: Add LoongArch tuples. * configure.ac: Like wise. --- config/picflag.m4 | 3 +++ configure | 10 +- configure.ac | 10 +- 3 files changed, 21 insertions(+), 2

[PATCH 05/12] LoongArch Port: Builtin functions.

2021-11-27 Thread chenglulu
gcc/ * config/loongarch/larchintrin.h: New file. * config/loongarch/loongarch-builtins.c: New file. --- gcc/config/loongarch/larchintrin.h| 413 + gcc/config/loongarch/loongarch-builtins.c | 511 ++ 2 files changed, 924 insertions(+)

[PATCH 12/12] LoongArch Port: Add doc.

2021-11-27 Thread chenglulu
* contrib/config-list.mk: Add LoongArch triplet. * gcc/doc/install.texi: Add LoongArch options section. * gcc/doc/invoke.texi: Add LoongArch options section. * gcc/doc/md.texi: Add LoongArch options section. --- contrib/config-list.mk | 5 +- gcc/doc/install.texi

[PATCH 02/12] LoongArch Port: Regenerate gcc/configure.

2021-11-27 Thread chenglulu
--- gcc/configure | 66 ++- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/gcc/configure b/gcc/configure index 74b9d9be4c8..6e53dec9663 100755 --- a/gcc/configure +++ b/gcc/configure @@ -5317,6 +5317,9 @@ case "${target}" in

LoongArch Port

2021-11-27 Thread chenglulu
/commit/aacb0bf860f02aa5a7dcb76dd0e392bf871c7586 (will be submitted to upstream soon) chenglulu (12): LoongArch Port: gcc build LoongArch Port: Regenerate gcc/configure. LoongArch Port: Machine Decsription files. LoongArch Port: Machine description C files and .h LoongArch Port: Builtin functions

[PATCH 01/12] LoongArch Port: gcc build

2021-11-27 Thread chenglulu
gcc/ * common/config/loongarch/loongarch-common.c: New file. * config/loongarch/genopts/genstr.sh: New file. * config/loongarch/genopts/loongarch-strings: New file. * config/loongarch/genopts/loongarch.opt.in: New file. * config/loongarch/gnu-user.h: New

[PATCH 07/12] LoongArch Port: libgcc

2021-11-27 Thread chenglulu
libgcc/ * config/loongarch/crtfastmath.c: New file. * config/loongarch/crti.S: Like wise. * config/loongarch/crtn.S: Like wise. * config/loongarch/lib2funcs.c: Like wise. * config/loongarch/linux-unwind.h: Like wise. *

[PATCH v9 01/12] LoongArch Port: Regenerate configure

2022-03-19 Thread chenglulu
* config/picflag.m4: Default add build option '-fpic' for LoongArch. * configure: Add LoongArch tuples. * configure.ac: Like wise. --- config/picflag.m4 | 3 +++ configure | 10 +- configure.ac | 10 +- 3 files changed, 21 insertions(+), 2

[PATCH v9 06/12] LoongArch Port: Builtin functions.

2022-03-19 Thread chenglulu
gcc/ * config/loongarch/larchintrin.h: New file. * config/loongarch/loongarch-builtins.cc: New file. --- gcc/config/loongarch/larchintrin.h | 409 + gcc/config/loongarch/loongarch-builtins.cc | 511 + 2 files changed, 920 insertions(+)

[PATCH v9 11/12] LoongArch Port: gcc/testsuite

2022-03-19 Thread chenglulu
gcc/testsuite/ * g++.dg/cpp0x/constexpr-rom.C: Add build options for LoongArch. * g++.old-deja/g++.abi/ptrmem.C: Add LoongArch support. * g++.old-deja/g++.pt/ptrmem6.C: xfail for LoongArch. * gcc.dg/20020312-2.c: Add LoongArch support. *

[PATCH v9 08/12] LoongArch Port: libgcc

2022-03-19 Thread chenglulu
libgcc/ * config/loongarch/crtfastmath.c: New file. * config/loongarch/linux-unwind.h: Like wise. * config/loongarch/sfp-machine.h: Like wise. * config/loongarch/t-crtstuff: Like wise. * config/loongarch/t-loongarch: Like wise. *

[PATCH v9 12/12] LoongArch Port: Add doc.

2022-03-19 Thread chenglulu
* contrib/config-list.mk: Add LoongArch triplet. * gcc/doc/install.texi: Add LoongArch options section. * gcc/doc/invoke.texi: Add LoongArch options section. * gcc/doc/md.texi: Add LoongArch options section. --- contrib/config-list.mk | 4 +- gcc/doc/install.texi

[PATCH v9 10/12] LoongArch Port: libgomp

2022-03-19 Thread chenglulu
libgomp/ * configure.tgt: Add LoongArch triplet. --- libgomp/configure.tgt | 4 1 file changed, 4 insertions(+) diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt index d4f1e741b5a..2cd7272fcd8 100644 --- a/libgomp/configure.tgt +++ b/libgomp/configure.tgt @@ -56,6 +56,10

[PATCH v9 02/12] LoongArch Port: gcc build

2022-03-19 Thread chenglulu
gcc/ * common/config/loongarch/loongarch-common.cc: New file. * config/loongarch/genopts/genstr.sh: New file. * config/loongarch/genopts/loongarch-strings: New file. * config/loongarch/genopts/loongarch.opt.in: New file. * config/loongarch/loongarch-str.h:

[PATCH v9 00/12] Add LoongArch support.

2022-03-19 Thread chenglulu
7 -> v8 1. Add new addressing type ADDRESS_REG_REG support. 2. Modify documentation. 3. Eliminate compile-time warnings. v8 -> v9 1. Undefine the hook TARGET_TRULY_NOOP_TRUNCATION under the architecture. 2. Delete some unsed hooks. 3. Change some code style. 4. Modify documentation. *** BLURB

[PATCH v9 07/12] LoongArch Port: Builtin macros.

2022-03-19 Thread chenglulu
gcc/ * config/loongarch/loongarch-c.cc --- gcc/config/loongarch/loongarch-c.cc | 109 1 file changed, 109 insertions(+) create mode 100644 gcc/config/loongarch/loongarch-c.cc diff --git a/gcc/config/loongarch/loongarch-c.cc

[PATCH v9 03/12] LoongArch Port: Regenerate gcc/configure.

2022-03-19 Thread chenglulu
gcc/ * configure: Regenerate file. --- gcc/configure | 66 ++- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/gcc/configure b/gcc/configure index 14b19c8fe0c..1c1195e95cb 100755 --- a/gcc/configure +++ b/gcc/configure @@

[PATCH v9 09/12] LoongArch Port: Regenerate libgcc/configure.

2022-03-19 Thread chenglulu
libgcc/ * configure: Regenerate file. --- libgcc/configure | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgcc/configure b/libgcc/configure index 52bf25d4e94..1f9b2ac578b 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -2403,6 +2403,9 @@ case "${host}"

[PATCH v10 12/12] LoongArch Port: Add doc.

2022-03-24 Thread chenglulu
* contrib/config-list.mk: Add LoongArch triplet. * gcc/doc/install.texi: Add LoongArch options section. * gcc/doc/invoke.texi: Add LoongArch options section. * gcc/doc/md.texi: Add LoongArch options section. --- contrib/config-list.mk | 4 +- gcc/doc/install.texi

[PATCH v10 03/12] LoongArch Port: Regenerate gcc/configure.

2022-03-24 Thread chenglulu
gcc/ * configure: Regenerate file. --- gcc/configure | 66 ++- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/gcc/configure b/gcc/configure index 14b19c8fe0c..1c1195e95cb 100755 --- a/gcc/configure +++ b/gcc/configure @@

[PATCH v10 10/12] LoongArch Port: libgomp

2022-03-24 Thread chenglulu
libgomp/ * configure.tgt: Add LoongArch triplet. --- libgomp/configure.tgt | 4 1 file changed, 4 insertions(+) diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt index d4f1e741b5a..2cd7272fcd8 100644 --- a/libgomp/configure.tgt +++ b/libgomp/configure.tgt @@ -56,6 +56,10

[PATCH v10 07/12] LoongArch Port: Builtin macros.

2022-03-24 Thread chenglulu
gcc/ * config/loongarch/loongarch-c.cc --- gcc/config/loongarch/loongarch-c.cc | 109 1 file changed, 109 insertions(+) create mode 100644 gcc/config/loongarch/loongarch-c.cc diff --git a/gcc/config/loongarch/loongarch-c.cc

[PATCH v10 09/12] LoongArch Port: Regenerate libgcc/configure.

2022-03-24 Thread chenglulu
libgcc/ * configure: Regenerate file. --- libgcc/configure | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgcc/configure b/libgcc/configure index 52bf25d4e94..1f9b2ac578b 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -2403,6 +2403,9 @@ case "${host}"

[PATCH v10 00/12] Add LoongArch support.

2022-03-24 Thread chenglulu
t; v10 1. Modify code style. *** BLURB HERE *** chenglulu (12): LoongArch Port: Regenerate configure LoongArch Port: gcc build LoongArch Port: Regenerate gcc/configure. LoongArch Port: Machine description files. LoongArch Port: Machine description C files and .h files. LoongArch Port: Bui

[PATCH v10 01/12] LoongArch Port: Regenerate configure

2022-03-24 Thread chenglulu
* config/picflag.m4: Default add build option '-fpic' for LoongArch. * configure: Add LoongArch tuples. * configure.ac: Like wise. --- config/picflag.m4 | 3 +++ configure | 10 +- configure.ac | 10 +- 3 files changed, 21 insertions(+), 2

[PATCH v10 08/12] LoongArch Port: libgcc

2022-03-24 Thread chenglulu
libgcc/ * config/loongarch/crtfastmath.c: New file. * config/loongarch/linux-unwind.h: Like wise. * config/loongarch/sfp-machine.h: Like wise. * config/loongarch/t-crtstuff: Like wise. * config/loongarch/t-loongarch: Like wise. *

[PATCH v10 02/12] LoongArch Port: gcc build

2022-03-24 Thread chenglulu
gcc/ * common/config/loongarch/loongarch-common.cc: New file. * config/loongarch/genopts/genstr.sh: New file. * config/loongarch/genopts/loongarch-strings: New file. * config/loongarch/genopts/loongarch.opt.in: New file. * config/loongarch/loongarch-str.h:

[PATCH v10 06/12] LoongArch Port: Builtin functions.

2022-03-24 Thread chenglulu
gcc/ * config/loongarch/larchintrin.h: New file. * config/loongarch/loongarch-builtins.cc: New file. --- gcc/config/loongarch/larchintrin.h | 355 + gcc/config/loongarch/loongarch-builtins.cc | 424 + 2 files changed, 779 insertions(+)

[PATCH v10 11/12] LoongArch Port: gcc/testsuite

2022-03-24 Thread chenglulu
gcc/testsuite/ * g++.dg/cpp0x/constexpr-rom.C: Add build options for LoongArch. * g++.old-deja/g++.abi/ptrmem.C: Add LoongArch support. * g++.old-deja/g++.pt/ptrmem6.C: xfail for LoongArch. * gcc.dg/20020312-2.c: Add LoongArch support. *

[PATCH v6 07/12] LoongArch Port: Builtin macros.

2022-01-28 Thread chenglulu
gcc/ *config/loongarch/loongarch-c.cc --- gcc/config/loongarch/loongarch-c.cc | 109 1 file changed, 109 insertions(+) create mode 100644 gcc/config/loongarch/loongarch-c.cc diff --git a/gcc/config/loongarch/loongarch-c.cc

[PATCH v6 03/12] LoongArch Port: Regenerate gcc/configure.

2022-01-28 Thread chenglulu
--- gcc/configure | 66 ++- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/gcc/configure b/gcc/configure index bd4d4721868..3823bc4e783 100755 --- a/gcc/configure +++ b/gcc/configure @@ -5442,6 +5442,9 @@ case "${target}" in

[PATCH v6 06/12] LoongArch Port: Builtin functions.

2022-01-28 Thread chenglulu
gcc/ * config/loongarch/larchintrin.h: New file. * config/loongarch/loongarch-builtins.cc: New file. --- gcc/config/loongarch/larchintrin.h | 413 + gcc/config/loongarch/loongarch-builtins.cc | 511 + 2 files changed, 924 insertions(+)

[PATCH v6 11/12] LoongArch Port: gcc/testsuite

2022-01-28 Thread chenglulu
gcc/testsuite/ * g++.dg/cpp0x/constexpr-rom.C: Add build options for LoongArch. * g++.old-deja/g++.abi/ptrmem.C: Add LoongArch support. * g++.old-deja/g++.pt/ptrmem6.C: xfail for LoongArch. * gcc.dg/20020312-2.c: Add LoongArch support. * gcc.dg/loop-8.c:

[PATCH v6 10/12] LoongArch Port: libgomp

2022-01-28 Thread chenglulu
libgomp/ * configure.tgt: Add LoongArch triplet. --- libgomp/configure.tgt | 4 1 file changed, 4 insertions(+) diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt index d4f1e741b5a..2cd7272fcd8 100644 --- a/libgomp/configure.tgt +++ b/libgomp/configure.tgt @@ -56,6 +56,10

[PATCH v6 09/12] LoongArch Port: Regenerate libgcc/configure.

2022-01-28 Thread chenglulu
--- libgcc/configure | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgcc/configure b/libgcc/configure index 4919a56f518..ce04c4f529f 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -2412,6 +2412,9 @@ case "${host}" in # sets the default TLS model and

[PATCH v6 00/12] Add LoongArch support.

2022-01-28 Thread chenglulu
in macros. v4 -> v5 1. delete wrong insn zero_extendsidi2_internal. 2. Adjust some build options. 3. Change some .c files to .cc. v5 -> v6 1. Fix compilation issues. The generated files *.opt and *.h are generated to $(objdir). chenglulu (12): LoongArch Port: Regenerate configure Loon

[PATCH v6 01/12] LoongArch Port: Regenerate configure

2022-01-28 Thread chenglulu
* config/picflag.m4: Default add build option '-fpic' for LoongArch. * configure: Add LoongArch tuples. * configure.ac: Like wise. --- config/picflag.m4 | 3 +++ configure | 10 +- configure.ac | 10 +- 3 files changed, 21 insertions(+), 2

[PATCH v6 12/12] LoongArch Port: Add doc.

2022-01-28 Thread chenglulu
* contrib/config-list.mk: Add LoongArch triplet. * gcc/doc/install.texi: Add LoongArch options section. * gcc/doc/invoke.texi: Add LoongArch options section. * gcc/doc/md.texi: Add LoongArch options section. --- contrib/config-list.mk | 5 +- gcc/doc/install.texi

[PATCH v6 02/12] LoongArch Port: gcc build

2022-01-28 Thread chenglulu
gcc/ * common/config/loongarch/loongarch-common.cc: New file. * config/loongarch/genopts/genstr.sh: New file. * config/loongarch/genopts/loongarch-strings: New file. * config/loongarch/genopts/loongarch.opt.in: New file. * config/loongarch/loongarch-str.h:

[PATCH v6 08/12] LoongArch Port: libgcc

2022-01-28 Thread chenglulu
libgcc/ * config/loongarch/crtfastmath.c: New file. * config/loongarch/crti.S: Like wise. * config/loongarch/crtn.S: Like wise. * config/loongarch/linux-unwind.h: Like wise. * config/loongarch/sfp-machine.h: Like wise. * config/loongarch/t-crtstuff:

Re: [PATCH v3 1/4] LoongArch: improved target configuration interface

2023-09-05 Thread chenglulu
在 2023/9/5 下午7:51, Xi Ruoyao 写道: On Thu, 2023-08-31 at 20:48 +0800, Yang Yujie wrote:  /* Note: optimize_size may vary across functions,     while -m[no]-memcpy imposes a global constraint.  */  #define TARGET_DO_OPTIMIZE_BLOCK_MOVE_P loongarch_do_optimize_block_move_p() -#ifndef

Re:[pushed] [PATCH v6 0/4] Add Loongson SX/ASX instruction support to LoongArch target.

2023-09-05 Thread chenglulu
Pushed to r14-3700. 在 2023/8/31 下午5:08, Chenghui Pan 写道: This is an update of: https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628303.html Changes since last version of patch set: - "dg-skip-if"-related Changes of the g++.dg/torture/vshuf* testcases are reverted. (Replaced by

Re: [PATCH v3 1/4] LoongArch: improved target configuration interface

2023-09-05 Thread chenglulu
在 2023/9/5 下午8:17, Xi Ruoyao 写道: On Tue, 2023-09-05 at 20:01 +0800, chenglulu wrote: 在 2023/9/5 下午7:51, Xi Ruoyao 写道: On Thu, 2023-08-31 at 20:48 +0800, Yang Yujie wrote:   /* Note: optimize_size may vary across functions, while -m[no]-memcpy imposes a global constraint

Re:[pushed] [PATCH v2] LoongArch: Support storing floating-point zero into MEM[base + index].

2023-09-03 Thread chenglulu
pushed to r14-3643. 在 2023/9/2 下午3:02, Guo Jie 写道: v2: Modify commit message. gcc/ChangeLog: * config/loongarch/loongarch.md: Support 'G' -> 'k' in movsf_hardfloat and movdf_hardfloat. gcc/testsuite/ChangeLog: * gcc.target/loongarch/const-double-zero-stx.c: New test.

Re:[pushed] [PATCH 1/2] LoongArch: Optimize switch with sign-extended index.

2023-09-03 Thread chenglulu
Pushed to r14-3642. The description information was modified and XLEN was changed to GRLEN. Thanks!:-) 在 2023/9/2 下午4:09, WANG Xuerui 写道: On 9/2/23 14:24, Lulu Cheng wrote: The patch refers to the submission of RISCV 7bbce9b50302959286381d9177818642bceaf301. gcc/ChangeLog: *

Re:[pushed] [PATCH v2] LoongArch: initial ada support on linux

2023-09-04 Thread chenglulu
Pushed to r14-3669. 在 2023/9/4 上午10:42, Yang Yujie 写道: gcc/ChangeLog: * ada/Makefile.rtl: Add LoongArch support. * ada/libgnarl/s-linux__loongarch.ads: New. * ada/libgnat/system-linux-loongarch.ads: New. * config/loongarch/loongarch.h: mark normalized options

Re:[pushed] [PATCH v3 0/4] LoongArch: target configuration interface update

2023-09-04 Thread chenglulu
Pushed to r14-3665. 在 2023/8/31 下午8:48, Yang Yujie 写道: This is an update of https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628772.html Changes since the last patchset: 1. Fix texinfo format of the install.texi document. 2. Add documentation for --with-strict-align-lib. v1 -> v2: 1.

Re: [PATCH v1 1/4] LoongArch: Add tests of -mstrict-align option.

2023-09-06 Thread chenglulu
在 2023/9/6 下午7:10, Xi Ruoyao 写道: On Wed, 2023-09-06 at 18:43 +0800, Xiaolong Chen wrote: gcc/testsuite/ChangeLog: * gcc.target/loongarch/strict-align.c: New test. A question: is there really a CPU model with LSX/LASX but without unaligned access support? If not I think we'd just

Re: [PATCH] LoongArch: Use bstrins instruction for (a & ~mask) and (a & mask) | (b & ~mask) [PR111252]

2023-09-06 Thread chenglulu
在 2023/9/6 下午6:58, Xi Ruoyao 写道: Forgot to mention: I've bootstrapped and regtested this patch on loongarch64-linux-gnu (with PR110939 patch applied to unbreak the bootstrapping). Ok for trunk? LGTM! Thanks! On Wed, 2023-09-06 at 18:46 +0800, Xi Ruoyao wrote: If mask is a constant

Re: [pushed][PATCH] LoongArch: Change the value of branch_cost from 2 to 6.

2023-09-14 Thread chenglulu
Pushed to r14-3977. 在 2023/9/13 上午11:11, Lulu Cheng 写道: gcc/ChangeLog: * config/loongarch/loongarch-def.c: Modify the default value of branch_cost. gcc/testsuite/ChangeLog: * gcc.target/loongarch/cmov_ii.c: New test. --- gcc/config/loongarch/loongarch-def.c

Re: [PATCH] LoongArch: Fix lo_sum rtx cost

2023-09-16 Thread chenglulu
在 2023/9/16 下午10:52, WANG Xuerui 写道: Hi, On 9/16/23 17:16, mengqinggang wrote: The cost of lo_sum rtx for addi.d instruction my be a very big number if computed by common function. It may cause some symbols saving to stack and loading from stack if there no enough registers during loop

Re: [PATCH v6] LoongArch:Implement 128-bit floating point functions in gcc.

2023-09-01 Thread chenglulu
Hi,RuoYao:  I have merged the V6 patch into trunk(r14-3635). If the generic optimization of copysignf128 cannot be solved,  we will mention the optimization code under the architecture again. Thanks! 在 2023/9/1 上午11:22, chenxiaolong 写道: Brief version history of patch set: v1 -> v2:

Re: [PATCH] LoongArch: Use LSX and LASX for block move

2023-09-09 Thread chenglulu
在 2023/9/8 上午12:14, Xi Ruoyao 写道: gcc/ChangeLog: * config/loongarch/loongarch.h (LARCH_MAX_MOVE_PER_INSN): Define to the maximum amount of bytes able to be loaded or stored with one machine instruction. * config/loongarch/loongarch.cc

Re: [PATCH] LoongArch: Slightly simplify loongarch_block_move_straight

2023-09-09 Thread chenglulu
在 2023/9/8 上午12:33, Xi Ruoyao 写道: gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_block_move_straight): Check precondition (delta must be a power of 2) and use popcount_hwi instead of a homebrew loop. --- I've not run a full bootstrap with this, but it

Re: [PATCH] LoongArch: Use LSX and LASX for block move

2023-09-09 Thread chenglulu
Hi,RuoYao:  I think the test example memcpy-vec-3.c submitted in r14-3818 is implemented incorrectly. The 16-byte length in this test example will cause can_move_by_pieces to return true when with '-mstrict-align', so no vector load instructions will be generated. 在 2023/9/8 上午12:14, Xi

Re: [PATCH] LoongArch: Use LSX and LASX for block move

2023-09-09 Thread chenglulu
在 2023/9/9 下午3:06, Xi Ruoyao 写道: On Sat, 2023-09-09 at 15:04 +0800, chenglulu wrote: Hi,RuoYao:   I think the test example memcpy-vec-3.c submitted in r14-3818 is implemented incorrectly. The 16-byte length in this test example will cause can_move_by_pieces to return true when

Re: [PATCH] LoongArch: Fix up memcpy-vec-3.c test case

2023-09-09 Thread chenglulu
LGTM! 在 2023/9/9 下午4:20, Xi Ruoyao 写道: The generic code will split 16-byte copy into two 8-byte copies, so the vector code wouldn't be used even if -mno-strict-align. This contradicted with the purpose of this test case. gcc/testsuite/ChangeLog: * gcc.target/loongarch/memcpy-vec-3.c:

Re: [PING][PATCH] LoongArch: initial ada support on linux

2023-08-30 Thread chenglulu
ping? 在 2023/8/25 下午1:55, Yujie Yang 写道: Hi! I'd like to ping this patch for acknowledgement from the Ada team. We have successfully compiled a cross-native toolchain with Ada enabled for loongarch64-linux-gnuf64 (or loongarch64-linux-gnu), and have run the regtests with the following

Re: [PATCH] LoongArch: gcc: Modify gas uleb128 support test.

2023-09-14 Thread chenglulu
Sorry, it's my problem. We will modify it as soon as possible. Thanks! 在 2023/9/14 下午7:45, Xi Ruoyao 写道: On Thu, 2023-09-14 at 19:21 +0800, Lulu Cheng wrote: diff --git a/gcc/configure.ac b/gcc/configure.ac index 09082e8ccae..072fe1d2b48 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@

Re:[pushed] [PATCH v4 00/22] Added support for ASX vector instructions.

2023-09-13 Thread chenglulu
Pushed to r14-3951. 在 2023/9/13 上午11:38, Xiaolong Chen 写道: In order to better test the function of the vector instruction, the 256 bit test cases are further split according to the function of the instruction. Xiaolong Chen (22): LoongArch: Add tests for ASX vector

Re:[pushed] [PATCH v4 00/23] Add tests for SX vector instructions.

2023-09-13 Thread chenglulu
Pushed to r14-3928. 在 2023/9/13 上午11:31, Xiaolong Chen 写道: v3 -> v4: Modify the name of the patch file. In order to better test the function of the vector instruction, the 128 bit test cases are further split according to the function of the instruction. Xiaolong Chen (23):

Re: [pushed][PATCH v2] LoongArch: Fix bug of 'di3_fake'.

2023-09-13 Thread chenglulu
Pushed to r14-3974. 在 2023/9/13 上午8:54, Lulu Cheng 写道: PR 111334 gcc/ChangeLog: * config/loongarch/loongarch.md: Fix bug of 'di3_fake'. gcc/testsuite/ChangeLog: * gcc.target/loongarch/pr111334.c: New test. --- v1 -> v2: Modify the template "*3", the

Re: [pushed][PATCH] LoongArch: Reimplement multilib build option handling.

2023-09-14 Thread chenglulu
Pushed to r14-4009. 在 2023/9/13 下午5:52, Yang Yujie 写道: Library build options from --with-multilib-list used to be processed with *self_spec, which missed the driver's initial canonicalization. This caused limitations on CFLAGS override and the use of driver-only options like -m[no]-lsx. The

Re: [pushed][PATCH v2] LoongArch: Adjust C++ multilib header layout.

2023-09-08 Thread chenglulu
PUshed to r14-3803. 在 2023/9/7 下午2:50, Yang Yujie 写道: For LoongArch, the toplevel library build is always aliased to one of the multilib variants. This patch installs it with the actual MULTISUBDIR (instead of ".") so that the headers can be reached by the compiler. This patch is an update of

Re:[pushed] [PATCH] LoongArch: Fix unintentional bash-ism in r14-3665.

2023-09-08 Thread chenglulu
Pushed to r14-3804. 在 2023/9/6 下午8:19, Richard Sandiford 写道: Yang Yujie writes: gcc/ChangeLog: * config.gcc: remove non-POSIX syntax "<<<". OK. Thanks for the quick fix. Richard. --- gcc/config.gcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re:[pushed] [PATCH] LoongArch: Enable -fsched-pressure by default at -O1 and higher.

2023-09-08 Thread chenglulu
Pushed to r14-3805. 在 2023/9/8 下午4:32, Xi Ruoyao 写道: On Fri, 2023-09-08 at 16:29 +0800, Guo Jie wrote: Hi, What I wanna change is "gcc/common/config/loongarch/loongarch- common.cc", and the patch is automatically generated by "git gcc-commit-mklog". Is it necessary to  to remove "common/" ?

Re: [pushed][PATCH v1] LoongArch: Fix vec_initv32qiv16qi template to avoid ICE.

2023-10-16 Thread chenglulu
Pushed to r14-4675. 在 2023/10/11 下午4:41, Chenghui Pan 写道: Following test code triggers unrecognized insn ICE on LoongArch target with "-O3 -mlasx": void foo (unsigned char *dst, unsigned char *src) { for (int y = 0; y < 16; y++) { for (int x = 0; x < 16; x++) dst[x] =

Re:[pushed] [PATCH v2] LoongArch: Delete macro definition ASM_OUTPUT_ALIGN_WITH_NOP.

2023-10-16 Thread chenglulu
Pushed to r14-4674. 在 2023/10/12 下午3:00, Lulu Cheng 写道: There are two reasons for removing this macro definition: 1. The default in the assembler is to use the nop instruction for filling. 2. For assembly directives: .align [abs-expr[, abs-expr[, abs-expr]]] The third expression it is the

Re: [pushed][PATCH v1] LoongArch: Fix vfrint-releated comments in lsxintrin.h and lasxintrin.h

2023-10-25 Thread chenglulu
Pushed to r14-4926. 在 2023/10/23 上午10:13, Chenghui Pan 写道: The comment of vfrint-related intrinsic functions does not match the return value type in definition. This patch fixes these comments. gcc/ChangeLog: * config/loongarch/lasxintrin.h (__lasx_xvftintrnel_l_s): Fix comments.

Re: [pushed][PATCH v1] LoongArch: Implement __builtin_thread_pointer for TLS.

2023-10-25 Thread chenglulu
Pushed to r14-4925. 在 2023/10/24 下午2:40, chenxiaolong 写道: gcc/ChangeLog: * config/loongarch/loongarch.md (get_thread_pointer):Adds the instruction template corresponding to the __builtin_thread_pointer function. * doc/extend.texi:Add the

Re: [PATCH] LoongArch: Remove redundant barrier instructions before LL-SC loops

2023-11-07 Thread chenglulu
在 2023/11/6 下午7:36, Xi Ruoyao 写道: This is isomorphic to the LLVM changes [1-2]. On LoongArch, the LL and SC instructions has memory barrier semantics: - LL: + - SC: + But the compare and swap operation is allowed to fail, and if it fails the SC instruction is not executed, thus the

Re: [PATCH] LoongArch: Define HAVE_AS_TLS to 0 if it's undefined

2023-10-30 Thread chenglulu
在 2023/10/30 下午8:26, Xi Ruoyao 写道: On Mon, 2023-10-30 at 19:50 +0800, chenglulu wrote: 在 2023/10/30 下午7:42, Xi Ruoyao 写道: Now loongarch.md uses HAVE_AS_TLS, we need this to fix the failure building a cross compiler if the cross assembler is not installed yet. gcc/ChangeLog

Re: [PATCH] LoongArch: Define HAVE_AS_TLS to 0 if it's undefined

2023-10-30 Thread chenglulu
在 2023/10/30 下午7:42, Xi Ruoyao 写道: Now loongarch.md uses HAVE_AS_TLS, we need this to fix the failure building a cross compiler if the cross assembler is not installed yet. gcc/ChangeLog: * config/loongarch/loongarch-opts.h (HAVE_AS_TLS): Define to 0 if not defined yet. ---

Re: [pushed][PATCH] LoongArch:Enable vcond_mask_mn expanders for SF/DF modes.

2023-10-26 Thread chenglulu
Pushed to r14-4939. 在 2023/10/23 下午5:46, Jiahao Xu 写道: If the vcond_mask patterns don't support fp modes, the vector FP comparison instructions will not be generated. gcc/ChangeLog: * config/loongarch/lasx.md (vcond_mask_): Change to (vcond_mask_): this. *

Re:[pushed] [PATCH 0/3] Optimize loongarch vector implementation.

2023-10-19 Thread chenglulu
Pushed to r14-4730. 在 2023/10/16 上午10:00, Jiahao Xu 写道: The following three patches further enhance loongarch’s vectorization capabilities. Patch one add LoongArch support for AVG_CEIL/FLOOR. Patch 2 add LoongArch support for vec_widen_mult/add/sub_lo/hi patterns. patch 3 make loongarch use

Re: [PATCH v1] LoongArch: Adjust the vector cost model for better performance

2023-09-18 Thread chenglulu
Hi,liwei:  It is best to add a test case. If the test case is really difficult to extract, then enrich the description information. Thanks! 在 2023/9/18 下午5:23, Li Wei 写道: gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_builtin_vectorization_cost): ---

Re: [pushed][PATCH v3] Modify gas uleb128 support test

2023-09-19 Thread chenglulu
Pushed to r14-4161. 在 2023/9/19 下午3:01, mengqinggang 写道: Some assemblers (GNU as for LoongArch) generates relocations for leb128 symbol arithmetic for relaxation, we need to disable relaxation probing leb128 support then. gcc/ChangeLog: * configure: Regenerate. * configure.ac:

Re: [pushed][PATCH v1] LoongArch: Check whether binutils supports the relax function. If supported, explicit relocs are turned off by default.

2023-09-19 Thread chenglulu
Pushed to r14-4160. 在 2023/9/15 上午10:40, Lulu Cheng 写道: gcc/ChangeLog: * config.in: Regenerate. * config/loongarch/genopts/loongarch.opt.in: Add compilation option mrelax. And set the initial value of explicit-relocs according to the detection status. *

Re:[pushed] [PATCH] LoongArch: Optimizations of vector construction.

2023-09-24 Thread chenglulu
Pushed to r14-4245. 在 2023/9/21 上午9:19, Guo Jie 写道: gcc/ChangeLog: * config/loongarch/lasx.md (lasx_vecinit_merge_): New pattern for vector construction. (vec_set_internal): Ditto. (lasx_xvinsgr2vr__internal): Ditto. (lasx_xvilvl__internal): Ditto.

Re: [PATCH v2] Modify gas uleb128 support test

2023-09-18 Thread chenglulu
在 2023/9/15 下午12:04, mengqinggang 写道: diff --git a/gcc/configure.ac b/gcc/configure.ac index cb4be11facd..10027a4 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -3229,10 +3229,18 @@ AC_MSG_RESULT($gcc_cv_ld_ro_rw_mix) gcc_AC_INITFINI_ARRAY +# Some assemblers (GNU as for

Re: [PATCH] LoongArch: Replace UNSPEC_FCOPYSIGN with copysign RTL

2023-10-03 Thread chenglulu
LGTM! Thanks! 在 2023/10/3 上午11:46, Xi Ruoyao 写道: When I added copysign support for LoongArch (r13-3702), we did not have a copysign RTL insn, so I had to use UNSPEC to represent the copysign instruction. Now the copysign RTX code has been added in r14-1586, so this patch removes those UNSPECs,

Re: [PATCH] LoongArch: doc: Update -m[no-]explicit-relocs for r14-4160

2023-09-25 Thread chenglulu
LGTM! Thank you for your modification! 在 2023/9/25 下午4:13, Xi Ruoyao 写道: gcc/ChangeLog: * doc/invoke.texi: Update -m[no-]explicit-relocs for r14-4160. --- I've not regtested this as it's only a doc change. Ok for trunk? gcc/doc/invoke.texi | 10 ++ 1 file changed, 6

Re: [pushed][PATCH v2] LoongArch: Adjust makefile dependency for loongarch headers.

2023-10-12 Thread chenglulu
Pushed to r14-4584. 在 2023/10/11 下午5:59, Yang Yujie 写道: gcc/ChangeLog: * config.gcc: Add loongarch-driver.h to tm_files. * config/loongarch/loongarch.h: Do not include loongarch-driver.h. * config/loongarch/t-loongarch: Append loongarch-multilib.h to $(GTM_H)

Re: [pushed][PATCH v3 0/2] LoongArch: Update target-supports.exp for LoongArch SX/ASX.

2023-10-12 Thread chenglulu
Pushed to r14-4585. 在 2023/9/28 下午6:05, Chenghui Pan 写道: This is the update of: https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631379.html This version does not include changes for codes, but fixes the commit title format and appends the missing PR info. Chenghui Pan (2):

Re: [PATCH] LoongArch: Use fcmp.caf.s instead of movgr2cf for zeroing a fcc

2023-10-17 Thread chenglulu
在 2023/10/17 下午10:24, WANG Xuerui 写道: On 10/17/23 22:06, Xi Ruoyao wrote: During the review of a LLVM change [1], on LA464 we found that zeroing "an" LLVM change (because the word LLVM is pronounced letter-by-letter) a fcc with fcmp.caf.s is much faster than a movgr2cf from $r0.

  1   2   3   4   >