From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,46e99d92dfdb296a,start X-Google-Attributes: gid1164f8,public From: peltz@cerl.uiuc.edu (Steve Peltz) Subject: Alpha: sign extend long Date: 1995/07/23 Message-ID: <3usqta$3he@vixen.cso.uiuc.edu>#1/1 X-Deja-AN: 106706876 organization: University Communications, Inc. newsgroups: comp.sys.dec 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