This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: longlong.h macros for common PPC
- To: drepper at cygnus dot com (Ulrich Drepper)
- Subject: Re: longlong.h macros for common PPC
- From: Geoff Keating <geoffk at ozemail dot com dot au>
- Date: 24 Nov 1999 14:33:29 +1100
- CC: gcc-bugs at gcc dot gnu dot org
- References: <m33dtynhgn.fsf@localhost.localnet>
Ulrich Drepper <drepper@cygnus.com> writes:
> When using the longlong.h definitions with the common PPC instruction
> set selected one gets the POWER definition of the macros umul_ppmm and
> smul_ppmm which results in chaos. This must have been broken for
> quite some time. I found this on AIX 4.3 wile compiling glibc which
> uses the longlong.h definitions internally.
>
> I don't know how to fix this right now. Using the PowerPC
> instructions also does not work since the mulhwu opcodes etc are not
> in the common instruction set.
If I remember correctly, there simply isn't a 32x32->64 multiply that
is common to both the power and ppc instruction sets, so you're stuck.
The only multiply instruction available is a 32x32->32.
If you allow _both_ power and ppc, you want to use the power version
with the MQ register, because reading the MQ is faster than a
multiply-high instruction.
--
Geoffrey Keating <geoffk@cygnus.com>