Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Uncle George <gatgul@voicenet.com>
Subject: Umulh - when to call ( wheres that overflow )
Date: Sat, 07 Dec 1996 17:26:24 -0500	[thread overview]
Message-ID: <668a6d686f3f954838cc8e4af9ad9960.axp-list@archive.invalid> (raw)

sorry to take that long to get back.

a umul takes X cycles.
a umulh takes Y cycles. 

The probability of doing a umul is 100%.
the probability of doing a umulh is somewhat less. Problem is when
must i do the umulh in order to get the overflow of 2 48 bit
multiplys.

1)	If I dont know any better, then the simplist would be 
	umul, followed by the umulh. therfor every multiply is
	guarenteed to be X + Y cycles.
2)	If I knew that the 48bit mult never overflows, then i can
	guarentee the operation to be just X cycle.
3)	If I can get an overflow condition, then I can just operate
	at X cycles, until an overflow happens where I would need to
	use the Y cycles to do the umulh + the # of cycles for the
	overflow condition.
	

	It would seem that if the overflow condition happens infrequently
	then I'm a winner ( # of operations * Y cycles < #cycles for
	overflow condition ).
	If overflow happens frequently, then the execution of UMULH is
	always warrented.
	At what point is the break even point. I's got to no.

gat

--
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

                 reply	other threads:[~1996-12-07 22:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
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