From: David Mosberger <davidm@azstarnet.com>
Subject: Re: Multiply Overflow - when to use UMULH
Date: Tue, 26 Nov 1996 13:55:12 -0700 (MST) [thread overview]
Message-ID: <199611262055.NAA19707@web.azstarnet.com> (raw)
> > > 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.
It's even worse: the integer overflow traps are imprecise (like the fp
traps), so, in general, you cannot reliably determine the source of
the exception _unless_ the code has been compiled especially. The
current gcc has support to do so, but I don't think trap support for
integer ops has been done (the gcc backend never generates trapping
integer ops; I suppose the Ada backend might change that, in which
case it might make sense to support this fully).
--david
--
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
next reply other threads:[~1996-11-26 20:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-11-26 20:55 David Mosberger [this message]
[not found] <3298F541.3304@voicenet.com>
1996-11-26 20:05 ` Multiply Overflow - when to use UMULH Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
1996-11-25 1:24 Uncle George
[not found] <329844BB.670E@voicenet.com>
1996-11-24 17:07 ` Richard Henderson
1996-11-24 12:51 Uncle George
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox