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

2022-04-26 Thread Sebastian Huber
On 26.04.22 15:53, Martin Liška wrote: This if fine, except 2 places where you have trailing whitespace at the end of a line. Thanks for the review. Should I use "-ftest-coverage -fprofile-arcs" or "--coverage" in the tutorial? -- embedded brains GmbH Herr Sebastian

[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/ *

[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

[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 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(). ---

[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

[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 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

[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 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 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

[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.

[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 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

[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 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

Re: [PATCH] Add condition coverage profiling

2022-04-21 Thread Sebastian Huber
er 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 Registernu

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-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: [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-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: [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] 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-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 brains

[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

[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 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.

[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):

[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 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

[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(). ---

[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 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 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

[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

[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

[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

[PATCH] gcov: Reword comment for gcov_read_string()

2022-03-31 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

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

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

2022-03-30 Thread Sebastian Huber
: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: +49-89-18 9

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-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 GCOV even

[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

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

2022-03-23 Thread Sebastian Huber
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 Germany email

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 information

[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

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

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ührer

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: [PATCH] powerc: Fix asm machine directive for some CPUs

2022-01-18 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

[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

Re: [PATCH] rs6000: Fix cpu selection w/ isel (PR100108)

2022-01-17 Thread Sebastian Huber
On 11/01/2022 09:10, Sebastian Huber wrote: Hello Segher, On 20/04/2021 17:00, Segher Boessenkool wrote: There are various non-IBM CPUs with isel as well, so it is easiest if we just don't consider that flag here (it is not needed). 2021-04-20  Segher Boessenkool PR target/100108

Re: [PATCH] rs6000: Fix cpu selection w/ isel (PR100108)

2022-01-11 Thread Sebastian Huber
01-11 09:07:43.313828636 +0100 +++ _negvdi2.s.after2022-01-11 08:54:08.424946502 +0100 @@ -1,5 +1,5 @@ .file "libgcc2.c" - .machine power9 + .machine ppc .section".text" .Ltext0: .align 2 -- embedded brains GmbH Herr Sebastia

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

2021-11-26 Thread Sebastian Huber
to 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

Re: [PATCH] Fix arm target build with inhibit_libc

2021-08-31 Thread Sebastian Huber
On 30/08/2021 14:01, Sebastian Huber wrote: 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:

[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] 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

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

[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

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

2021-08-16 Thread Sebastian Huber
. 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 157899

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

2021-08-12 Thread Sebastian Huber
an 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

[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

[PATCH v3] gcov: Add TARGET_GCOV_TYPE_SIZE target macro

2021-08-11 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

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 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

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

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

[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

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 -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 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

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

2021-08-06 Thread Sebastian Huber
nding 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-18 9

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't

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

2021-07-23 Thread Sebastian Huber
On 23/07/2021 09:16, Martin Liška wrote: On 7/23/21 9:06 AM, Sebastian Huber wrote: On 23/07/2021 08:52, Martin Liška wrote: +#ifdef NEED_L_GCOV_INFO_TO_GCDA +/* Convert the gcov info to a gcda data stream.  It is intended for +   free-standing environments which do not support the C library

[PATCH v3] gcov: Add __gcov_info_to_gdca()

2021-07-23 Thread Sebastian Huber
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't use a linker script is (use "gcc -coverage -fprofile-info-section -lgcc test.c" to compile

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

2021-07-23 Thread Sebastian Huber
On 23/07/2021 11:17, Sebastian Huber wrote: On 23/07/2021 08:52, Martin Liška wrote: It would be nice having a test-case that can test your approach. The problem is that you need the linker set to get access to the gcov information. The test program of the commit message works on my

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

2021-07-23 Thread Sebastian Huber
/gcov-info-to-gcda.c:5:10: fatal error: gcov.h: No such file or directory compilation terminated. Is it possible to do such kind of tests? I also have to link to -lgcov? -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de

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

2021-07-23 Thread Sebastian Huber
o.c. Sorry, I still don't know how I can get the summary information if I only have a pointer to the gcov_info structure which does not contain a summary member. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89

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

2021-07-23 Thread Sebastian Huber
a gocv_ prefix, for example write_one_data(), write_topn_counters(). -- 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: [PATCH v2] gcov: Add __gcov_info_to_gdca()

2021-07-23 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 v2] gcov: Add __gcov_info_to_gdca()

2021-07-23 Thread Sebastian Huber
Hallo Martin, thanks for your review. On 23/07/2021 07:31, Martin Liška wrote: On 7/13/21 10:15 PM, Sebastian Huber wrote: Hello. Thanks for working on that, there's my review: Add __gcov_info_to_gcda() to libgcov to get the gcda data for a gcda info in a freestanding environment

[PATCH] gcov: Fix use of profile info section

2021-07-14 Thread Sebastian Huber
If the -fprofile-info-section is used, then the gcov information is registered in a linker set. This is done by build_gcov_info_var_registration(). The compiler generated object placed in the section was not marked as referenced, so once optimization was enabled, this object was optimized away.

[PATCH v2] gcov: Add __gcov_info_to_gdca()

2021-07-13 Thread Sebastian Huber
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't use a linker script is (use "gcc -coverage -fprofile-info-section -lgcc test.c" to compile

Re: [PATCH] gcov: Add __gcov_info_to_gdca()

2021-07-13 Thread Sebastian Huber
On 13/07/2021 15:03, Sebastian Huber wrote: memset (list_sizes, 0, counters * sizeof (unsigned)); Sorry, I just realized that memset() cannot be used if inhibit_libc is defined. I will send a v2 of the patch. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim

[PATCH] gcov: Add __gcov_info_to_gdca()

2021-07-13 Thread Sebastian Huber
Add __gcov_info_to_gcda() to libgcov to get the gcda data for a gcda info in a free-standing environment. It is intended to be used with the -fprofile-info-section option. A crude test program which doesn't use a linker script is (use "gcc -coverage -fprofile-info-section -lgcc test.c" to

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] 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

[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: [Ada,FYI] revamp ada.numerics.aux

2021-01-20 Thread Sebastian Huber
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örfler Unsere

Re: BoF DWARF5 patches (25% .debug section size reduction)

2021-01-18 Thread Sebastian Huber
-): Init(5).     * doc/invoke.texi (-gdwarf): Document default to 5. -- 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ünc

Re: [PATCH] [WIP] openmp: Add OpenMP 5.0 task detach clause support

2021-01-17 Thread Sebastian Huber
(gomp_sem_t *sem)    _Semaphore_Post (sem);  } +static inline int gomp_sem_getcount (gomp_sem_t *sem) +{ +  return (int) __atomic_load_n (>_count, MEMMODEL_RELAXED); +} +  static inline void gomp_sem_destroy (gomp_sem_t *sem)  {    _Semaphore_Destroy (sem); -- embedded brains GmbH Herr Sebastian HU

[PATCH] [wwwdocs] Add nios2 changes for GCC 11

2021-01-17 Thread Sebastian Huber
--- htdocs/gcc-11/changes.html | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html index 3527428f..dac3a03f 100644 --- a/htdocs/gcc-11/changes.html +++ b/htdocs/gcc-11/changes.html @@ -409,7 +409,19 @@ a

[PATCH v2 3/3] RTEMS: Add -mcustom-fpu-cfg=fph2 multilib

2021-01-16 Thread Sebastian Huber
This multilib supports Nios II configurations with the "Nios II Floating Point Hardware 2 Component". gcc/ * config/nios2/t-rtems: Reset all MULTILIB_* variables. Shorten multilib directory names. Use MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS. Add -mhw-mul

[PATCH v2 2/3] nios2: Add -mcustom-fpu-cfg=fph2

2021-01-16 Thread Sebastian Huber
The new -mcustom-fpu-cfg=fph2 option variant is useful to build a multilib for the "Nios II Floating Point Hardware 2 Component": https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug_nios2_custom_instruction.pdf Directly using the corresponding -mcustom-insn=N options

[PATCH v2 1/3] nios2: Remove custom instruction warnings

2021-01-16 Thread Sebastian Huber
Do not warn if custom instructions are not used due to missing optimization flags. This prevents build errors with -Werror which cannot be disabled via a dedicated warning option. One reason to remove these warnings is to enable a multilib for the "Nios II Floating Point Hardware 2 Component".

Re: [PATCH 1/2] nios2: Add -mcustom-fpu-cfg=fph2

2021-01-15 Thread Sebastian Huber
target): grep -r 'warning (OPT_Wextra' gcc/config gcc/config/avr/avr.c:  warning (OPT_Wextra, "rounding to %d bits has no effect for " -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 74

[PATCH 2/2] RTEMS: Add -mcustom-fpu-cfg=fph2 multilib

2021-01-14 Thread Sebastian Huber
This multilib supports Nios II configurations with the "Nios II Floating Point Hardware 2 Component". gcc/ * config/nios2/t-rtems: Reset all MULTILIB_* variables. Shorten multilib directory names. Use MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS. Add -mhw-mul

[PATCH 1/2] nios2: Add -mcustom-fpu-cfg=fph2

2021-01-14 Thread Sebastian Huber
The new -mcustom-fpu-cfg=fph2 option variant is useful to build a multilib for the "Nios II Floating Point Hardware 2 Component": https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug_nios2_custom_instruction.pdf Directly using the corresponding -mcustom-insn=N options

[PATCH] RTEMS: Fix Ada build for riscv

2021-01-14 Thread Sebastian Huber
gcc/ada/ PR ada/98595 Makefile.rtl (LIBGNAT_TARGET_PAIRS) : Use wraplf version of Aux_Long_Long_Float. --- gcc/ada/Makefile.rtl | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl index 81df1e8babc..35faf13ea46 100644 ---

Re: [Ada,FYI] revamp ada.numerics.aux

2021-01-13 Thread Sebastian Huber
On 13/01/2021 17:45, Alexandre Oliva wrote: Hello, Sebastian, On Jan 13, 2021, Sebastian Huber wrote: I have a similar issue on riscv-rtems*: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98595 Can this be fixed also with a patch to gcc/ada/Makefile.rtl? Yeah, that's definitely the way

<    1   2   3   4   5   >