Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KeBVN-0003lJ-Vk for qemu-devel@nongnu.org; Fri, 12 Sep 2008 12:28:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KeBVL-0003iy-IN for qemu-devel@nongnu.org; Fri, 12 Sep 2008 12:28:20 -0400 Received: from [199.232.76.173] (port=49796 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KeBVL-0003in-8T for qemu-devel@nongnu.org; Fri, 12 Sep 2008 12:28:19 -0400 Received: from mail-gx0-f19.google.com ([209.85.217.19]:57189) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KeBVL-00036O-Bi for qemu-devel@nongnu.org; Fri, 12 Sep 2008 12:28:19 -0400 Received: by gxk12 with SMTP id 12so19290244gxk.10 for ; Fri, 12 Sep 2008 09:28:18 -0700 (PDT) Message-ID: Date: Fri, 12 Sep 2008 19:28:17 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] sparc y register In-Reply-To: <20080912113135.P41452@stanley.csl.cornell.edu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_107_3292636.1221236897422" References: <20080911105538.B37531@stanley.csl.cornell.edu> <20080912113135.P41452@stanley.csl.cornell.edu> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ------=_Part_107_3292636.1221236897422 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 9/12/08, Vince Weaver wrote: > > On Thu, 11 Sep 2008, Blue Swirl wrote: > > > Thanks, I applied a fix based on this. There was also a similar > > problem in mulscc, maybe your tests run better now? > > > > So it turns out there are three problems: > 1. mulscc when y has upper word bits set > 2. mulscc when src1 has upper word bits set > 3. mulscc when src2 has upper word bits set > > The patch from yesterday fixed case 1, but there were still problems for > 2&3. > > Below is a patch I made that seems to get this all working properly. I've > also attached a small test program that exhibits the 3 problems... > > I'm running the big Fortran program again, but it would take a few hours to > finish if this is a proper fix so I thought I'd send this off now rather > than waiting. It's not proper to use i32 operations on i64 TCG registers. So I'd add explicit masking operations. With this patch applied, I get: Test1: High bits in y : Pass Test2: High bits in src : Pass Test3: High bits in src2 : Pass ------=_Part_107_3292636.1221236897422 Content-Type: plain/text; name=fix_mulscc_high_bits.diff Content-Transfer-Encoding: base64 X-Attachment-Id: f_fl10vpqr Content-Disposition: attachment; filename=fix_mulscc_high_bits.diff SW5kZXg6IHFlbXUvdGFyZ2V0LXNwYXJjL3RyYW5zbGF0ZS5jCj09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHFlbXUu b3JpZy90YXJnZXQtc3BhcmMvdHJhbnNsYXRlLmMJMjAwOC0wOS0xMiAxNjoxMToyNS4wMDAwMDAw MDAgKzAwMDAKKysrIHFlbXUvdGFyZ2V0LXNwYXJjL3RyYW5zbGF0ZS5jCTIwMDgtMDktMTIgMTY6 MTk6MTMuMDAwMDAwMDAwICswMDAwCkBAIC02OTcsOSArNjk3LDkgQEAKICAgICBpZiAoIShlbnYt PnkgJiAxKSkKICAgICAgICAgVDEgPSAwOwogICAgICovCi0gICAgdGNnX2dlbl9tb3ZfdGwoY3B1 X2NjX3NyYywgc3JjMSk7CisgICAgdGNnX2dlbl9hbmRpX3RsKGNwdV9jY19zcmMsIHNyYzEsIDB4 ZmZmZmZmZmYpOwogICAgIHRjZ19nZW5fYW5kaV90bChyX3RlbXAsIGNwdV95LCAweDEpOwotICAg IHRjZ19nZW5fbW92X3RsKGNwdV9jY19zcmMyLCBzcmMyKTsKKyAgICB0Y2dfZ2VuX2FuZGlfdGwo Y3B1X2NjX3NyYzIsIHNyYzIsIDB4ZmZmZmZmZmYpOwogICAgIHRjZ19nZW5fYnJjb25kaV90bChU Q0dfQ09ORF9ORSwgcl90ZW1wLCAwLCBs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