[Open-graphics] Multipliers in oga1hq

Paul Brook paul at codesourcery.com
Fri Aug 31 22:42:33 EDT 2007


> The other question is, is this even beneficial? I seem to recall that
> zeros occur quite commonly. Even in the MIPS ISA, r0 is just a hardwired
> zero because of this if i remember right... so that is my justification
> for doing this.

I'd expect multiplication by zero to be relatively rare.
One of the advantages of a zero register is that some unary operations can be 
implemented as a binary operation with a zero operand. e.g. x = -y can be 
implemented as x = 0 - y without requiring an extra instruction.

Early termination when the high bits are zero (ie. small values) would be more 
useful. I've no idea how hard that is to achieve though.

Paul


More information about the Open-graphics mailing list