Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: peltz@cerl.uiuc.edu (Steve Peltz)
Subject: Alpha: sign extend long
Date: 1995/07/23	[thread overview]
Message-ID: <3usqta$3he@vixen.cso.uiuc.edu> (raw)

It looks to me as if it would be faster to sign-extend a longword by
doing a "addl $x, $31, $y" instead of the sequence used in at least
the "intended sequence for loading and sign-extending a longword from
unaligned address", which is to do "sll $x, #32, $y", then "sra $y, #32, $y".

Is there something about the addl that makes it slower than two shifts, or
some other reason not to do that? Or am I totally confused about addl? Of
course, you could use subl instead of addl, it should be same speed, I'd
guess.

Does an addl/subl take longer than an addq/subq?

Obviously, the answers to both questions are implementation dependent...I'm
interested in both intended code sequences and current implementations.
-- 
Steve Peltz
tricorn@uiuc.edu



             reply	other threads:[~1995-07-23  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-07-23  4:00 Steve Peltz [this message]
1995-07-24  4:00 ` Alpha: sign extend long Carl J. Appellof
1995-07-25  4:00 ` Peter Sherwood
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