From: Blue Swirl <blauwirbel@gmail.com>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC] tcg: store constants without using registers when possible
Date: Mon, 28 Sep 2009 21:08:32 +0300 [thread overview]
Message-ID: <f43fc5580909281108p1720e98dm421b858715da6392@mail.gmail.com> (raw)
In-Reply-To: <20090928091208.GB22663@hall.aurel32.net>
On Mon, Sep 28, 2009 at 12:12 PM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> Currently only implemented for x86/x86_64. It may also be implemented
> for targets that keep one register for TCG internal use.
Nice, but do you think the op will be used often?
> --- a/tcg/sparc/tcg-target.c
> +++ b/tcg/sparc/tcg-target.c
> @@ -392,6 +392,15 @@ static inline void tcg_out_st(TCGContext *s, TCGType type, int arg,
> tcg_out_ldst(s, arg, arg1, arg2, STX);
> }
>
> +static inline int tcg_out_sti(TCGContext *s, TCGType type, tcg_target_long val,
> + int arg1, tcg_target_long arg2)
> +{
> + /* movl */
> + tcg_out_modrm_offset(s, 0xc7, 0, arg1, arg2);
> + tcg_out32(s, val);
> + return 1;
> +}
> +
Sparc doesn't have store immediate ops, except for val == 0 case:
static inline int tcg_out_sti(TCGContext *s, TCGType type, tcg_target_long val,
int arg1, tcg_target_long arg2)
{
if (val != 0) {
return 0;
}
/* clr/clrx */
tcg_out_st(s, type, TCG_REG_G0, arg1, arg2);
return 1;
}
next prev parent reply other threads:[~2009-09-28 18:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-28 9:12 [Qemu-devel] [RFC] tcg: store constants without using registers when possible Aurelien Jarno
2009-09-28 18:08 ` Blue Swirl [this message]
2009-09-28 19:22 ` Aurelien Jarno
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=f43fc5580909281108p1720e98dm421b858715da6392@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).