This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [commit, spu] Support clrsb
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: bernds at codesourcery dot com (Bernd Schmidt)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 13 Jul 2011 21:38:55 +0200 (CEST)
- Subject: Re: [commit, spu] Support clrsb
Bernd Schmidt wrote:
> On 07/13/11 21:22, Ulrich Weigand wrote:
> > several builtin-bitops-1.c tests have been failing recently on SPU
> > since the new clrsb builtin is not supported.
>
> That's odd, it should just have picked the libgcc function rather than
> causing test failures. Why didn't that happen?
That's the usual word_mode == TImode problem on SPU. By default, only
libgcc functions for word_mode and up are installed into the optabs
libfunc table. This means that on SPU, the default behaviour of GCC
is to call __clrsbti2, which of course does not exist in libgcc ...
This means that on SPU, all SImode/DImode libgcc routines that should
be called need to be installed into optabs specifically by the back-end.
That's what my patch does for __clrsbdi2. (For __clrsbsi2, I'm just
providing an in-line expander instead, no need to call a libfunc.)
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com