qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vince Weaver <vince@csl.cornell.edu>
To: qemu-devel@nongnu.org
Subject: re: [Qemu-devel] [5283] Use the new concat_tl_i64 op for std and stda
Date: Tue, 23 Sep 2008 17:49:13 -0400 (EDT)	[thread overview]
Message-ID: <20080923174506.X10311@stanley.csl.cornell.edu> (raw)

Hello

the aforementioned patch broke the spec2k crafty benchmark on 
sparc32plus-linux-user (I'm running on x86_64 but I don't think it makes a 
difference).

As always, the problem is when there are high bits (above 32) set when 
concating.

The old code generated:
    mov_i32 tmp11,tmp0
    mov_i32 tmp1,loc4
    movi_i64 tmp12,$0xffffffff
    and_i64 tmp10,tmp1,tmp12
    movi_i64 tmp12,$0x20
    shl_i64 tmp10,tmp10,tmp12
    movi_i64 tmp12,$0xffffffff
    and_i64 tmp2,tmp11,tmp12
    or_i64 tmp2,tmp2,tmp10
    qemu_st64 tmp2,loc5,$0x0

The new code generates:
    movi_i64 tmp12,$0x20
    shl_i64 tmp10,loc4,tmp12
    or_i64 tmp2,tmp0,tmp10
    qemu_st64 tmp2,loc5,$0x0

which generates wrong values because the low value being concatenated 
isn't masked/truncated to 32-bits first.

Vince

             reply	other threads:[~2008-09-23 21:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-23 21:49 Vince Weaver [this message]
2008-09-23 21:59 ` [Qemu-devel] [5283] Use the new concat_tl_i64 op for std and stda Paul Brook
2008-09-23 22:08   ` Vince Weaver
2008-09-23 22:31     ` Vince Weaver
2008-09-23 22:31     ` Paul Brook
  -- strict thread matches above, loose matches on Subject: below --
2008-09-21 18:43 Blue Swirl

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=20080923174506.X10311@stanley.csl.cornell.edu \
    --to=vince@csl.cornell.edu \
    --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).