[PATCH 1/3] Allow default libc to be specified to configure

2023-02-04 Thread Keith Packard via Gcc-patches
The default C library is normally computed based on the target triplet. However, for embedded systems, it can be useful to leave the triplet alone while changing which C library is used by default. Other C libraries may still be available on the system so the compiler and can be used by specifying

[PATCH 3/3] Add '--oslib=' option when default C library is picolibc

2023-02-04 Thread Keith Packard via Gcc-patches
This option allows targets to insert an OS library after the C library in the LIB_PATH spec file fragment. This library maps a few POSIX APIs used by picolibc to underlying system capabilities. For example, picolibc provides 'libsemihost' on various targets which maps these APIs to semihosting

[PATCH 0/3] picolibc: Add picolibc linking help (v3)

2023-02-04 Thread Keith Packard via Gcc-patches
Picolibc is a C library for embedded systems based on code from newlib and avr libc. To connect some system-dependent picolibc functions (like stdio) to an underlying platform, the platform may provide an OS library. This OS library must follow the C library in the link command line. In current

[PATCH 2/3] Add newlib and picolibc as default C library choices

2023-02-04 Thread Keith Packard via Gcc-patches
Signed-off-by: Keith Packard --- gcc/config.gcc | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index 0679a76bebb..84bca8df615 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -661,7 +661,7 @@ case ${target} in esac # Common

Re: [PATCH] c++: equivalence of non-dependent calls [PR107461]

2023-02-04 Thread Jason Merrill via Gcc-patches
On 2/4/23 20:41, Jason Merrill wrote: On 2/4/23 20:08, Patrick Palka wrote: On Sat, 4 Feb 2023, Jason Merrill wrote: On 2/4/23 15:31, Patrick Palka wrote: After r13-5684-g59e0376f607805 the (pruned) callee of a non-dependent CALL_EXPR is a bare FUNCTION_DECL rather than ADDR_EXPR of

[PATCH] RISC-V: Add vsadd.vv C API tests

2023-02-04 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/vsadd_vv-1.c: New test. * gcc.target/riscv/rvv/base/vsadd_vv-2.c: New test. * gcc.target/riscv/rvv/base/vsadd_vv-3.c: New test. * gcc.target/riscv/rvv/base/vsadd_vv_m-1.c: New test. *

[PATCH] RISC-V: Add vsaddu.vv C API tests

2023-02-04 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/vsaddu_vv-1.c: New test. * gcc.target/riscv/rvv/base/vsaddu_vv-2.c: New test. * gcc.target/riscv/rvv/base/vsaddu_vv-3.c: New test. * gcc.target/riscv/rvv/base/vsaddu_vv_m-1.c: New test.

[PATCH] RISC-V: Add vssub.vv C API tests

2023-02-04 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/vssub_vv-1.c: New test. * gcc.target/riscv/rvv/base/vssub_vv-2.c: New test. * gcc.target/riscv/rvv/base/vssub_vv-3.c: New test. * gcc.target/riscv/rvv/base/vssub_vv_m-1.c: New test. *

[PATCH] RISC-V: Add vssubu.vv C API tests

2023-02-04 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/vssubu_vv-1.c: New test. * gcc.target/riscv/rvv/base/vssubu_vv-2.c: New test. * gcc.target/riscv/rvv/base/vssubu_vv-3.c: New test. * gcc.target/riscv/rvv/base/vssubu_vv_m-1.c: New test.

[PATCH] RISC-V: Add vssubu.vv C++ API tests

2023-02-04 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/testsuite/ChangeLog: * g++.target/riscv/rvv/base/vssubu_vv-1.C: New test. * g++.target/riscv/rvv/base/vssubu_vv-2.C: New test. * g++.target/riscv/rvv/base/vssubu_vv-3.C: New test. * g++.target/riscv/rvv/base/vssubu_vv_mu-1.C: New test.

[PATCH] RISC-V: Add vsub.vv C++ API tests

2023-02-04 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/testsuite/ChangeLog: * g++.target/riscv/rvv/base/vssub_vv-1.C: New test. * g++.target/riscv/rvv/base/vssub_vv-2.C: New test. * g++.target/riscv/rvv/base/vssub_vv-3.C: New test. * g++.target/riscv/rvv/base/vssub_vv_mu-1.C: New test.

[PATCH] RISC-V: Add vsaddu.vv C++ API tests.

2023-02-04 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/testsuite/ChangeLog: * g++.target/riscv/rvv/base/vsaddu_vv-1.C: New test. * g++.target/riscv/rvv/base/vsaddu_vv-2.C: New test. * g++.target/riscv/rvv/base/vsaddu_vv-3.C: New test. * g++.target/riscv/rvv/base/vsaddu_vv_mu-1.C: New test.

[PATCH] RISC-V: Add vsadd.vv C++ API tests

2023-02-04 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/testsuite/ChangeLog: * g++.target/riscv/rvv/base/vsadd_vv-1.C: New test. * g++.target/riscv/rvv/base/vsadd_vv-2.C: New test. * g++.target/riscv/rvv/base/vsadd_vv-3.C: New test. * g++.target/riscv/rvv/base/vsadd_vv_mu-1.C: New test.

[PATCH] RISC-V: Add saturating Add && Sub vx constraint tests

2023-02-04 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/binop_vx_constraint-100.c: New test. * gcc.target/riscv/rvv/base/binop_vx_constraint-101.c: New test. * gcc.target/riscv/rvv/base/binop_vx_constraint-102.c: New test. *

[PATCH] RISC-V: Add saturating Addition && Subtraction C/C++ Support

2023-02-04 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/iterators.md: Add saturating Addition && Subtraction. * config/riscv/riscv-v.cc (has_vi_variant_p): Ditto. * config/riscv/riscv-vector-builtins-bases.cc (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h:

Re: [PATCH] c++: equivalence of non-dependent calls [PR107461]

2023-02-04 Thread Jason Merrill via Gcc-patches
On 2/4/23 20:08, Patrick Palka wrote: On Sat, 4 Feb 2023, Jason Merrill wrote: On 2/4/23 15:31, Patrick Palka wrote: After r13-5684-g59e0376f607805 the (pruned) callee of a non-dependent CALL_EXPR is a bare FUNCTION_DECL rather than ADDR_EXPR of FUNCTION_DECL. This innocent change revealed

Re: [PATCH] c++: equivalence of non-dependent calls [PR107461]

2023-02-04 Thread Patrick Palka via Gcc-patches
On Sat, 4 Feb 2023, Jason Merrill wrote: > On 2/4/23 15:31, Patrick Palka wrote: > > After r13-5684-g59e0376f607805 the (pruned) callee of a non-dependent > > CALL_EXPR is a bare FUNCTION_DECL rather than ADDR_EXPR of FUNCTION_DECL. > > This innocent change revealed that cp_tree_equal doesn't

Enable AVX512 512bit vectors by default on Zen4

2023-02-04 Thread Jan Hubicka via Gcc-patches
Hi, this patch enables AVX512 by default on Zen4. While internally 512 registers are splits into two 256 halves, 512 bit vectors reduces number of instructions to retire and has chance to improve paralelism. There are few tsvc benchmarks that improves significantly: runtime benchmark

Re: [PATCH] c++: equivalence of non-dependent calls [PR107461]

2023-02-04 Thread Jason Merrill via Gcc-patches
On 2/4/23 15:31, Patrick Palka wrote: After r13-5684-g59e0376f607805 the (pruned) callee of a non-dependent CALL_EXPR is a bare FUNCTION_DECL rather than ADDR_EXPR of FUNCTION_DECL. This innocent change revealed that cp_tree_equal doesn't first check dependentness of a CALL_EXPR before treating

[DOC PATCH] Document the VEC_PERM_EXPR tree code (and minor clean-ups).

2023-02-04 Thread Roger Sayle
This patch (primarily) documents the VEC_PERM_EXPR tree code in generic.texi. For ease of review, it is provided below as a pair of diffs. The first contains just the new text added to describe VEC_PERM_EXPR, the second tidies up this part of the documentation by sorting the tree codes into

[PATCH] c++: equivalence of non-dependent calls [PR107461]

2023-02-04 Thread Patrick Palka via Gcc-patches
After r13-5684-g59e0376f607805 the (pruned) callee of a non-dependent CALL_EXPR is a bare FUNCTION_DECL rather than ADDR_EXPR of FUNCTION_DECL. This innocent change revealed that cp_tree_equal doesn't first check dependentness of a CALL_EXPR before treating the callee as a dependent name, which

[pushed] wwwdocs: projects/beginner: Remove traces of Interix

2023-02-04 Thread Gerald Pfeifer
I ran into this by chance and found there are probably quite a bit more parts of https://gcc.gnu.org/projects/beginner.html that should be removed. Any volunteers to have a look? (Jeff, maybe you can help trim this a bit?) Gerald --- htdocs/projects/beginner.html | 4 +--- 1 file changed, 1

[PATCH v3] emit DW_AT_name for DW_TAG_GNU_formal_parameter_pack [PR70536]

2023-02-04 Thread Ed Catmur
Per http://wiki.dwarfstd.org/index.php?title=C%2B%2B0x:_Variadic_templates DW_TAG_GNU_formal_parameter_pack should have a DW_AT_name: 17$: DW_TAG_formal_parameter_pack DW_AT_name("args") 18$: DW_TAG_formal_parameter ! no DW_AT_name attribute

Re: [PATCH] minor optimization bug in basic_string move assignment

2023-02-04 Thread Jonathan Wakely via Gcc-patches
On Sat, 4 Feb 2023, 13:12 François Dumont via Libstdc++, < libstd...@gcc.gnu.org> wrote: > On 03/02/23 15:50, Jonathan Wakely wrote: > > On Wed, 25 Jan 2023 at 18:38, François Dumont > wrote: > >> Let's submit a proper patch proposal then. > >> > >> The occasion for me to ask if there is any

Re: [PATCH] minor optimization bug in basic_string move assignment

2023-02-04 Thread François Dumont via Gcc-patches
On 03/02/23 15:50, Jonathan Wakely wrote: On Wed, 25 Jan 2023 at 18:38, François Dumont wrote: Let's submit a proper patch proposal then. The occasion for me to ask if there is any reason for cow string not being C++11 allocator compliant ? Just lack of interest ? Mostly lack of interest,

Re: [PATCH] libstdc++: Avoid use of naked int32_t in unseq_backend_simd.h, PR108672

2023-02-04 Thread Jonathan Wakely via Gcc-patches
On Sat, 4 Feb 2023, 03:20 Hans-Peter Nilsson via Libstdc++, < libstd...@gcc.gnu.org> wrote: > Tested cris-elf and native x86_64-pc-linux-gnu. > Ok to commit? > Yes, we already do this with other stdint.h types when we don't want to include stdint.h if we don't *really* need all of it. OK,