Re: BImode is treated as normal byte-wide mode and causes bug.

2010-12-22 Thread Paolo Bonzini

On 12/20/2010 12:43 PM, Claudiu Zissulescu wrote:

Hi,

Why don't you use a define_insn "zero_extendbisi2" which generates
your conversion instruction.


You're right that this should be a valid workaround, but Bingfeng 
reported a bug indeed.


(zero_extend:SI (reg:BI 120))

should have been transformed to

(and:SI (subreg:SI (reg:BI 120) 0)
(const_int 1 [0xff]))

and

(subreg:QI (zero_extend:SI (reg:BI 120)) 0)

to

(and:QI (subreg:QI (reg:BI 120) 0)
(const_int 1 [0xff]))

That said, his observation that


Grep GET_MODE_PRECISION returns not many results.


... misses that GET_MODE_MASK will also return the correct value for 
fractional integer modes.  This macro has quite a few occurrences in 
combine and elsewhere.


Paolo


RE: BImode is treated as normal byte-wide mode and causes bug.

2010-12-22 Thread Bingfeng Mei


> -Original Message-
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo
> Bonzini
> Sent: 22 December 2010 14:33
> To: Claudiu Zissulescu
> Cc: Bingfeng Mei; gcc@gcc.gnu.org
> Subject: Re: BImode is treated as normal byte-wide mode and causes bug.
> 
> On 12/20/2010 12:43 PM, Claudiu Zissulescu wrote:
> > Hi,
> >
> > Why don't you use a define_insn "zero_extendbisi2" which generates
> > your conversion instruction.
> 
> You're right that this should be a valid workaround, but Bingfeng
> reported a bug indeed.
> 
I guess Claudiu meant define_expand. There could be several workarounds, one
of which I am using now. 

> (zero_extend:SI (reg:BI 120))
> 
> should have been transformed to
> 
> (and:SI (subreg:SI (reg:BI 120) 0)
>  (const_int 1 [0xff]))
> 
> and
> 
> (subreg:QI (zero_extend:SI (reg:BI 120)) 0)
> 
> to
> 
> (and:QI (subreg:QI (reg:BI 120) 0)
>  (const_int 1 [0xff]))
> 
> That said, his observation that
> 
> > Grep GET_MODE_PRECISION returns not many results.
> 
> ... misses that GET_MODE_MASK will also return the correct value for
> fractional integer modes.  This macro has quite a few occurrences in
> combine and elsewhere.

Thanks for letting me know this. Since only our target experiences such
issue, I guess no other processors have such requirements of manipulating
BImode. I can live with the workaround now. 

Bingfeng






Re: BImode is treated as normal byte-wide mode and causes bug.

2010-12-22 Thread Paolo Bonzini

On 12/22/2010 03:43 PM, Bingfeng Mei wrote:

Thanks for letting me know this. Since only our target experiences such
issue, I guess no other processors have such requirements of manipulating
BImode. I can live with the workaround now.


Perhaps Blackfin, but it has a BI->SI extension instruction so it 
doesn't see this bug.


Paolo


Re: libquadmath: configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.

2010-12-22 Thread Joel Sherrill

On 12/21/2010 03:44 PM, Tobias Burnus wrote:

Joel Sherrill wrote:

I was experimenting with adding microblaze-rtems*
and got this error:

  >

checking for sqrtl in -lm... configure: error: Link tests are not
allowed after GCC_NO_EXECUTABLES.
make[1]: *** [configure-target-libquadmath] Error 1

I am puzzled: While this issue existed, it should be fixed as
configure.ac now contains:


I can confirm that I didn't update.  It was fixed after
I updated.

Sorry.

if test x$gcc_no_link != xyes; then
AC_CHECK_LIB([m],[sqrtl],[AC_DEFINE([HAVE_SQRTL],[1],
 [libm includes sqrtl])])
AC_CHECK_LIB([m],[cbrtl],[AC_DEFINE([HAVE_CBRTL],[1],
 [libm includes cbrtl])])
else
   ...

This part has been committed Sun Dec 19 19:01:38 2010 +. Thus, the
big question is: Why does it not work for you?

If you have an older version: Can you try again? And please report the
result, namely: Does it work now or is there another additional issue?

If you have the current version: Well, then I am completely puzzled -
and you need to do more debugging work.

Tobias

PS: A work around is --disable-libquadmath; however, the idea (PR 46520)
is to have this completely fixed. Thus, I would prefer if you do not use
the work around and rather check whether it is now working.




Re: How can I add 256bits register file to a MIPS port?

2010-12-22 Thread Liu
Thanks for your pointing. I'll try my best.

2010/12/21 Ian Lance Taylor :
> Liu  writes:
>
>> I changed FIXED_REGISTERS into 0, FIXED_REGISTERS into 1,
>> CALL_REALLY_USED_REGISTERS into 1.
>>
>> build and test it, but I still get the same error.
>
> Have you updated HARD_REGNO_MODE_OK?
>
> I encourage you to carefully read the gcc internals manual.  It's pretty
> good on this kind of thing.
>
> Ian
>