From: "Blue Swirl" <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] one more SPARC issue
Date: Wed, 6 Aug 2008 22:55:22 +0300 [thread overview]
Message-ID: <f43fc5580808061255s5797cd4en22be2483135aeb36@mail.gmail.com> (raw)
In-Reply-To: <20080806152607.J61277@stanley.csl.cornell.edu>
On 8/6/08, Vince Weaver <vince@csl.cornell.edu> wrote:
>
> I found one last SPARC issue, this time with the falign() function.
>
> This one was a pain to track down because gdb won't let you show the %gsr
> register, or any of the floating point registers above %f32.
>
> The falign code does this:
>
> tmp = (*((uint64_t *)&DT0)) << ((env->gsr & 7) * 8);
> tmp |= (*((uint64_t *)&DT1)) >> (64 - (env->gsr & 7) * 8);
>
> But in the case where %gsr is zero, the second case turns into a
> shift left of 64, which on many architectures turns into a no-op (rather
> than clearning the result to zero).
>
> So in this case, the output of the falign was rs1 *or'd* with rs2, rather
> than just plain rs1.
>
> I've included a patch below that fixes things for me, and I've also
> attached a test case that shows the bug.
>
> With this, I can finally run the spec 2006 bzip2 benchmark to completion
> under sparc32plus-linux-user
Thanks, applied.
There are still other bugs:
dd if=/dev/zero bs=3334 count=1 | ./qemu-sparc64 -L . -d in_asm,op_opt
../bzip2.sparc64 | bzcat | hexdump -C
1+0 records in
1+0 records out
3334 bytes (3.3 kB) copied, 3.4e-05 seconds, 98.1 MB/s
bzip2.sparc64: Caught a SIGSEGV or SIGBUS whilst compressing.
Possible causes are (most likely first):
(1) This computer has unreliable memory or cache hardware
(a surprisingly common problem; try a different machine.)
(2) A bug in the compiler used to create this executable
(unlikely, if you didn't compile bzip2 yourself.)
(3) A real bug in bzip2 -- I hope this should never be the case.
The user's manual, Section 4.3, has more info on (1) and (2).
If you suspect this is a bug in bzip2, or are unsure about (1)
or (2), feel free to report it to me at: jseward@bzip.org.
Section 4.3 of the user's manual describes the info a useful
bug report should have. If the manual is available on your
system, please try and read it before mailing me. If you don't
have the manual or can't be bothered to read it, mail me anyway.
Input file = (stdin), output file = (stdout)
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000d00 00 00 00 00 00 00 |......|
00000d06
With bs=3333 it works as expected.
next prev parent reply other threads:[~2008-08-06 19:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-29 3:32 [Qemu-devel] x86 tcg problem Vince Weaver
2008-07-29 8:46 ` Laurent Desnogues
2008-07-29 13:43 ` Vince Weaver
2008-07-29 18:24 ` malc
2008-07-29 18:33 ` Laurent Desnogues
2008-07-29 17:18 ` Blue Swirl
2008-08-05 20:20 ` [Qemu-devel] another SPARC issue Vince Weaver
2008-08-05 20:36 ` Laurent Desnogues
2008-08-06 2:33 ` Vince Weaver
2008-08-06 8:17 ` Laurent Desnogues
2008-08-06 15:29 ` Blue Swirl
2008-08-06 19:31 ` [Qemu-devel] one more " Vince Weaver
2008-08-06 19:45 ` Julian Seward
2008-08-06 19:55 ` Blue Swirl [this message]
2008-07-29 17:51 ` [Qemu-devel] x86 tcg problem 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=f43fc5580808061255s5797cd4en22be2483135aeb36@mail.gmail.com \
--to=blauwirbel@gmail.com \
--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).