Re: a small C (naive) program faster with clang than with gcc

2023-04-26 Thread Gabriel Paubert
On Tue, Apr 25, 2023 at 06:01:22PM +0200, Andy via Gcc wrote: > I see it in godbolt > GCC compiles to: > movsx eax, BYTE PTR [rdi+2] > cmp al, 9 > ja .L42 > Clang: > movzx edx, byte ptr [rdi + 2] > cmp edx, 9 > ja .LBB0_40 > > > GCC extend with sign, Clang with zero. > cmp with 32 bit register

Re: -fprofile-update=atomic vs. 32-bit architectures

2022-11-04 Thread Gabriel Paubert
On Fri, Nov 04, 2022 at 09:27:34AM +0100, Sebastian Huber wrote: > Hello, > > even recent 32-bit architectures such as RISC-V do not support 64-bit atomic > operations. Using -fprofile-update=atomic for the 32-bit RISC-V RV32GC ISA > yields: > > warning: target does not support atomic profile

Re: Suboptimal code generated for __buitlin_trunc on AMD64 without SS4_4.1

2021-08-06 Thread Gabriel Paubert
On Fri, Aug 06, 2021 at 02:43:34PM +0200, Stefan Kanthak wrote: > Gabriel Paubert wrote: > > > Hi, > > > > On Thu, Aug 05, 2021 at 01:58:12PM +0200, Stefan Kanthak wrote: > >> Gabriel Paubert wrote: > >> > >> > >> >

Re: Suboptimal code generated for __buitlin_trunc on AMD64 without SS4_4.1

2021-08-05 Thread Gabriel Paubert
Hi, On Thu, Aug 05, 2021 at 01:58:12PM +0200, Stefan Kanthak wrote: > Gabriel Paubert wrote: > > > > On Thu, Aug 05, 2021 at 09:25:02AM +0200, Stefan Kanthak wrote: > >> Hi, > >> > >> targeting AMD64 alias x86_64 with -O3, GCC 10.2.0 generate

Re: Suboptimal code generated for __buitlin_trunc on AMD64 without SS4_4.1

2021-08-05 Thread Gabriel Paubert
On Thu, Aug 05, 2021 at 09:25:02AM +0200, Stefan Kanthak wrote: > Hi, > > targeting AMD64 alias x86_64 with -O3, GCC 10.2.0 generates the > following code (13 instructions using 57 bytes, plus 4 quadwords > using 32 bytes) for __builtin_trunc() when -msse4.1 is NOT given: > >

Re: Need help debugging possible 10.3 bad code generation regression from 10.2/9.3 on Mac OS 10.15.7 (Catalina)

2021-04-20 Thread Gabriel Paubert
On Tue, Apr 20, 2021 at 12:20:06PM +, Lucier, Bradley J via Gcc wrote: > I’m seeing an “Illegal Instruction” fault and don’t quite know how to > generate a proper bug report yet. > > This is the compiler: > > [Bradleys-Mac-mini:~] lucier% /usr/local/gcc-10.3.0/bin/gcc -v > Using built-in

Re: RFC: allowing compound assignment operators with designated initializers

2018-10-15 Thread Gabriel Paubert
On Mon, Oct 15, 2018 at 08:13:19PM +0100, Jonathan Wakely wrote: > On Mon, 15 Oct 2018 at 20:08, Gabriel Paubert wrote: > > > > On Mon, Oct 15, 2018 at 08:11:42PM +0200, Florian Weimer wrote: > > > * Jonathan Wakely: > > > > > > > On Sun

Re: RFC: allowing compound assignment operators with designated initializers

2018-10-15 Thread Gabriel Paubert
On Mon, Oct 15, 2018 at 08:11:42PM +0200, Florian Weimer wrote: > * Jonathan Wakely: > > > On Sun, 14 Oct 2018 at 20:46, Florian Weimer wrote: > >> > >> * Rasmus Villemoes: > >> > >> > This is something I've sometimes found myself wishing was supported. The > >> > idea being that one can say >

[OT] Re: Bit-field struct member sign extension pattern results in redundant

2017-08-18 Thread Gabriel Paubert
On Fri, Aug 18, 2017 at 10:56:10PM +1200, Michael Clark wrote: > > > On 18 Aug 2017, at 10:41 PM, Gabriel Paubert <paub...@iram.es> wrote: > > > > On Fri, Aug 18, 2017 at 10:29:04AM +1200, Michael Clark wrote: > >> Sorry I had to send again as my

Re: Bit-field struct member sign extension pattern results in redundant

2017-08-18 Thread Gabriel Paubert
On Fri, Aug 18, 2017 at 10:29:04AM +1200, Michael Clark wrote: > Sorry I had to send again as my Apple mailer is munging emails. I’ve disabled > RTF. > > > This one is quite interesting: > > - https://cx.rv8.io/g/WXWMTG > > It’s another target independent bug. x86 is using some LEA followed

Re: Complex multiplication in gcc

2017-07-17 Thread Gabriel Paubert
On Mon, Jul 17, 2017 at 10:51:21AM -0600, Sean McAllister wrote: > When generating code for a simple inner loop (instantiated with > std::complex) > > template > void __attribute__((noinline)) benchcore(const cx* __restrict__ aa, > const cx* __restrict__ bb, const cx* __restrict__ cc, cx*

Re: Translation breaks IDE

2017-03-17 Thread Gabriel Paubert
On Fri, Mar 17, 2017 at 12:28:48PM +, Jonathan Wakely wrote: > On 17 March 2017 at 12:17, Frédéric Marchal wrote: > > On Friday 17 March 2017 13:32:17 Janne Blomqvist wrote: > >> Not my area of expertise, but it seems the Glorious Future (TM) in > >> this area is something called the "language

Re: GCC libatomic ABI specification draft

2016-12-02 Thread Gabriel Paubert
On Thu, Dec 01, 2016 at 11:13:37AM -0800, Bin Fan at Work wrote: > Hi Szabolcs, > > > On Nov 29, 2016, at 3:11 AM, Szabolcs Nagy wrote: > > > > On 17/11/16 20:12, Bin Fan wrote: > >> > >> Although this ABI specification specifies that 16-byte properly aligned > >>

Re: Debugger support for __float128 type?

2015-10-01 Thread Gabriel Paubert
On Thu, Oct 01, 2015 at 12:42:05AM +0200, Mark Kettenis wrote: > > Date: Wed, 30 Sep 2015 19:33:44 +0200 (CEST) > > From: "Ulrich Weigand" > > > > Hello, > > > > I've been looking into supporting __float128 in the debugger, since we're > > now introducing this type on

Re: ppc eabi float arguments

2015-09-23 Thread Gabriel Paubert
On Wed, Sep 23, 2015 at 07:09:43PM -0400, Michael Meissner wrote: > On Tue, Sep 22, 2015 at 01:43:55PM -0400, David Edelsohn wrote: > > On Tue, Sep 22, 2015 at 1:39 PM, Bernhard Schommer > > wrote: > > > Hi, > > > > > > if been working with the windriver Diab c

Re: [RFC] Design for flag bit outputs from asms

2015-05-05 Thread Gabriel Paubert
On Mon, May 04, 2015 at 12:33:38PM -0700, Richard Henderson wrote: [snipped] (3) Note that ppc is both easier and more complicated. There we have 8 4-bit registers, although most of the integer non-comparisons only write to CR0. And the vector non-comparisons only write to CR1, though

Re: designated initializers extension and sparc

2013-06-17 Thread Gabriel Paubert
On Mon, Jun 17, 2013 at 01:28:56AM +0300, Sergey Kljopov wrote: Hi, Reading the text - In a structure initializer, specify the name of a field to initialize with `.fieldname =' before the element value. For example, given the following structure, struct point { int x, y;

Re: Conditional sibcalls?

2013-02-21 Thread Gabriel Paubert
On Thu, Feb 21, 2013 at 03:57:05PM +0400, Konstantin Vladimirov wrote: Hi, Discovered this optimization possibilty on private backend, but can easily reproduce on x86 Consider code, say test.c: static __attribute__((noinline)) unsigned int* proxy1( unsigned int* codeBuffer, unsigned

Re: SPEC2000 comparison of LLVM-3.2 and coming GCC4.8 on x86/x86-64

2013-02-08 Thread Gabriel Paubert
On Thu, Feb 07, 2013 at 11:46:04AM -0500, Vladimir Makarov wrote: On 02/07/2013 11:09 AM, Richard Biener wrote: On Thu, Feb 7, 2013 at 4:26 PM, Vladimir Makarov vmaka...@redhat.com wrote: I've add pages comparing LLVM-3.2 and coming GCC 4.8 on http://vmakarov.fedorapeople.org/spec/. The

Re: not-a-number's

2013-01-17 Thread Gabriel Paubert
On Thu, Jan 17, 2013 at 12:21:04PM +0100, Vincent Lefevre wrote: On 2013-01-17 06:53:45 +0100, Mischa Baars wrote: Also this was not what I intended to do, I was trying to work with quiet not-a-numbers explicitly to avoid the 'invalid operation' exception to be triggered, so that my program

Re: Deprecate i386 for GCC 4.8?

2012-12-20 Thread Gabriel Paubert
On Thu, Dec 13, 2012 at 12:51:29PM +0100, David Brown wrote: Is there much to be gained from keeping 486 support - or alternatively, is there much to be gained by dropping it at the same time? In practice, there is very little difference betweeen 486 and Pentium for code what will be

Re: C++98/C++11 ABI compatibility for gcc-4.7

2012-06-15 Thread Gabriel Paubert
On Fri, Jun 15, 2012 at 10:52:27PM +0200, Paolo Carlini wrote: Hi, On Fri, Jun 15, 2012 at 3:12 PM, James Y Knight f...@fuhm.net wrote: IMO, at the /very least/, libstdc++ should go ahead and change std::string to be the new implementation. Once std::string is ABI-incompatible between

Re: %pc relative addressing of string literals/const data

2010-10-06 Thread Gabriel Paubert
On Tue, Oct 05, 2010 at 10:55:36PM +0200, Joakim Tjernlund wrote: Richard Henderson r...@redhat.com wrote on 2010/10/05 20:56:55: On 10/05/2010 06:54 AM, Joakim Tjernlund wrote: Ian Lance Taylor i...@google.com wrote on 2010/10/05 15:47:38: Joakim Tjernlund joakim.tjernl...@transmode.se

Re: porting GCC to a micro with a very limited addressing mode --- what to write in LEGITIMATE_ADDRESS, LEGITIMIZE_ADDRESS and micro.md ?!

2010-01-25 Thread Gabriel Paubert
On Mon, Jan 25, 2010 at 01:34:09PM +0100, Sergio Ruocco wrote: Hi everyone, I am porting GCC to a custom 16-bit microcontroller with very limited addressing modes. Basically, it can only load/store using a (general purpose) register as the address, without any offset: LOAD (R2) R1

Re: [PATCH] Re: PowerPC : GCC2 optimises better than GCC4???

2010-01-07 Thread Gabriel Paubert
On Wed, Jan 06, 2010 at 04:18:06PM +0100, Jakub Jelinek wrote: On Wed, Jan 06, 2010 at 10:15:58AM +, Andrew Haley wrote: On 01/06/2010 09:59 AM, Mark Colby wrote: Yabbut, how come RTL cse can handle it in x86_64, but PPC not? Probably because the RTL on x86_64 uses and's and ior's,

Re: Why no strings in error messages?

2009-09-01 Thread Gabriel Paubert
On Wed, Aug 26, 2009 at 03:02:44PM -0400, Bradley Lucier wrote: On Wed, 2009-08-26 at 20:38 +0200, Paolo Bonzini wrote: When I worked at AMD, I was starting to suspect that it may be more beneficial to re-enable the first schedule insns pass if you were compiling in 64-bit mode,

Re: As-if Infinitely Ranged Integer Model

2009-07-27 Thread Gabriel Paubert
On Fri, Jul 24, 2009 at 06:25:12PM +0200, Laurent GUERBY wrote: On Fri, 2009-07-24 at 12:03 -0400, Robert Dewar wrote: Indeed an alternative approach to handling this problem in GCC would be to adapt the Ada model for C and C++ which would not be too hard to do I suspect. Then gcc could be

Re: As-if Infinitely Ranged Integer Model

2009-07-27 Thread Gabriel Paubert
On Mon, Jul 27, 2009 at 10:46:53AM +0200, Laurent GUERBY wrote: On Mon, 2009-07-27 at 09:34 +0200, Gabriel Paubert wrote: On Fri, Jul 24, 2009 at 06:25:12PM +0200, Laurent GUERBY wrote: for I in T'First .. Dynamic_N loop T (I) := 0.0; -- generate check I in T'First .. T'Last

Re: help for arm avr bfin cris frv h8300 m68k mcore mmix pdp11 rs6000 sh vax

2009-03-17 Thread Gabriel Paubert
On Fri, Mar 13, 2009 at 06:06:41PM +0100, Paolo Bonzini wrote: Hm. In fold-const.c we try to make sure to produce the same result as the target would for constant-folding shifts. Thus, Paolo, I think what fold-const.c does is what we should assume for !SHIFT_COUNT_TRUNCATED. No?

Re: PowerPC lwsync Instruction

2008-06-23 Thread Gabriel Paubert
On Thu, Jun 19, 2008 at 03:50:34PM -0500, Joel Sherrill wrote: Andrew Pinski wrote: On Thu, Jun 19, 2008 at 1:36 PM, Joel Sherrill [EMAIL PROTECTED] wrote: Hi, I ran into something tracking down a test failure on psim and now thing there is a target specific issue that needs

Re: [PATCH][4.3] Deprecate -ftrapv

2008-03-03 Thread Gabriel Paubert
On Mon, Mar 03, 2008 at 01:38:01AM +0100, Andi Kleen wrote: [EMAIL PROTECTED] (Ross Ridge) writes: Robert Dewar writes: Yes, and that is what we would want for Ada, so I am puzzled by your sigh. All Ada needs to do is to issue a constraint_error exception, it does not need to know where

Re: powercp-linux cross GCC 4.2 vs GCC 4.0.0: -Os code size regression?

2008-01-17 Thread Gabriel Paubert
On Wed, Jan 16, 2008 at 04:55:19PM +0300, Sergei Poselenov wrote: Hello, I've just noted an error in my calculations: not 40%, but 10% regression (used gdb to do the calculations and forgot to convert inputs to float). Sorry. But the problem still persists for me - I'm building an

Re: powercp-linux cross GCC 4.2 vs GCC 4.0.0: -Os code size regression?

2008-01-17 Thread Gabriel Paubert
Hello Sergei, On Thu, Jan 17, 2008 at 03:13:59PM +0300, Sergei Poselenov wrote: I don't know now, actually, this is what I'm asking. As for the target processor - as I stated in the initial message: ... Currently, it builds as following: ppc-linux-gcc -g -Os -fPIC -ffixed-r14

Re: powercp-linux cross GCC 4.2 vs GCC 4.0.0: -Os code size regression? [Emcraft #11717]

2008-01-17 Thread Gabriel Paubert
On Thu, Jan 17, 2008 at 05:48:10PM +0300, Sergei Poselenov wrote: Hello Andrew, Andrew Haley wrote: Sergei Poselenov writes: Hello Andrew, Now, I sympathize that in your particular case you have a code size regression. This happens: when we do optimization in gcc, some code

Re: Git and GCC

2007-12-10 Thread Gabriel Paubert
On Fri, Dec 07, 2007 at 04:47:19PM -0800, Harvey Harrison wrote: Some interesting stats from the highly packed gcc repo. The long chain lengths very quickly tail off. Over 60% of the objects have a chain length of 20 or less. If anyone wants the full list let me know. I also have included

[OT] Re: Git repository with full GCC history

2007-06-01 Thread Gabriel Paubert
On Fri, Jun 01, 2007 at 02:52:43AM -0400, Bernardo Innocenti wrote: Harvey Harrison wrote: Was this repo made with svnimport or git-svn? svnimport is faster but chooses bad delta bases as a result. git repack -a -d -f would allow git to choose better deltas rather than reusing the deltas

Re: Git repository with full GCC history

2007-06-01 Thread Gabriel Paubert
On Fri, Jun 01, 2007 at 04:47:11AM -0400, Bernardo Innocenti wrote: Jan-Benedict Glaw wrote: On Thu, 2007-05-31 21:34:33 -0400, Bernardo Innocenti [EMAIL PROTECTED] wrote: I've set up a Git mirror of the entire GCC history on server space kindly provided by David Woodhouse. You can clone

[OT] Re: Git repository with full GCC history

2007-06-01 Thread Gabriel Paubert
On Fri, Jun 01, 2007 at 11:00:29AM -0400, Bernardo Innocenti wrote: Gabriel Paubert wrote: I just upgraded my git to 1.5.2 and repacked the git repository with git-gc --aggressive. It is quite impressive: the size of the pack file was almost cut in half, from ~23MB to ~12MB

Re: Signed into overflow behavior in the security context

2007-01-30 Thread Gabriel Paubert
On Tue, Jan 30, 2007 at 10:49:02AM -0500, Robert Dewar wrote: Paul Schlie wrote: - as trap representation within the context of C is a value representation which is not defined to be a member of a type, where if accessed or produced evokes undefined behavior; so admit as to the best of my

Re: [OT] char should be signed by default

2007-01-25 Thread Gabriel Paubert
On Thu, Jan 25, 2007 at 10:29:29AM +0100, Paolo Bonzini wrote: A given program is written in one or the other of these two dialects. The program stands a chance to work on most any machine if it is compiled with the proper dialect. It is unlikely to work at all if compiled with the wrong

Re: Miscompilation of remainder expressions

2007-01-17 Thread Gabriel Paubert
On Wed, Jan 17, 2007 at 12:43:40AM +0100, Vincent Lefevre wrote: On 2007-01-16 21:27:42 +, Andrew Haley wrote: Ian Lance Taylor writes: I suspect that the best fix, in the sense of generating the best code, would be to do this at the tree level. That will give loop and VRP

Re: Miscompilation of remainder expressions

2007-01-17 Thread Gabriel Paubert
On Wed, Jan 17, 2007 at 11:17:36AM -0800, Ian Lance Taylor wrote: Joe Buck [EMAIL PROTECTED] writes: On Wed, Jan 17, 2007 at 05:48:34PM +, Andrew Haley wrote: From a performance/convenience angle, the best place to handle this is either libc or the kernel. Either of these can quite

Re: Miscompilation of remainder expressions

2007-01-17 Thread Gabriel Paubert
On Wed, Jan 17, 2007 at 04:15:08PM -0800, Ian Lance Taylor wrote: Robert Dewar [EMAIL PROTECTED] writes: Ian Lance Taylor wrote: We do want to generate a trap for x / 0, of course. Really? Is this really defined to generate a trap in C? I would be surprised if so ... As far as

Re: Miscompilation of remainder expressions

2007-01-15 Thread Gabriel Paubert
On Mon, Jan 15, 2007 at 10:34:23PM +0200, Michael Veksler wrote: Roberto Bagnara wrote: Reading the thread Autoconf manual's coverage of signed integer overflow portability I was horrified to discover about GCC's miscompilation of the remainder expression that causes INT_MIN % -1 to cause

Re: optimizing calling conventions for function returns

2006-05-23 Thread Gabriel Paubert
On Tue, May 23, 2006 at 11:21:46AM -0400, Jon Smirl wrote: Has work been done to evaluate a calling convention that takes error checks like this into account? Are there size/performance wins? Or am I just reinventing a variation on exception handling? It's fairly close to Fortran alternate

Re: Qemu and GCC-3.4 on powerpc

2006-04-10 Thread Gabriel Paubert
On Sun, Apr 09, 2006 at 02:45:04PM +0200, Dieter Schuster wrote: Tach auch! Am Fr, den 31 März 2006, schrieb Alan Modra: On Tue, Mar 28, 2006 at 12:00:47PM +0200, Gabriel Paubert wrote: On Tue, Mar 28, 2006 at 12:56:13AM +0200, Dieter Schuster wrote: If I try to compile qemu with GCC

Re: Qemu and GCC-3.4 on powerpc

2006-03-28 Thread Gabriel Paubert
On Tue, Mar 28, 2006 at 12:56:13AM +0200, Dieter Schuster wrote: Hello, the version 0.8.0 of qemu in the Debian-pool will not compile on PowerPC with GCC 3.4. The following patch will fix it: And suck performance wise with exploding code size. Without speaking of potential atomicity issues

Re: Request for 48 hours of just regression/bug fixes

2006-01-22 Thread Gabriel Paubert
On Sat, Jan 21, 2006 at 07:03:27PM -0800, Mark Mitchell wrote: Andrew Pinski wrote: I noticed today that there were three projects which were merged into the mainline within a 24 hour period yesterday. Date: Thu, 19 Jan 2006 01:42:49 - IAB - Daniel Berlin Date: Thu, 19 Jan 2006

Re: 4.2 Project: @file support

2005-08-25 Thread Gabriel Paubert
On Thu, Aug 25, 2005 at 06:09:25PM +0200, Florian Weimer wrote: * Andi Kleen: Linux has a similar limit which comes from the OS (normally around 32k) So it would be useful there for extreme cases too. IIRC, FreeBSD has a rather low limit, too. And there were discussions about command

Re: signed is undefined and has been since 1992 (in GCC)

2005-06-28 Thread Gabriel Paubert
On Tue, Jun 28, 2005 at 02:32:04PM +0200, Gabriel Dos Reis wrote: Robert Dewar [EMAIL PROTECTED] writes: | Gabriel Dos Reis wrote: | | The issue here is whether if the hardware consistently display a | semantics, GCC should not allow access to that consistent semantics | under the name

Re: Bug related to floating-point traps?

2005-06-15 Thread Gabriel Paubert
On Wed, Jun 15, 2005 at 03:14:59PM +0200, Vincent Lefevre wrote: I don't know if this is a bug in gcc or the glibc... Consider the following program traps1: #define _GNU_SOURCE #include stdio.h #include stdlib.h #include float.h #include fenv.h int main (int argc, char *argv[]) {