Re: Test Case to verify the support of VFPV3 and VFPV4

2012-10-09 Thread Matthew Gretton-Dann
On 9 October 2012 14:44, Jubi Taneja wrote: > > > On Tue, Oct 9, 2012 at 5:21 PM, Matthew Gretton-Dann > wrote: >> >> >> /* arm-none-linux-gnueabi-gcc -mcpu=cortex-a15 -mfpu=vfpv4 -S -o- >> >> /tmp/fma.c -mfloat-abi=hard -O2 */ >> >> float f(float a, float b, float c) >> >> { >> >> return a * b

Re: Query: What happens in case of char array overflow?

2012-10-09 Thread Viresh Kumar
On 9 October 2012 17:13, Mans Rullgard wrote: > This is what the C99 standard says: > > An array of character type may be initialized by a character string > literal, optionally enclosed in braces. Successive characters of the > character string literal (including the terminating null charac

Re: alignment faults in 3.6

2012-10-09 Thread Mans Rullgard
On 9 October 2012 15:05, Scott Bambrough wrote: > On 12-10-05 12:01 PM, Rob Herring wrote: >> Here's a testcase. Compiled on ubuntu precise with >> "arm-linux-gnueabihf-gcc -O2 -marm -march=armv7-a test.c". >> >> typedef unsigned short u16; >> typedef unsigned short __sum16; >> typedef unsigned in

Re: alignment faults in 3.6

2012-10-09 Thread Scott Bambrough
On 12-10-05 12:01 PM, Rob Herring wrote: On 10/05/2012 08:51 AM, Mikael Pettersson wrote: Rob Herring writes: > On 10/05/2012 03:24 AM, Russell King - ARM Linux wrote: > > On Fri, Oct 05, 2012 at 09:20:56AM +0100, Mans Rullgard wrote: > >> On 5 October 2012 08:12, Russell King - ARM Linux

Re: Test Case to verify the support of VFPV3 and VFPV4

2012-10-09 Thread Jubi Taneja
On Tue, Oct 9, 2012 at 4:39 PM, Peter Maydell wrote: > On 9 October 2012 11:21, Matthew Gretton-Dann > wrote: > > On 9 October 2012 10:37, Jubi Taneja wrote: > >> I wanted to see the difference in objdump of an application where I can > make > >> the difference between the VFPV3 and VFPV4 suppor

Re: Test Case to verify the support of VFPV3 and VFPV4

2012-10-09 Thread Jubi Taneja
On Tue, Oct 9, 2012 at 5:21 PM, Matthew Gretton-Dann < matthew.gretton-d...@linaro.org> wrote: > On 9 October 2012 11:58, Jubi Taneja wrote: > > Hi Matt, > > > > Thanks for sharing the information. > > > > On Tue, Oct 9, 2012 at 3:51 PM, Matthew Gretton-Dann > > wrote: > >> > >> On 9 October 201

Re: Test Case to verify the support of VFPV3 and VFPV4

2012-10-09 Thread Jubi Taneja
On Tue, Oct 9, 2012 at 5:16 PM, Mans Rullgard wrote: > On 9 October 2012 12:09, Peter Maydell wrote: > > On 9 October 2012 11:21, Matthew Gretton-Dann > > wrote: > >> On 9 October 2012 10:37, Jubi Taneja wrote: > >>> I wanted to see the difference in objdump of an application where I > can make

Re: Test Case to verify the support of VFPV3 and VFPV4

2012-10-09 Thread Matthew Gretton-Dann
On 9 October 2012 11:58, Jubi Taneja wrote: > Hi Matt, > > Thanks for sharing the information. > > On Tue, Oct 9, 2012 at 3:51 PM, Matthew Gretton-Dann > wrote: >> >> On 9 October 2012 10:37, Jubi Taneja wrote: >> > Hi All, >> > >> > I wanted to see the difference in objdump of an application wh

Re: Test Case to verify the support of VFPV3 and VFPV4

2012-10-09 Thread Matthew Gretton-Dann
On 9 October 2012 12:09, Peter Maydell wrote: > On 9 October 2012 11:21, Matthew Gretton-Dann > wrote: >> On 9 October 2012 10:37, Jubi Taneja wrote: >>> I wanted to see the difference in objdump of an application where I can make >>> the difference between the VFPV3 and VFPV4 support. I tried e

Re: Test Case to verify the support of VFPV3 and VFPV4

2012-10-09 Thread Mans Rullgard
On 9 October 2012 12:09, Peter Maydell wrote: > On 9 October 2012 11:21, Matthew Gretton-Dann > wrote: >> On 9 October 2012 10:37, Jubi Taneja wrote: >>> I wanted to see the difference in objdump of an application where I can make >>> the difference between the VFPV3 and VFPV4 support. I tried e

Re: Query: What happens in case of char array overflow?

2012-10-09 Thread Mans Rullgard
On 9 October 2012 08:53, Viresh Kumar wrote: > Hi Guys, > > I just found an issue in kernel code and thought we must have a > compilation warning for such cases. > > Submitted a bug here: > > https://bugs.launchpad.net/gcc-linaro/+bug/1064218 > > Problem description: > - >

Re: Test Case to verify the support of VFPV3 and VFPV4

2012-10-09 Thread Peter Maydell
On 9 October 2012 11:21, Matthew Gretton-Dann wrote: > On 9 October 2012 10:37, Jubi Taneja wrote: >> I wanted to see the difference in objdump of an application where I can make >> the difference between the VFPV3 and VFPV4 support. I tried enabling the >> flag -mfpu=vfpv3 and -mfpu=vfpv4 for AR

Re: Test Case to verify the support of VFPV3 and VFPV4

2012-10-09 Thread Jubi Taneja
Hi Matt, Thanks for sharing the information. On Tue, Oct 9, 2012 at 3:51 PM, Matthew Gretton-Dann < matthew.gretton-d...@linaro.org> wrote: > On 9 October 2012 10:37, Jubi Taneja wrote: > > Hi All, > > > > I wanted to see the difference in objdump of an application where I can > make > > the di

Re: Test Case to verify the support of VFPV3 and VFPV4

2012-10-09 Thread Matthew Gretton-Dann
On 9 October 2012 10:37, Jubi Taneja wrote: > Hi All, > > I wanted to see the difference in objdump of an application where I can make > the difference between the VFPV3 and VFPV4 support. I tried enabling the > flag -mfpu=vfpv3 and -mfpu=vfpv4 for ARM Cortex A15 toolchain in my test > code but ca

Test Case to verify the support of VFPV3 and VFPV4

2012-10-09 Thread Jubi Taneja
Hi All, I wanted to see the difference in objdump of an application where I can make the difference between the VFPV3 and VFPV4 support. I tried enabling the flag -mfpu=vfpv3 and -mfpu=vfpv4 for ARM Cortex A15 toolchain in my test code but cannot see the difference in two objdumps. According to m

Re: Query: What happens in case of char array overflow?

2012-10-09 Thread Viresh Kumar
On 9 October 2012 13:47, Christophe Lyon wrote: > [copy of my answer in your bug report] > > Hello, > > If you look at the assembly code generated by the compiler, you will see: > foo_abc: > .ascii "12345" > > From the gas documentation: > `.ascii' expects zero or more string literals (*note Stri

Re: Query: What happens in case of char array overflow?

2012-10-09 Thread davi
Viresh Kumar wrote: > > struct foo { > > > > char array[5]; > > > > }; > > I am not adding '\0' in my string at all. Is this '\0' always added by > compiler, even in above situation? The compiler does not add the trailing '\0'. It is added only by the string manipulation functi

Re: Query: What happens in case of char array overflow?

2012-10-09 Thread Christophe Lyon
[copy of my answer in your bug report] Hello, If you look at the assembly code generated by the compiler, you will see: foo_abc: .ascii "12345" >From the gas documentation: `.ascii' expects zero or more string literals (*note Strings::) separated by commas. It assembles each string (with no aut

Re: Query: What happens in case of char array overflow?

2012-10-09 Thread Viresh Kumar
Hi, Thanks for your quick response. On 9 October 2012 13:39, wrote: > Viresh Kumar wrote: >> When we have following declaration: >> >> struct foo { >> char array[5]; >> >> }; >> >> And have a definition like: >> >> struct foo foo_abc = { >> .array = "12345", >> }; >> >> Pro

Re: Query: What happens in case of char array overflow?

2012-10-09 Thread davi
Viresh Kumar wrote: > When we have following declaration: > > struct foo { > char array[5]; > > }; > > And have a definition like: > > struct foo foo_abc = { > .array = "12345", > }; > > Problem here is: size of array is 5 bytes and so we can actually add a > string with fo

Query: What happens in case of char array overflow?

2012-10-09 Thread Viresh Kumar
Hi Guys, I just found an issue in kernel code and thought we must have a compilation warning for such cases. Submitted a bug here: https://bugs.launchpad.net/gcc-linaro/+bug/1064218 Problem description: - When we have following declaration: struct foo { char arra