Re: [PATCH] Pass correct memory attributes for build constant

2014-06-29 Thread Kito Cheng
>>test.c: >>extern bar(unsigned char p[3][2]); >>void foo(int i) >>{ >> unsigned char data[3][2] = {{1,1}, {1,0}, {1,1}}; >> >> bar(data); >>} > First, note, I'm not an ARM expert. However, the first question I > have is are we sure the initializer is always going to be suitably > aligned?

Re: [PATCH] Pass correct memory attributes for build constant

2014-06-27 Thread Jan Hubicka
> On 06/25/14 21:38, Kito Cheng wrote: > >For example in arm-elf-eabi, movmem need word align, otherwise it will > >expand a libcall: > > > >And gcc configure with "--target=arm-elf-eabi --disable-nls > >--disable-shared --enable-languages=c,c++ --enable-threads=single > >--enable-lto --with-newlib

Re: [PATCH] Pass correct memory attributes for build constant

2014-06-27 Thread Jeff Law
On 06/25/14 21:38, Kito Cheng wrote: For example in arm-elf-eabi, movmem need word align, otherwise it will expand a libcall: And gcc configure with "--target=arm-elf-eabi --disable-nls --disable-shared --enable-languages=c,c++ --enable-threads=single --enable-lto --with-newlib" test.c: extern

Re: [PATCH] Pass correct memory attributes for build constant

2014-06-25 Thread Kito Cheng
For example in arm-elf-eabi, movmem need word align, otherwise it will expand a libcall: And gcc configure with "--target=arm-elf-eabi --disable-nls --disable-shared --enable-languages=c,c++ --enable-threads=single --enable-lto --with-newlib" test.c: extern bar(unsigned char p[3][2]); void foo(in

Re: [PATCH] Pass correct memory attributes for build constant

2014-06-25 Thread Jeff Law
On 06/25/14 09:35, Kito Cheng wrote: Hi all: This patch is fix constant memory's symbol_ref don't have right alignment info since `exp` don't set alignment (and should not set alignment info for `exp`) , use `decl` to set_mem_attributes for right alignment info. ChangLog 2014-06-25 Kito Che

[PATCH] Pass correct memory attributes for build constant

2014-06-25 Thread Kito Cheng
Hi all: This patch is fix constant memory's symbol_ref don't have right alignment info since `exp` don't set alignment (and should not set alignment info for `exp`) , use `decl` to set_mem_attributes for right alignment info. ChangLog 2014-06-25 Kito Cheng * varasm.c (build_constant