[PATCH] Update config.guess and config.sub

2018-07-05 Thread Sebastian Huber
* config.guess: Sync with upstream version 2018-06-26. * config.sub: Sync with upstream version 2018-07-02. --- config.guess | 6 +++--- config.sub | 8 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/config.guess b/config.guess index 883a6713bf0..445c406

Re: [PATCH] Update config.guess and config.sub

2018-07-05 Thread Sebastian Huber
On 05/07/18 14:00, Sebastian Huber wrote: * config.guess: Sync with upstream version 2018-06-26. * config.sub: Sync with upstream version 2018-07-02. I would like to back port this also to GCC 8. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178

Re: [PATCH] Update config.guess and config.sub

2018-07-05 Thread Sebastian Huber
it's odd to sync half way to the head of config. I updated Binutils (master and binutils-2_31-branch) and GCC (master) to use the latest versions of config.sub (2018-07-03) and config.guess  (2018-06-26). -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puch

Re: [PATCH] libatomic: Provide gthr.h default implementation

2023-05-30 Thread Sebastian Huber
On 30.05.23 11:53, Richard Biener wrote: On Tue, May 23, 2023 at 11:28 AM Sebastian Huber wrote: On 10.01.23 16:38, Sebastian Huber wrote: On 19/12/2022 17:02, Sebastian Huber wrote: Build libatomic for all targets. Use gthr.h to provide a default implementation. If the thread model is

Re: [PATCH] libatomic: Provide gthr.h default implementation

2023-05-30 Thread Sebastian Huber
s are not available in hardware, then I should emit calls to libgcov.a which would use gthr.h to implement them? I guess that I can to this, but it needs a bit of time. Should I add the libgcov functions to builtin_decl_explicit()? -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4

Re: [PATCH] Introduce hardbool attribute for C

2022-07-08 Thread Sebastian Huber
flip in a processor register or other memory. If you use a single bit for true/false you can't detect such an error without special hardware. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 1

Re: [PATCH] Add condition coverage profiling

2022-07-08 Thread Sebastian Huber
Hello Jørgen, some time passed. It would be nice if you could give a status update. I am quite interested in your work. Best regards, Sebastian -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94

Re: [PATCH] Add condition coverage profiling

2022-07-12 Thread Sebastian Huber
nly three conditions (0: (year % 4) == 0, 1: (year % 100) != 0, 2: (year % 400) == 0). Maybe it would be more clear if the report says "condition variants covered 5/6" or something like this. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebas

Re: [PATCH] Add condition coverage profiling

2022-07-15 Thread Sebastian Huber
) Do we really have multiple decisions? I think we have only one decision composed of conditions and zero or more boolean operators. We have variants of condition outcomes. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de

[PATCH] RTEMS: Add -ftls-model=local-exec to multilibs

2022-07-20 Thread Sebastian Huber
Use the local-exec TLS model for all multilibs of all RTEMS targets with proper TLS support. gcc/ChangeLog: * config/arm/t-rtems (MULTILIB_EXTRA_OPTS): Define to use -ftls-model=local-exec. * config/i386/t-rtems (MULTILIB_EXTRA_OPTS): Likewise. * config/m68k/t-rtem

[PATCH v2] RTEMS: Add -ftls-model=local-exec to multilibs

2022-07-21 Thread Sebastian Huber
Use the local-exec TLS model for all multilibs of all RTEMS targets with proper TLS support. gcc/ChangeLog: * config.gcc (aarch64-*-rtems*): Extend tmake_file. * config/arm/t-rtems (MULTILIB_EXTRA_OPTS): Define to use -ftls-model=local-exec. * config/i386/t-rtems (

[GCC 12] libstdc++: Fix lifetime bugs for non-TLS eh_globals [PR105880]

2022-07-21 Thread Sebastian Huber
From: Jonathan Wakely This ensures that the single-threaded fallback buffer eh_globals is not destroyed during program termination, using the same immortalization technique used for error category objects. Also ensure that init._M_init can still be read after init has been destroyed, by making i

[PATCH 2/2] RTEMS: Use local-exec TLS model by default

2022-07-22 Thread Sebastian Huber
gcc/ChangeLog: * config/rtems.h (SUBTARGET_CC1_SPEC): Undef and define. --- gcc/config/rtems.h | 4 1 file changed, 4 insertions(+) diff --git a/gcc/config/rtems.h b/gcc/config/rtems.h index 95bcdc41b2f..4742b1f3722 100644 --- a/gcc/config/rtems.h +++ b/gcc/config/rtems.h @@ -56,3 +

[PATCH 1/2] Allow subtarget customization of CC1_SPEC

2022-07-22 Thread Sebastian Huber
gcc/ChangeLog: * gcc.cc (SUBTARGET_CC1_SPEC): Define if not defined. (CC1_SPEC): Define to SUBTARGET_CC1_SPEC. * config/arm/arm.h (CC1_SPEC): Remove. * config/arc/arc.h (CC1_SPEC): Append SUBTARGET_CC1_SPEC. * config/cris/cris.h (CC1_SPEC): Likewise.

Re: [PATCH 1/2] Allow subtarget customization of CC1_SPEC

2022-07-24 Thread Sebastian Huber
o a subset of a target... Iain Sandoe told me that for the GCC implementation the OSs are sub-targets of the architecture: https://gcc.gnu.org/pipermail/gcc/2022-July/239158.html -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brain

Re: [PATCH] Add condition coverage profiling

2022-08-04 Thread Sebastian Huber
GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörf

Re: [PATCH 1/2] Allow subtarget customization of CC1_SPEC

2022-08-04 Thread Sebastian Huber
On 22/07/2022 15:02, Sebastian Huber wrote: gcc/ChangeLog: * gcc.cc (SUBTARGET_CC1_SPEC): Define if not defined. (CC1_SPEC): Define to SUBTARGET_CC1_SPEC. * config/arm/arm.h (CC1_SPEC): Remove. * config/arc/arc.h (CC1_SPEC): Append SUBTARGET_CC1_SPEC

Re: [PATCH] libgomp: Fix build for -fshort-enums

2023-07-03 Thread Sebastian Huber
On 22.05.23 14:51, Sebastian Huber wrote: Make sure that the API enums have at least the size of int. Otherwise the following build error may occur: In file included from gcc/libgomp/env.c:34: ./libgomp_f.h: In function 'omp_check_defines': ./libgomp_f.h:77:8: error: size of array

[gcc] RTEMS: Tune multilib selection

2023-02-23 Thread Sebastian Huber
gcc/ChangeLog: * config/riscv/t-rtems: Keep only -mcmodel=medany 64-bit multilibs. Add non-compact 32-bit multilibs. --- gcc/config/riscv/t-rtems | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/gcc/config/riscv/t-rtems b/gcc/config/riscv/t-rte

Re: [gcc] RTEMS: Tune multilib selection

2023-02-23 Thread Sebastian Huber
Still better to hold off, but if there's something in RTEMS land that benefits from this being early then I think it's fine. RTEMS has its own release cycle, so I would back port this change to all GCC branches which may be used with RTEMS 6 and this is GCC 10 or later. -- e

[PATCH] libgomp: Fix build for -fshort-enums

2023-05-22 Thread Sebastian Huber
Make sure that the API enums have at least the size of int. Otherwise the following build error may occur: In file included from gcc/libgomp/env.c:34: ./libgomp_f.h: In function 'omp_check_defines': ./libgomp_f.h:77:8: error: size of array 'test' is negative 77 | char test[(28 != sizeof (omp

Re: [PATCH] libatomic: Provide gthr.h default implementation

2023-05-23 Thread Sebastian Huber
On 10.01.23 16:38, Sebastian Huber wrote: On 19/12/2022 17:02, Sebastian Huber wrote: Build libatomic for all targets.  Use gthr.h to provide a default implementation.  If the thread model is "single", then this implementation will not work if for example atomic operations are used

[PATCH] RTEMS: Fix GCC specification

2021-01-22 Thread Sebastian Huber
The use of -nostdlib and -nodefaultlibs disables the processing of LIB_SPEC (%L) as specified by LINK_COMMAND_SPEC and thus disables the default linker script for RTEMS. Move the linker script to STARTFILE_SPEC which is controlled by -nostdlib and -nostartfiles. This fits better since the linker

Re: [PATCH] RISC-V: Always define MULTILIB_DEFAULTS

2021-01-25 Thread Sebastian Huber
-- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen

Re: [PATCH] PR target/98878 - Incorrect multilib list for riscv*-rtems

2021-02-04 Thread Sebastian Huber
On 04/02/2021 11:01, Kito Cheng wrote: gcc/ChangeLog: * gcc.c (print_multilib_info): Check all required argument is provided by default arg. Thanks, with this patch the riscv-rtems* target works again. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim

Re: [PATCH v3] gcov: Add __gcov_info_to_gdca()

2021-08-05 Thread Sebastian Huber
On 05/08/2021 14:53, Martin Liška wrote: On 7/23/21 11:39 AM, Sebastian Huber wrote: Add __gcov_info_to_gcda() to libgcov to get the gcda data for a gcda info in a freestanding environment.  It is intended to be used with the -fprofile-info-section option.  A crude test program which doesn&#

Re: [PATCH v3] gcov: Add __gcov_info_to_gdca()

2021-08-06 Thread Sebastian Huber
eestanding environments. If this is not the case, then we have to define intptr_t somehow." What about the attached patch? -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89

Re: [PATCH v3] gcov: Add __gcov_info_to_gdca()

2021-08-06 Thread Sebastian Huber
On 06/08/2021 12:26, Martin Liška wrote: On 8/6/21 10:05 AM, Sebastian Huber wrote: What about the attached patch? The patch is fine, please install it. Thanks, I checked it in. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu

[PATCH] gcov: Add -fprofile-update=force-atomic

2021-08-09 Thread Sebastian Huber
If get_gcov_type() returns a 64-bit type, then 64-bit atomic operations in hardware are required for the "atomic" method. Add a new method to force atomic operations even if a library implementation (libatomic) must be used. gcc/ * common.opt (fprofile-update): Add force-atomic method.

Re: [PATCH] gcov: Add -fprofile-update=force-atomic

2021-08-09 Thread Sebastian Huber
On 09/08/2021 12:19, Richard Biener wrote: On Mon, Aug 9, 2021 at 10:01 AM Sebastian Huber wrote: If get_gcov_type() returns a 64-bit type, then 64-bit atomic operations in hardware are required for the "atomic" method. Add a new method to force atomic operations even if

[PATCH] gcov: Add GCOV_TYPE_SIZE target macro

2021-08-09 Thread Sebastian Huber
If -fprofile-update=atomic is used, then the target must provide atomic operations for the counters of the type returned by get_gcov_type(). This is a 64-bit type for targets which have a 64-bit long long type. On 32-bit targets this could be an issue since they may not provide 64-bit atomic operat

Re: [PATCH] gcov: Add -fprofile-update=force-atomic

2021-08-09 Thread Sebastian Huber
On 09/08/2021 10:00, Sebastian Huber wrote: If get_gcov_type() returns a 64-bit type, then 64-bit atomic operations in hardware are required for the "atomic" method. Add a new method to force atomic operations even if a library implementation (libatomic) must be

Re: [PATCH] gcov: Add GCOV_TYPE_SIZE target macro

2021-08-09 Thread Sebastian Huber
On 09/08/2021 15:58, Sebastian Huber wrote: If -fprofile-update=atomic is used, then the target must provide atomic operations for the counters of the type returned by get_gcov_type(). This is a 64-bit type for targets which have a 64-bit long long type. On 32-bit targets this could be an issue

[PATCH v2] gcov: Add GCOV_TYPE_SIZE target macro

2021-08-09 Thread Sebastian Huber
If -fprofile-update=atomic is used, then the target must provide atomic operations for the counters of the type returned by get_gcov_type(). This is a 64-bit type for targets which have a 64-bit long long type. On 32-bit targets this could be an issue since they may not provide 64-bit atomic operat

Re: [PATCH v2] gcov: Add GCOV_TYPE_SIZE target macro

2021-08-10 Thread Sebastian Huber
On 10/08/2021 19:30, Joseph Myers wrote: On Tue, 10 Aug 2021, Sebastian Huber wrote: If -fprofile-update=atomic is used, then the target must provide atomic operations for the counters of the type returned by get_gcov_type(). This is a 64-bit type for targets which have a 64-bit long long type

[PATCH v3] gcov: Add TARGET_GCOV_TYPE_SIZE target macro

2021-08-10 Thread Sebastian Huber
If -fprofile-update=atomic is used, then the target must provide atomic operations for the counters of the type returned by get_gcov_type(). This is a 64-bit type for targets which have a 64-bit long long type. On 32-bit targets this could be an issue since they may not provide 64-bit atomic operat

[PATCH v4] gcov: Add TARGET_GCOV_TYPE_SIZE target hook

2021-08-12 Thread Sebastian Huber
If -fprofile-update=atomic is used, then the target must provide atomic operations for the counters of the type returned by get_gcov_type(). This is a 64-bit type for targets which have a 64-bit long long type. On 32-bit targets this could be an issue since they may not provide 64-bit atomic operat

Re: [PATCH v4] gcov: Add TARGET_GCOV_TYPE_SIZE target hook

2021-08-12 Thread Sebastian Huber
architecture-specific define (SPARC_GCOV_TYPE_SIZE). -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899

Re: [PATCH v4] gcov: Add TARGET_GCOV_TYPE_SIZE target hook

2021-08-16 Thread Sebastian Huber
patch. Thanks for the review, I checked it in. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 1

[PATCH] Use __builtin_trap() for abort() if inhibit_libc

2021-08-17 Thread Sebastian Huber
abort() is used in gcc_assert() and gcc_unreachable() which is used by target libraries such as libgcov.a. This patch changes the abort() definition under certain conditions. If inhibit_libc is defined and abort is not already defined, then abort() is defined to __builtin_trap(). The inhibit_lib

Re: [PATCH] Use __builtin_trap() for abort() if inhibit_libc

2021-08-30 Thread Sebastian Huber
abort (void); libgcc/fp-bit.c: external to abort if abort is not used by the function, and the stubs libgcc/fp-bit.c:extern void abort (void); I will prepare a patch. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de

Re: [PATCH] Use __builtin_trap() for abort() if inhibit_libc

2021-08-30 Thread Sebastian Huber
On 30/08/2021 13:44, Richard Biener wrote: On Mon, Aug 30, 2021 at 12:55 PM Sebastian Huber wrote: Hello Christophe, it seems there are a couple of more abort() declarations: libgcc/unwind-arm-common.inc:extern void abort (void); libgcc/config/c6x/pr-support.c:extern void abort (void

[PATCH] Fix arm target build with inhibit_libc

2021-08-30 Thread Sebastian Huber
Do not declare abort in "libgcc/unwind-arm-common.inc" since it is already provided by "tsystem.h". It fixes the following build error: In file included from libgcc/config/arm/unwind-arm.c:144: libgcc/unwind-arm-common.inc:55:24: error: macro "abort" passed 1 arguments, but takes just 0 55 |

Re: [PATCH 1/2] Allow subtarget customization of CC1_SPEC

2022-10-04 Thread Sebastian Huber
On 08/09/2022 07:33, Sebastian Huber wrote: On 04/08/2022 15:02, Sebastian Huber wrote: On 22/07/2022 15:02, Sebastian Huber wrote: gcc/ChangeLog: * gcc.cc (SUBTARGET_CC1_SPEC): Define if not defined. (CC1_SPEC): Define to SUBTARGET_CC1_SPEC. * config/arm/arm.h (CC1_SPEC): Remove

Re: [PATCH] rs6000: Improve .machine

2022-03-10 Thread Sebastian Huber
: `dlmzb.' -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsf

Re: [PATCH] rs6000: Improve .machine

2022-03-15 Thread Sebastian Huber
Hello Segher, On 10/03/2022 11:11, Segher Boessenkool wrote: On Thu, Mar 10, 2022 at 09:25:21AM +0100, Sebastian Huber wrote: On 04/03/2022 17:51, Segher Boessenkool wrote: This adds more correct .machine for most older CPUs. It should be conservative in the sense that everything we handled

[PATCH] gcov-tool: Allow merging of empty profile lists

2022-03-23 Thread Sebastian Huber
The gcov_profile_merge() already had code to deal with profile information which had no counterpart to merge with. For profile information from files with no associated counterpart, the profile information is simply used as is with the weighting transformation applied. Make sure that gcov_profile

Re: [PATCH] gcov-tool: Allow merging of empty profile lists

2022-03-23 Thread Sebastian Huber
Hello Martin, On 23/03/2022 13:19, Martin Liška wrote: On 3/23/22 10:34, Sebastian Huber wrote: Hello. Thanks for the patch. Note we're in stage4, so the patch can eventually go in in the next stage1. ok, good. The gcov_profile_merge() already had code to deal with profile inform

Re: [PATCH v2] Document that the 'access' and 'nonnull' attributes are independent

2022-03-23 Thread Sebastian Huber
ess of the value of the size argument. I would not give an advice on using the nonnull attribute here. This attribute could have pretty dangerous effects in the function definition (removal of null pointer checks). -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Ger

[PATCH v2] gcov-tool: Allow merging of empty profile lists

2022-03-24 Thread Sebastian Huber
The gcov_profile_merge() already had code to deal with profile information which had no counterpart to merge with. For profile information from files with no associated counterpart, the profile information is simply used as is with the weighting transformation applied. Make sure that gcov_profile

Re: [PATCH] gcov-tool: Allow merging of empty profile lists

2022-03-24 Thread Sebastian Huber
On 24/03/2022 11:29, Martin Liška wrote: On 3/23/22 15:50, Sebastian Huber wrote: The attached script reads the log file and creates the *.gcda files using gcov-tool. Initially, the target files do not exist. Now I've got your use-case and I like it. It's cool one can utilize

Re: [PATCH] gcov-tool: Allow merging of empty profile lists

2022-03-28 Thread Sebastian Huber
On 24/03/2022 13:03, Martin Liška wrote: On 3/24/22 11:51, Sebastian Huber wrote: Maybe we could add the file path into the gcov information stream using a new tag: #define GCOV_TAG_GCDA_FILE_NAME  ((gcov_unsigned_t)0xa500) Then the complete gcov information can be dumped using a single

Re: [PATCH] gcov-tool: Allow merging of empty profile lists

2022-03-30 Thread Sebastian Huber
header : int32:filename-magic int32:version string #define GCOV_FILENAME_MAGIC ((gcov_unsigned_t)0x6763666e) /* "gcfn" */ -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax

Re: [PATCH] gcov-tool: Allow merging of empty profile lists

2022-03-30 Thread Sebastian Huber
On 30/03/2022 15:30, Sebastian Huber wrote: On 30/03/2022 13:56, Martin Liška wrote: Example: base64 -d log.txt | gcov-tool merge-stream The gcov-tool uses a new tag which contains the filename of the associated gcov info file: gcov-dump b-xilinx_zynq_a9_qemu/init.gcda b

[PATCH] gcov: Reword comment for gcov_read_string()

2022-03-30 Thread Sebastian Huber
gcc/ * gcov-io.cc (gcov_read_string): Reword documentation comment. --- gcc/gcov-io.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/gcov-io.cc b/gcc/gcov-io.cc index c2e9e2b6d64..72c40f8eaa0 100644 --- a/gcc/gcov-io.cc +++ b/gcc/gcov-io.cc @@ -473,9 +473,9

[RFC/gcov 00/12] Add merge-stream subcommand to gcov-tool

2022-03-31 Thread Sebastian Huber
ode -w, --weight Set weights (float point values) Example: base64 -d log.txt | gcov-tool merge-stream The patch set does not change the format of gcda files. TODO: * Documentation * Tests Sebastian Huber (12): gcov-tool: Allow merging of empty profile lists gcov: Add m

[RFC/gcov 01/12] gcov-tool: Allow merging of empty profile lists

2022-03-31 Thread Sebastian Huber
The gcov_profile_merge() already had code to deal with profile information which had no counterpart to merge with. For profile information from files with no associated counterpart, the profile information is simply used as is with the weighting transformation applied. Make sure that gcov_profile

[RFC/gcov 02/12] gcov: Add mode to all gcov_open()

2022-03-31 Thread Sebastian Huber
gcc/ * gcov-io.cc (gcov_open): Always use the mode parameter. * gcov-io.h (gcov_open): Declare it unconditionally. libgcc/ * libgcov-driver-system.c (gcov_exit_open_gcda_file): Open file for reading and writing. * libgcov-util.c (read_gcda_file): Open file

[RFC/gcov 03/12] gcov: Add open mode parameter to gcov_do_dump()

2022-03-31 Thread Sebastian Huber
gcc/ * gcov-tool.cc (gcov_do_dump): Add mode parameter. (gcov_output_files): Open files for reading and writing. libgcc/ * libgcov-driver-system.c (gcov_exit_open_gcda_file): Add mode parameter. Pass mode to gcov_open() calls. * libgcov-driver.c (dump_one

[RFC/gcov 06/12] gcov-tool: Support file input from stdin

2022-03-31 Thread Sebastian Huber
gcc/ * gcov-io.cc (GCOV_MODE_STDIN): Define. (gcov_position): For gcov-tool, return calculated position if file is stdin. (gcov_open): For gcov-tool, use stdin if filename is NULL. (gcov_close): For gcov-tool, do not close stdin. (gcov_read_bytes):

[RFC/gcov 04/12] gcov: Make gcov_seek() static

2022-03-31 Thread Sebastian Huber
This function is only used by gcov_write_length() in the gcov-io.cc file. gcc/ * gcov-io.cc (gcov_seek): Make it static. * gcov-io.h (struct gcov_summary): Do not mention gcov_seek(). libgcc/ * libgcov.h (gcov_seek): Remove define and declaration. --- gcc/gcov-io.cc |

[RFC/gcov 07/12] gcov: Use xstrdup()

2022-03-31 Thread Sebastian Huber
Move duplication of filename to caller and use xstrdup() instead of custom code. This helps to reuse read_gcda_file() for other purposes. libgcc/ * libgcov-util.c (read_gcda_file): Do not duplicate filename. (ftw_read_file): Duplicate filename for read_gcda_file(). --- libgcc/li

[RFC/gcov 08/12] gcov: Move prepend to list to read_gcda_file()

2022-03-31 Thread Sebastian Huber
This helps to reuse read_gcda_file(). libgcc/ * libgcov-util.c (read_gcda_file): Prepend new info object to global list. (ftw_read_file): Remove list append here. --- libgcc/libgcov-util.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib

[RFC/gcov 09/12] gcov: Move gcov_open() to caller of read_gcda_file()

2022-03-31 Thread Sebastian Huber
This allows to reuse read_gcda_file() to read multiple objects from a single file. libgcc/ * libgcov-util.c (read_gcda_file): Do not open file. (ftw_read_file): Open file here. --- libgcc/libgcov-util.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff

[RFC/gcov 05/12] gcov: Add __gcov_filename_to_gcfn()

2022-03-31 Thread Sebastian Huber
gcc/ * gcov-io.h (GCOV_FILENAME_MAGIC): Define and document. libgcc/ * gcov.h (__gcov_info_to_gcda): Mention __gcov_filename_to_gcfn(). (__gcov_filename_to_gcfn): Declare and document. * libgcov-driver.c (dump_string): New. (__gcov_filename_to_gcfn): Likew

[RFC/gcov 11/12] gcov: Record EOF error during read

2022-03-31 Thread Sebastian Huber
Use an enum for file error codes. gcc/ * gcov-io.cc (gcov_file_error): New enum. (gcov_var): Use gcov_file_error enum for the error member. (gcov_open): Use GCOV_FILE_NO_ERROR. (gcov_close): Use GCOV_FILE_WRITE_ERROR. (gcov_write): Likewise. (gcov_w

[RFC/gcov 12/12] gcov-tool: Add merge-stream subcommand

2022-03-31 Thread Sebastian Huber
gcc/ * gcov-tool.cc (gcov_profile_merge_stream): Declare. (print_merge_stream_usage_message): New. (merge_stream_usage): Likewise. (do_merge_stream): Likewise. (print_usage): Call print_merge_stream_usage_message(). (main): Call do_merge_stream() to

[RFC/gcov 10/12] gcov: Fix integer types in ftw_read_file()

2022-03-31 Thread Sebastian Huber
libgcc/ * libgcov-util.c (ftw_read_file): Use size_t for strlen() variables. --- libgcc/libgcov-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c index 03902ed10b1..622d5a9dc71 100644 --- a/libgcc/libgcov-util.c ++

Re: [PATCH] Add condition coverage profiling

2022-04-04 Thread Sebastian Huber
1: 19:x = 1; -: 20:else 2: 21:x = 2; 3: 22:} I have some trouble to understand the output. Would 8/8 mean that we have 100% MC/DC coverage? What does "not covered (false)" or "not covered (true)" mean? -- embedded b

Re: [PATCH] rs6000: Improve .machine

2022-04-04 Thread Sebastian Huber
Hello Segher, On 15/03/2022 23:29, Segher Boessenkool wrote: On Tue, Mar 15, 2022 at 03:29:23PM +0100, Sebastian Huber wrote: now that the PR104829 is fixed could I back port Segher Boessenkool (2): rs6000: Improve .machine rs6000: Do not use rs6000_cpu for .machine ppc and ppc64

Re: [PATCH] Add condition coverage profiling

2022-04-05 Thread Sebastian Huber
Hello Jørgen, On 04/04/2022 10:14, Sebastian Huber wrote: It seems that support for the new GCOV_TAG_CONDS is missing in gcov-tool and gcov-dump, see "tag_table" in gcc/gcov-dump.c and libgcc/libgcov-util.c. it seems that for gcov-tool no changes are necessary. You added the con

Re: [PATCH] Add condition coverage profiling

2022-04-06 Thread Sebastian Huber
ixes too once I have finished writing and testing it. Thanks a lot for this work. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München

Re: [RFC/gcov 00/12] Add merge-stream subcommand to gcov-tool

2022-04-07 Thread Sebastian Huber
stage 0 opens. I would like to add a chapter about the use of gcov in systems without a file system. * Tests Tests can be added after that. Ok, good. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49

Re: [PATCH] Add condition coverage profiling

2022-04-07 Thread Sebastian Huber
Hello Jørgen, there could be an issue with conditions in for loops: 3: 189: for (int a = 0; a <= 1; ++a) { branch 0 taken 2 branch 1 taken 1 (fallthrough) conditions covered 0/2 condition 0 not covered (true) condition 0 not covered (false) -- embedded brains GmbH Herr Sebast

Re: [PATCH] Add condition coverage profiling

2022-04-08 Thread Sebastian Huber
On 08/04/2022 09:33, Jørgen Kvalsvik wrote: On 08/04/2022 09:28, Jørgen Kvalsvik wrote: On 07/04/2022 18:53, Sebastian Huber wrote: Hello Jørgen, there could be an issue with conditions in for loops:     3:  189:  for (int a = 0; a <= 1; ++a) { branch  0 taken 2 branch  1 take

Re: [PATCH] Add condition coverage profiling

2022-04-21 Thread Sebastian Huber
eviewer to check what the tool did for a sample set of inputs. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München

[PATCH] powerc: Fix asm machine directive for some CPUs

2022-01-18 Thread Sebastian Huber
For some CPUs, the assembler machine directive cannot be determined by ISA flags. gcc/ PR 104090/target * config/rs6000/rs6000.cc (rs6000_machine_from_flags): Use also rtems_cpu. --- gcc/config/rs6000/rs6000.cc | 28 1 file changed, 28 inserti

Re: [PATCH] powerc: Fix asm machine directive for some CPUs

2022-01-18 Thread Sebastian Huber
1 branches. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter

Re: [PATCH] powerc: Fix asm machine directive for some CPUs

2022-02-02 Thread Sebastian Huber
On 19/01/2022 07:54, Sebastian Huber wrote: Okay with those changes.  Thanks! Thanks for having a look at this. I would like to back port this patch also to the GCC 10 and 11 branches. The default is to ask for back ports after a break. Can I back port the patch (with the default: break

Re: [Ada] RTEMS: use hardware interrupts instead of signals for interrupt handling

2021-11-26 Thread Sebastian Huber
account for these objects in the configuration. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899

[PATCH] riscv/RTEMS: Add RISCV_GCOV_TYPE_SIZE

2022-10-26 Thread Sebastian Huber
The RV32A extension does not support 64-bit atomic operations. For RTEMS, use a 32-bit gcov type for RV32. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_gcov_type_size): New. (TARGET_GCOV_TYPE_SIZE): Likewise. * config/riscv/rtems.h (RISCV_GCOV_TYPE_SIZE): New. --- gcc/c

Re: [PATCH 1/2] Allow subtarget customization of CC1_SPEC

2022-10-26 Thread Sebastian Huber
On 04/10/2022 11:47, Sebastian Huber wrote: On 08/09/2022 07:33, Sebastian Huber wrote: On 04/08/2022 15:02, Sebastian Huber wrote: On 22/07/2022 15:02, Sebastian Huber wrote: gcc/ChangeLog: * gcc.cc (SUBTARGET_CC1_SPEC): Define if not defined. (CC1_SPEC): Define to

Re: [PATCH] riscv/RTEMS: Add RISCV_GCOV_TYPE_SIZE

2022-10-27 Thread Sebastian Huber
On 28/10/2022 01:05, Palmer Dabbelt wrote: On Thu, 27 Oct 2022 15:56:17 PDT (-0700), gcc-patches@gcc.gnu.org wrote: On 10/26/22 01:49, Sebastian Huber wrote: The RV32A extension does not support 64-bit atomic operations.  For RTEMS, use a 32-bit gcov type for RV32. gcc/ChangeLog

[PATCH/gcc] RTEMS: Add -mvrsave multilibs

2022-09-01 Thread Sebastian Huber
gcc/ChangeLog: * config/rs6000/rtems.h (CPP_OS_DEFAULT_SPEC): Define __PPC_VRSAVE__ if -mvrsave is present. * config/rs6000/t-rtems: Add -mvrsave multilib variants for -mcpu=e6500. --- gcc/config/rs6000/rtems.h | 3 ++- gcc/config/rs6000/t-rtems | 5 + 2 files

Re: [PATCH 1/2] Allow subtarget customization of CC1_SPEC

2022-09-07 Thread Sebastian Huber
On 04/08/2022 15:02, Sebastian Huber wrote: On 22/07/2022 15:02, Sebastian Huber wrote: gcc/ChangeLog: * gcc.cc (SUBTARGET_CC1_SPEC): Define if not defined. (CC1_SPEC): Define to SUBTARGET_CC1_SPEC. * config/arm/arm.h (CC1_SPEC): Remove. * config/arc/arc.h (CC1_SPEC): Append

[gcov v2 00/14] Add merge-stream subcommand to gcov-tool

2022-04-25 Thread Sebastian Huber
xstrerror() * Add documentation Sebastian Huber (14): gcov-tool: Allow merging of empty profile lists gcov: Add mode to all gcov_open() gcov: Add open mode parameter to gcov_do_dump() gcov: Make gcov_seek() static gcov: Add __gcov_filename_to_gcfn() gcov-tool: Support file input from st

[gcov v2 01/14] gcov-tool: Allow merging of empty profile lists

2022-04-25 Thread Sebastian Huber
The gcov_profile_merge() already had code to deal with profile information which had no counterpart to merge with. For profile information from files with no associated counterpart, the profile information is simply used as is with the weighting transformation applied. Make sure that gcov_profile

[gcov v2 02/14] gcov: Add mode to all gcov_open()

2022-04-25 Thread Sebastian Huber
gcc/ * gcov-io.cc (gcov_open): Always use the mode parameter. * gcov-io.h (gcov_open): Declare it unconditionally. libgcc/ * libgcov-driver-system.c (gcov_exit_open_gcda_file): Open file for reading and writing. * libgcov-util.c (read_gcda_file): Open file

[gcov v2 04/14] gcov: Make gcov_seek() static

2022-04-25 Thread Sebastian Huber
This function is only used by gcov_write_length() in the gcov-io.cc file. gcc/ * gcov-io.cc (gcov_seek): Make it static. * gcov-io.h (struct gcov_summary): Do not mention gcov_seek(). libgcc/ * libgcov.h (gcov_seek): Remove define and declaration. --- gcc/gcov-io.cc |

[gcov v2 12/14] gcov-tool: Add merge-stream subcommand

2022-04-25 Thread Sebastian Huber
gcc/ * doc/gcov-tool.texi: Document merge-stream subcommand. * doc/invoke.texi (fprofile-info-section): Mention merge-stream subcommand of gcov-tool. * gcov-tool.cc (gcov_profile_merge_stream): Declare. (print_merge_stream_usage_message): New. (merge

[gcov v2 03/14] gcov: Add open mode parameter to gcov_do_dump()

2022-04-25 Thread Sebastian Huber
gcc/ * gcov-tool.cc (gcov_do_dump): Add mode parameter. (gcov_output_files): Open files for reading and writing. libgcc/ * libgcov-driver-system.c (gcov_exit_open_gcda_file): Add mode parameter. Pass mode to gcov_open() calls. * libgcov-driver.c (dump_one

[gcov v2 09/14] gcov: Move gcov_open() to caller of read_gcda_file()

2022-04-25 Thread Sebastian Huber
This allows to reuse read_gcda_file() to read multiple objects from a single file. libgcc/ * libgcov-util.c (read_gcda_file): Do not open file. (ftw_read_file): Open file here. --- libgcc/libgcov-util.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff

[gcov v2 11/14] gcov: Record EOF error during read

2022-04-25 Thread Sebastian Huber
Use an enum for file error codes. gcc/ * gcov-io.cc (gcov_file_error): New enum. (gcov_var): Use gcov_file_error enum for the error member. (gcov_open): Use GCOV_FILE_NO_ERROR. (gcov_close): Use GCOV_FILE_WRITE_ERROR. (gcov_write): Likewise. (gcov_w

[gcov v2 14/14] gcov: Add section for freestanding environments

2022-04-25 Thread Sebastian Huber
gcc/ * doc/gcov.texi (Profiling and Test Coverage in Freestanding Environments): New section. --- gcc/doc/gcov.texi | 375 ++ 1 file changed, 375 insertions(+) diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi index fc39da0f02d..751a11

[gcov v2 10/14] gcov: Fix integer types in ftw_read_file()

2022-04-25 Thread Sebastian Huber
libgcc/ * libgcov-util.c (ftw_read_file): Use size_t for strlen() variables. --- libgcc/libgcov-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c index 6093a74531d..bf96f508db0 100644 --- a/libgcc/libgcov-util.c ++

[gcov v2 08/14] gcov: Move prepend to list to read_gcda_file()

2022-04-25 Thread Sebastian Huber
This helps to reuse read_gcda_file(). libgcc/ * libgcov-util.c (read_gcda_file): Prepend new info object to global list. (ftw_read_file): Remove list append here. --- libgcc/libgcov-util.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib

[gcov v2 07/14] gcov: Use xstrdup()

2022-04-25 Thread Sebastian Huber
Move duplication of filename to caller and use xstrdup() instead of custom code. This helps to reuse read_gcda_file() for other purposes. libgcc/ * libgcov-util.c (read_gcda_file): Do not duplicate filename. (ftw_read_file): Duplicate filename for read_gcda_file(). --- libgcc/li

[gcov v2 06/14] gcov-tool: Support file input from stdin

2022-04-25 Thread Sebastian Huber
gcc/ * gcov-io.cc (GCOV_MODE_STDIN): Define. (gcov_position): For gcov-tool, return calculated position if file is stdin. (gcov_open): For gcov-tool, use stdin if filename is NULL. (gcov_close): For gcov-tool, do not close stdin. (gcov_read_bytes):

[gcov v2 13/14] gcov: Use xstrerror()

2022-04-25 Thread Sebastian Huber
libgcc/ * libgcov-util.c (ftw_read_file): Improve notice using xstrerror(). (gcov_profile_merge_stream): Likewise. --- libgcc/libgcov-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c index 2508e21..ba4

[gcov v2 05/14] gcov: Add __gcov_filename_to_gcfn()

2022-04-25 Thread Sebastian Huber
gcc/ * doc/invoke.texi (fprofile-info-section): Mention __gcov_filename_to_gcfn(). Use "freestanding" to match with C11 standard language. Fix minor example code issues. * gcov-io.h (GCOV_FILENAME_MAGIC): Define and document. gcc/testsuite/ * gcc.dg/gcov

  1   2   3   4   5   >