From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,46e99d92dfdb296a X-Google-Attributes: gid1164f8,public From: "Carl J. Appellof" Subject: Re: Alpha: sign extend long Date: 1995/07/24 Message-ID: <3v0g5o$hl3@ninja.zso.dec.com>#1/1 X-Deja-AN: 106867071 references: <3usqta$3he@vixen.cso.uiuc.edu> content-type: text/plain; charset=us-ascii organization: Digital Equipment Corporation mime-version: 1.0 newsgroups: comp.sys.dec x-mailer: Mozilla 1.1 (Windows; I; 32bit) peltz@cerl.uiuc.edu (Steve Peltz) wrote: >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". The cc compiler on Digital UNIX uses "addl $x, $31, $y" when you do int myint; unsigned int myuint; myint = (int)myuint; I've never seen it use sll/sra. -- Carl Appellof not speaking for Digital Equipment Corporation