qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Johan Rydberg <jrydberg@night.trouble.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] 64-bit target
Date: Mon, 30 Jun 2003 16:35:43 +0200	[thread overview]
Message-ID: <20030630163543.3e08a766.jrydberg@night.trouble.net> (raw)
In-Reply-To: <20030629232802.6a8b2d33.jrydberg@night.trouble.net>

Johan Rydberg <jrydberg@night.trouble.net> wrote:

: Fabrice Bellard <fabrice.bellard@free.fr> wrote:
: 
: : You can just use two parameters and load two 32 bit values.
: 
: Declaring T0 as a long long, and trying to set it to an immediate
: value results in the following code:  Which is a bit of an overhead
: I think :)

Using an union like this;

union fast_move { struct { USI hi; USI lo; } s; UDI d; } x;

And a macro like this;

#define GET_UDI_FROM_PARAMS(p1, p2) (((union fast_move) { { (USI) p1, (USI) p2 } }).d)

Reduces the code:

void OPPROTO
op_movdi_t0_uimm (void)
{
  T0 = GET_UDI_FROM_PARAMS (PARAM1, PARAM2);
}

To:

00000034 <op_movdi_t0_uimm>:
  34:   b8 00 00 00 00          mov    $0x0,%eax
                        35: R_386_32    __op_param1
  39:   ba 00 00 00 00          mov    $0x0,%edx
                        3a: R_386_32    __op_param2
  3e:   89 c6                   mov    %eax,%esi
  40:   89 d7                   mov    %edx,%edi

Can you figure out how to make it move to %esi and %edi directly?
I can, for one, not. 

-- 
Johan Rydberg, Free Software Developer, Sweden
http://rtmk.sf.net | http://www.nongnu.org/guss/

Playing Various Artists - Deftones / My Own Summer (Shove It)

      reply	other threads:[~2003-06-30 14:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-29 12:42 [Qemu-devel] 64-bit target Johan Rydberg
2003-06-29 13:22 ` Fabrice Bellard
2003-06-29 18:32   ` Johan Rydberg
2003-06-29 21:15     ` Fabrice Bellard
2003-06-29 21:28       ` Johan Rydberg
2003-06-30 14:35         ` Johan Rydberg [this message]

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=20030630163543.3e08a766.jrydberg@night.trouble.net \
    --to=jrydberg@night.trouble.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).