Re: target attributes, pragmas and preprocessor macros

2015-05-18 Thread Kyrill Tkachov
Hi Christian, On 18/05/15 07:26, Christian Bruel wrote: Hi Kyrill, On 05/13/2015 05:43 PM, Kyrill Tkachov wrote: Hi all, Are target attributes supposed to redefine the preprocessor macros available? For example, on aarch64 if the file is compiled with floating point support the __ARM_FEATURE_

ldm/stm bus error

2015-05-18 Thread Umesh Kalappa
Hi All, Getting a bus/hard error for the below case ,make sense since ldm/stm expects the address to be word aligned . bash-4.1$ cat test.c struct test { char c; int i; } __attribute__((packed)); struct test a,b; int main() { a =b ; //here compiler is not sure that a or

May 2015 Toolchain Update

2015-05-18 Thread Nick Clifton
Hi Guys, There are several things to report this month: * GCC now supports targets configured to use the MUSL C library: http://www.musl-libc.org/ * The Compiler has a new warning option: -Wmisleading-indentation This generates warnings when the indentation of the

Re: target attributes, pragmas and preprocessor macros

2015-05-18 Thread Kyrill Tkachov
On 18/05/15 09:25, Kyrill Tkachov wrote: Hi Christian, On 18/05/15 07:26, Christian Bruel wrote: Hi Kyrill, On 05/13/2015 05:43 PM, Kyrill Tkachov wrote: Hi all, Are target attributes supposed to redefine the preprocessor macros available? For example, on aarch64 if the file is compiled wit

Re: May 2015 Toolchain Update

2015-05-18 Thread Alexander Monakov
Hello, A couple of comments below. On Mon, 18 May 2015, Nick Clifton wrote: > val |= ~0 << loaded;// Generates warning > val |= (unsigned) ~0 << loaded; // Does not warn To reduce verbosity, '~0u' can be used here instead of a cast. > * GCC supports a new option: -fn

Re: if-else-if chains to switch conversion optimization

2015-05-18 Thread Richard Biener
On Fri, May 15, 2015 at 7:47 PM, Daniel Gutson wrote: > Hi, > > the particular motivation is a TMP compile-time search of an > element, but could be extended to other scenarios. > > In my example, given: > > template > struct Static_Find > { > static size_t find(size_t /*target*/) > { >

Re: [i386] Scalar DImode instructions on XMM registers

2015-05-18 Thread Ilya Enkovich
2015-05-06 17:18 GMT+03:00 Ilya Enkovich : > 2015-04-25 4:32 GMT+03:00 Jan Hubicka : >> Hi, >> I am adding Vladimir and Richard into CC. I tried to solve similar problem >> with FP math years ago by having -mfpmath=sse,i387. The idea was to allow >> use of i387 registers when SSE ones run out and p

Re: [x86-64-psABI] RFC: Add R_X86_64_RELAX_PC32 and R_X86_64_RELAX_PLT32

2015-05-18 Thread Michael Matz
Hi, On Sun, 17 May 2015, H.J. Lu wrote: > To remove one direct branch to PLT for external function calls: > > https://gcc.gnu.org/ml/gcc-patches/2015-05/msg1.html > > I am proposing to add 2 new relocations, R_X86_64_RELAX_PC32 and > R_X86_64_RELAX_GOTPCREL: > > 1. R_X86_64_RELAX_PC32 can

Re: [x86-64-psABI] RFC: Add R_X86_64_RELAX_PC32 and R_X86_64_RELAX_PLT32

2015-05-18 Thread H.J. Lu
On Mon, May 18, 2015 at 5:45 AM, Michael Matz wrote: > Hi, > > On Sun, 17 May 2015, H.J. Lu wrote: > >> To remove one direct branch to PLT for external function calls: >> >> https://gcc.gnu.org/ml/gcc-patches/2015-05/msg1.html >> >> I am proposing to add 2 new relocations, R_X86_64_RELAX_PC32

Re: May 2015 Toolchain Update

2015-05-18 Thread Nicholas Clifton
Hi Alexander, * GCC supports a new option: -fno-plt Not all architectures support this option, and some other optimization features, such as lazy binding, may disable it. The last paragraph looks confusing to be on both points. '-fno-plt' is implemented as a transformation

[gomp4] bootstrap broken, function enclosing_target_ctx defined but not used

2015-05-18 Thread Tom de Vries
Thomas, In ran into this bootstrap failure with branch gomp-4_0-branch: ... src/gcc-gomp-4_0-branch/gcc/omp-low.c:2897:1: error: 'omp_context* enclosing_target_ctx(omp_context*)' defined but not used [-Werror=unused-function] enclosing_target_ctx (omp_context *ctx) ^ cc1plus: all warnings bei

Re: ldm/stm bus error

2015-05-18 Thread Richard Earnshaw
On 18/05/15 10:05, Umesh Kalappa wrote: > Hi All, > > Getting a bus/hard error for the below case ,make sense since ldm/stm > expects the address to be word aligned . > > bash-4.1$ cat test.c > struct test > { > char c; > int i; > } __attribute__((packed)); > > struct test a,b; >

Re: ldm/stm bus error

2015-05-18 Thread Joey Ye
In this case ldm is loading at alignment address. It is just loaded more than sizeof a. So it can be the bus that does not permit accessing memory beyond address range of a. Such a case I don't believe compiler is doing wrong. On Mon, May 18, 2015 at 4:50 PM, Richard Earnshaw wrote: > On 18/05/15

Re: ldm/stm bus error

2015-05-18 Thread Richard Earnshaw
On 18/05/15 17:18, Joey Ye wrote: > In this case ldm is loading at alignment address. It is just loaded > more than sizeof a. So it can be the bus that does not permit > accessing memory beyond address range of a. Such a case I don't > believe compiler is doing wrong. > If a starts on a 4-byte al

Re: ldm/stm bus error

2015-05-18 Thread Umesh Kalappa
Thank you all for the reply and appreciate elaborate summary . ~Umesh On Mon, May 18, 2015 at 10:08 PM, Richard Earnshaw wrote: > On 18/05/15 17:18, Joey Ye wrote: >> In this case ldm is loading at alignment address. It is just loaded >> more than sizeof a. So it can be the bus that does not per

Re: ldm/stm bus error

2015-05-18 Thread Jim Wilson
On 05/18/2015 02:05 AM, Umesh Kalappa wrote: > Getting a bus/hard error for the below case ,make sense since ldm/stm > expects the address to be word aligned . > --with-pkgversion='Cisco GCC c4.7.0-p1' --with-cisco-patch-level=1 The FSF doesn't support gcc-4.7.0 anymore. Generally, we only suppo

Re: optimization question

2015-05-18 Thread Martin Sebor
On 05/18/2015 02:01 PM, mark maule wrote: I have a loop which hangs when compiled with -O2, but runs fine when compiled with -O1. Not sure what information is required to get an answer, so starting with the full src code. I have not attempted to reduce to a simpler test case yet. Typically a

Re: optimization question

2015-05-18 Thread mark maule
Thank you for taking a look Martin. I will attempt to pare this down, provide a sample with typedefs/macros expanded, etc. and repost to gcc-help. To address a couple of your points: This code does work when compiled -O2 with 4.4.6 (failing is 4.8.3). It also works on 4.8.3 when dgHandle is

Re: WPP capabilities in gcc

2015-05-18 Thread Martin Sebor
On 04/26/2015 11:47 AM, Shoham Peller wrote: You are completely right Jonathan. My Apologies. WPP is a tool I use in my work field on an every-day basis, so I thought it was known. Here is the Wikipedia page on WPP: http://en.wikipedia.org/wiki/Windows_software_trace_preprocessor In short, WPP

Re: optimization question

2015-05-18 Thread Kugan
On 19/05/15 12:58, mark maule wrote: > Thank you for taking a look Martin. I will attempt to pare this down, > provide a sample with typedefs/macros expanded, etc. and repost to > gcc-help. To address a couple of your points: If you haven’t already, you can have a look at https://gcc.gnu.org/