longlong.h macros for common PPC
Geoff Keating
geoffk@ozemail.com.au
Tue Nov 23 21:43:00 GMT 1999
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>
More information about the Gcc-bugs
mailing list