From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Pool Date: Wed, 30 Jul 2003 03:55:43 +0000 Subject: Re: Conversion between different types on IA-64 Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-ia64@vger.kernel.org On 30 Jul 2003, CH Gowri Kumar wrote: > Hi all, > Can anyone point me to a source of how to convert from a > wider size to narrow size (long to int, int to char etc.) on IA-64? > > For the other way round(narrow to wider), I could find SXT(sign extend) > and ZXT(zero extend) instructions. > > gcc seems(but not sure) to be storing the original value and loading it > using the appropriate LD* instruction. In C just a cast ought to do it. In asm it seems like you can either ST and then LD4/LD2/LD1, or use AND or EXTR. Sorry if I'm misunderstanding your question. -- Martin