From: Martin Pool <mbp@samba.org>
To: linux-ia64@vger.kernel.org
Subject: Re: Conversion between different types on IA-64
Date: Wed, 30 Jul 2003 03:55:43 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105953748000656@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105951522415896@msgid-missing>
On 30 Jul 2003, CH Gowri Kumar <gkumar@csa.iisc.ernet.in> 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
next prev parent reply other threads:[~2003-07-30 3:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-29 21:54 Conversion between different types on IA-64 CH Gowri Kumar
2003-07-30 3:55 ` Martin Pool [this message]
2003-07-30 10:20 ` CH Gowri Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ia64-105953748000656@msgid-missing \
--to=mbp@samba.org \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.