Re: [RFC] Fixing expansion of misaligned MEM_REFs on strict-alignment targets

2012-01-24 Thread Richard Guenther
On Tue, 24 Jan 2012, Richard Guenther wrote: > One issue that I am running into now is that we need to robustify/change > expand_assignment quite a bit. I have a patch for SRA that makes sure > to create properly aligned MEM_REFs but then we have, for example > > MEM[p].m = ... > > and in the

Re: [RFC] Fixing expansion of misaligned MEM_REFs on strict-alignment targets

2012-01-24 Thread Richard Guenther
On Fri, 6 Jan 2012, Martin Jambor wrote: > Hi, > > I'm trying to teach our expander how to deal with misaligned MEM_REFs > on strict alignment targets. We currently generate code which leads > to bus error signals due to misaligned accesses. > > I admit my motivation is not any target in partic

Re: [RFC] Fixing expansion of misaligned MEM_REFs on strict-alignment targets

2012-01-17 Thread Richard Guenther
On Tue, 17 Jan 2012, Eric Botcazou wrote: > > Eric, do you have any objections in principle of handling > > get_object_or_type_alignment () < GET_MODE_ALIGNMENT (mode) > > stores/loads this way? > > None, extract_bit_field/store_bit_field are the right devices for this > purpose. > What I have o

Re: [RFC] Fixing expansion of misaligned MEM_REFs on strict-alignment targets

2012-01-17 Thread Eric Botcazou
> Eric, do you have any objections in principle of handling > get_object_or_type_alignment () < GET_MODE_ALIGNMENT (mode) > stores/loads this way? None, extract_bit_field/store_bit_field are the right devices for this purpose. What I have objections against is to have types that are less aligned t

Re: [RFC] Fixing expansion of misaligned MEM_REFs on strict-alignment targets

2012-01-10 Thread Joseph S. Myers
On Tue, 10 Jan 2012, Richard Guenther wrote: > There is none :/ STRICT_ALIGNMENT would need to get a mode argument, The version of STRICT_ALIGNMENT with a mode argument is SLOW_UNALIGNED_ACCESS (from GCC's perspective, there isn't much difference between "unaligned accesses don't work at all"

Re: [RFC] Fixing expansion of misaligned MEM_REFs on strict-alignment targets

2012-01-10 Thread Richard Guenther
On Fri, 6 Jan 2012, Martin Jambor wrote: > Hi, > > I'm trying to teach our expander how to deal with misaligned MEM_REFs > on strict alignment targets. We currently generate code which leads > to bus error signals due to misaligned accesses. > > I admit my motivation is not any target in partic

[RFC] Fixing expansion of misaligned MEM_REFs on strict-alignment targets

2012-01-06 Thread Martin Jambor
Hi, I'm trying to teach our expander how to deal with misaligned MEM_REFs on strict alignment targets. We currently generate code which leads to bus error signals due to misaligned accesses. I admit my motivation is not any target in particular but simply being able to produce misaligned MEM_REF