Re: (un)aligned accesses on x86 platform.

2010-03-17 Thread Mikael Pettersson
On Tue, 16 Mar 2010 06:50:30 -0800, H.J. Lu wrote: > 2010/3/8 Pawe=C5=82 Sikora : > > hi, > > > > during development a cross platform appliacation on x86 workstation > > i've enabled an alignemnt checking [1] to catch possible erroneous > > code before it appears on client's sparc/arm cpu with si

Re: (un)aligned accesses on x86 platform.

2010-03-16 Thread Jakub Jelinek
On Tue, Mar 16, 2010 at 10:04:04PM +0600, Alexey Salmin wrote: > >> Wow. What for? > > > > Well, simply because it is not compiled with strict alignment.  There might > > also be some optimization in > > memory operation that does unaligned accesses. > > I always thought that unaligned access is

Re: (un)aligned accesses on x86 platform.

2010-03-16 Thread Piotr Wyderski
Alexey Salmin wrote: > I always thought that unaligned access is much slower than aligned one. It is not *MUCH* slower, just slower (unless you cross cache line boundary). Unaligned accesses are very useful for improving performance of, among other things, certain hash functions (e.g. Paul Hsieh'

Re: (un)aligned accesses on x86 platform.

2010-03-16 Thread Alexey Salmin
On Tue, Mar 16, 2010 at 9:48 PM, Tristan Gingold wrote: > > On Mar 16, 2010, at 4:37 PM, Alexey Salmin wrote: I am interested in an -mstrict-alignment option for x86. >>> >>> Not sure it will be useful.  The libc still does unaligned accesses IIRC. >>> >> >> Wow. What for? > > Well, simply be

Re: (un)aligned accesses on x86 platform.

2010-03-16 Thread Tristan Gingold
On Mar 16, 2010, at 4:37 PM, Alexey Salmin wrote: >>> I am interested in an -mstrict-alignment option for x86. >> >> Not sure it will be useful. The libc still does unaligned accesses IIRC. >> > > Wow. What for? Well, simply because it is not compiled with strict alignment. There might also

Re: (un)aligned accesses on x86 platform.

2010-03-16 Thread Alexey Salmin
On Tue, Mar 16, 2010 at 9:05 PM, Tristan Gingold wrote: > > On Mar 16, 2010, at 3:50 PM, H.J. Lu wrote: > >> 2010/3/8 Paweł Sikora : >>> hi, >>> >>> during development a cross platform appliacation on x86 workstation >>> i've enabled an alignemnt checking [1] to catch possible erroneous >>> code b

Re: (un)aligned accesses on x86 platform.

2010-03-16 Thread Tristan Gingold
On Mar 16, 2010, at 3:50 PM, H.J. Lu wrote: > 2010/3/8 Paweł Sikora : >> hi, >> >> during development a cross platform appliacation on x86 workstation >> i've enabled an alignemnt checking [1] to catch possible erroneous >> code before it appears on client's sparc/arm cpu with sigbus ;) >> >> i

Re: (un)aligned accesses on x86 platform.

2010-03-16 Thread H.J. Lu
2010/3/8 Paweł Sikora : > hi, > > during development a cross platform appliacation on x86 workstation > i've enabled an alignemnt checking [1] to catch possible erroneous > code before it appears on client's sparc/arm cpu with sigbus ;) > > it works pretty fine and catches alignment violations but

Re: (un)aligned accesses on x86 platform.

2010-03-08 Thread Paweł Sikora
On Monday 08 March 2010 16:46:10 Richard Guenther wrote: > 2010/3/8 Paweł Sikora : > > hi, > > > > during development a cross platform appliacation on x86 workstation > > i've enabled an alignemnt checking [1] to catch possible erroneous > > code before it appears on client's sparc/arm cpu with si

Re: (un)aligned accesses on x86 platform.

2010-03-08 Thread Richard Guenther
2010/3/8 Paweł Sikora : > hi, > > during development a cross platform appliacation on x86 workstation > i've enabled an alignemnt checking [1] to catch possible erroneous > code before it appears on client's sparc/arm cpu with sigbus ;) > > it works pretty fine and catches alignment violations but

Re: (un)aligned accesses on x86 platform.

2010-03-08 Thread Andrew Pinski
You define STRICT_ALIGNED to be 1 in i386.h or provide an option to turn that on/off like the rs6000 target does. Thanks, Andrew Pinski Sent from my iPhone On Mar 8, 2010, at 7:37 AM, Paweł Sikora wrote: hi, during development a cross platform appliacation on x86 workstation i've enabled

(un)aligned accesses on x86 platform.

2010-03-08 Thread Paweł Sikora
hi, during development a cross platform appliacation on x86 workstation i've enabled an alignemnt checking [1] to catch possible erroneous code before it appears on client's sparc/arm cpu with sigbus ;) it works pretty fine and catches alignment violations but Jakub Jelinek had told me (on glibc