On Fri, Jan 8, 2016 at 7:36 PM, Steve Ellcey wrote:
> On Fri, 2016-01-08 at 12:56 +0100, Richard Biener wrote:
>> On Fri, Jan 8, 2016 at 12:40 PM, Eric Botcazou
>> wrote:
>> >> I think we only assume it if the pointer is actually dereferenced,
>> >> otherwise
>> >> it just breaks too much code
On Fri, 2016-01-08 at 12:56 +0100, Richard Biener wrote:
> On Fri, Jan 8, 2016 at 12:40 PM, Eric Botcazou
> wrote:
> >> I think we only assume it if the pointer is actually dereferenced,
> >> otherwise
> >> it just breaks too much code in the wild. And while memcpy dereferences,
> >> it derefer
On Fri, Jan 08, 2016 at 03:28:53PM +, paul_kon...@dell.com wrote:
> If it really is necessary to say that memcpy is defined to behave as if it
> had a cast to char* in its implementation, it would still be useful -- and
> obviously valid -- to rely on the greater alignment when there is other
> On Jan 8, 2016, at 6:32 AM, Jakub Jelinek wrote:
>
> On Fri, Jan 08, 2016 at 12:24:49PM +0100, Eric Botcazou wrote:
>>> See some existing PR. The GCC middle-end cannot assume that pointers
>>> are aligned according to their type (while at least the C language would
>>> support that notion).
>
On Fri, Jan 8, 2016 at 12:40 PM, Eric Botcazou wrote:
>> I think we only assume it if the pointer is actually dereferenced, otherwise
>> it just breaks too much code in the wild. And while memcpy dereferences,
>> it dereferences it through a char * cast, and thus only the minimum
>> alignment is
> I think we only assume it if the pointer is actually dereferenced, otherwise
> it just breaks too much code in the wild. And while memcpy dereferences,
> it dereferences it through a char * cast, and thus only the minimum
> alignment is assumed.
Yet the compiler was generating the expected code
On Fri, Jan 8, 2016 at 12:24 PM, Eric Botcazou wrote:
>> See some existing PR. The GCC middle-end cannot assume that pointers
>> are aligned according to their type (while at least the C language would
>> support that notion).
>
> Only on x86. It could (and used to) do it on strict-alignment arc
On Fri, Jan 08, 2016 at 12:24:49PM +0100, Eric Botcazou wrote:
> > See some existing PR. The GCC middle-end cannot assume that pointers
> > are aligned according to their type (while at least the C language would
> > support that notion).
>
> Only on x86. It could (and used to) do it on strict-a
> See some existing PR. The GCC middle-end cannot assume that pointers
> are aligned according to their type (while at least the C language would
> support that notion).
Only on x86. It could (and used to) do it on strict-alignment architectures.
--
Eric Botcazou
On Thu, Jan 7, 2016 at 9:05 PM, Steve Ellcey wrote:
> I have a question about __builtin_memcpy and alignment. While working on
> MIPS I noticed that this program:
>
> void foo(int *a, int *b)
> {
> __builtin_memcpy (a, b, 8);
> }
>
> Is generating the following MIPS code (allowing for any
10 matches
Mail list logo