Re: memset and host char requirement

2012-07-31 Thread Richard Guenther
On Mon, Jul 30, 2012 at 5:29 PM, Paulo J. Matos wrote: > On 26/07/12 15:04, Joseph S. Myers wrote: >> >> On Thu, 26 Jul 2012, Paulo J. Matos wrote: >> >>> My target has 16bit chars. >> >> >> As I explained before, support for such targets is extremely limited and >> bitrotten (this applies whether

Re: memset and host char requirement

2012-07-30 Thread Paulo J. Matos
On 26/07/12 15:04, Joseph S. Myers wrote: On Thu, 26 Jul 2012, Paulo J. Matos wrote: My target has 16bit chars. As I explained before, support for such targets is extremely limited and bitrotten (this applies whether it is BITS_PER_UNIT, CHAR_TYPE_SIZE or both that are not 8) and a large amou

Re: memset and host char requirement

2012-07-26 Thread Joseph S. Myers
On Thu, 26 Jul 2012, Paulo J. Matos wrote: > My target has 16bit chars. As I explained before, support for such targets is extremely limited and bitrotten (this applies whether it is BITS_PER_UNIT, CHAR_TYPE_SIZE or both that are not 8) and a large amount of work, and global GCC expertise and

Re: memset and host char requirement

2012-07-26 Thread Richard Guenther
On Thu, Jul 26, 2012 at 2:32 PM, Paulo J. Matos wrote: > On 26/07/12 13:27, Richard Guenther wrote: >>> >>> Why would the fill value in a memset call be required to fit in a host >>> char? >> >> >> Obviously because of the implementation detail of its caller. >> >> Richard. >> > > Richard, I am so

Re: memset and host char requirement

2012-07-26 Thread Andrew Haley
On 07/26/2012 01:32 PM, Paulo J. Matos wrote: > On 26/07/12 13:27, Richard Guenther wrote: >>> Why would the fill value in a memset call be required to fit in a host char? >> >> Obviously because of the implementation detail of its caller. > > Richard, I am sorry if I was not more clear. I underst

Re: memset and host char requirement

2012-07-26 Thread Paulo J. Matos
On 26/07/12 13:27, Richard Guenther wrote: Why would the fill value in a memset call be required to fit in a host char? Obviously because of the implementation detail of its caller. Richard. Richard, I am sorry if I was not more clear. I understand that this is required because the caller

Re: memset and host char requirement

2012-07-26 Thread Richard Guenther
On Thu, Jul 26, 2012 at 2:11 PM, Paulo J. Matos wrote: > Hi, > > My target has 16bit chars. > What I am seeing is that in a memset call, the call is not inlined by GCC > whenever fill value is bigger than host char. > > This seems to be due to the code (GCC 4.6.5) in target_char_cast > (builtins.c

memset and host char requirement

2012-07-26 Thread Paulo J. Matos
Hi, My target has 16bit chars. What I am seeing is that in a memset call, the call is not inlined by GCC whenever fill value is bigger than host char. This seems to be due to the code (GCC 4.6.5) in target_char_cast (builtins.c), called from expand_builtin_memset_args: static int target_cha