Re: Multiply Overflow - when to use UMULH

Richard Henderson (richard@atheist.tamu.edu)
Tue, 26 Nov 1996 14:05:02 -0600 (CST)

> > Eh? There is no overflow bit. There is is no PSW to put one in.
> > Thus doing umul and umulh sequentially is your only option.
>
> FROM pg 4-30 Common architecture (i)
> 4.4.8 Quadword Multiply
[...]
> Qualifiers:
> Integer Overflow Enable /V

That's not nearly the same thing as a PSW overflow bit.

To use that you'd have to catch SIGFPE, decode the instruction to
figure out where the operands are, calculate the overflow bits,
figure out what to do with them such that the mainline will find
it, and find some place to resume execution.

All in all, a grand mess all to save 14 cycles. Thus to even be
considered an option you would want to show that the multiply is
in the center of the processing loop and that operands that would
overflow are exceedingly rare.

If you do decide to go for it, I'd suggest you look at the exception
handling code from the 2.1.x series kernels -- the same sort of
thing could be applied here if the need were demonstrated.

r~

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com



Feedback | Store | News | Support | Product Errata | About Us | Linux Info | Search | JumpWords
No Frames | Show Frames

Copyright © 1995-1997 Red Hat Software. Legal notices