Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Umulh - when to call ( wheres that overflow )
@ 1996-12-07 22:26 Uncle George
  0 siblings, 0 replies; only message in thread
From: Uncle George @ 1996-12-07 22:26 UTC (permalink / 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-12-07 22:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-12-07 22:26 Umulh - when to call ( wheres that overflow ) Uncle George

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox