Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 79232 invoked from network); 15 May 2007 12:24:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 May 2007 12:24:37 -0000 Received: (qmail 47056 invoked by uid 500); 15 May 2007 12:24:43 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 47028 invoked by uid 500); 15 May 2007 12:24:43 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 47019 invoked by uid 99); 15 May 2007 12:24:43 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 May 2007 05:24:43 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 May 2007 05:24:36 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 51AD571406A for ; Tue, 15 May 2007 05:24:16 -0700 (PDT) Message-ID: <30011781.1179231856332.JavaMail.jira@brutus> Date: Tue, 15 May 2007 05:24:16 -0700 (PDT) From: "Alexey Varlamov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Closed: (HARMONY-1861) [drlvm][jit] Double arithmetic instructions work incorrectly (Jitrino JET) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-1861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexey Varlamov closed HARMONY-1861. ------------------------------------ Resolution: Fixed Fixed at r538151, added reg test. > [drlvm][jit] Double arithmetic instructions work incorrectly (Jitrino JET) > -------------------------------------------------------------------------- > > Key: HARMONY-1861 > URL: https://issues.apache.org/jira/browse/HARMONY-1861 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Environment: Linux IA-32, Windows IA-32 > Reporter: Irina Arkhipets > Assigned To: Alexey Varlamov > Attachments: H1861.diff, H1861.diff, test.java > > > Double arithmetic and compare operations (instructions: ddiv, drem, dadd, dsub, dcmpl, dcmpg) return incorrect result if the first argument is the value of double non-static field and the second argument is an element of array of long values. > I am able to reproduce this bug with Jitrino JET only, the testcase below always passes with interpreter, opt, client, server and server_static. > Please, compile and run the following test example with "-Xem:jet" switch to reproduce the failure: > ... > public class test { > public static long [] arr = new long [] {6, 25, 50}; > public static test t = new test(); > public double d = 30d; > public static void main (String [] args) { > double d1= t.d / arr[0]; > if (d1 == 5.0d) { > System.out.println("double/long PASSED"); > } else { > System.out.println("double/long FAILED: " + d1); > } > d1= t.d % arr[1]; > if (d1 == 5.0d) { > System.out.println("double%long PASSED"); > } else { > System.out.println("double%long FAILED: " + d1); > } > d1= t.d - arr[1]; > if (d1 == 5.0d) { > System.out.println("double-long PASSED"); > } else { > System.out.println("double-long FAILED: " + d1); > } > d1= t.d + arr[0]; > if (d1 == 36.0d) { > System.out.println("double+long PASSED"); > } else { > System.out.println("double+long FAILED: " + d1); > } > boolean b = (t.d >= arr[0]); > if (b) { > System.out.println("double>=long PASSED"); > } else { > System.out.println("double>=long FAILED: " + b); > } > b = (t.d < arr[1]); > if (!b) { > System.out.println("double } else { > System.out.println("double } > } > } > ... > Please, note the following: > 1. Tes output differs on Linux and Windows platforms, and dcmpl, dcmpg testcases even pass on Linux. > 2. The test passes with JET if d variable is declared as static (" public static double d = 30d") > 3. The test passes with JET if the second arguments for all operations are declared just as long variables (i.e. not an array memners) > Sample outpit on Windows is: > ... > double/long FAILED: 4.62863868563952E-309 > double%long FAILED: 1.884906858420811E-225 > double-long FAILED: -25.0 > double+long FAILED: 6.0 > double>=long FAILED: false > double ... > Sample output on Linux is: > ... > double/long FAILED: -1.980992325586801E147 > double%long FAILED: 16.0 > double-long FAILED: 5.91906791E8 > double+long FAILED: 5.91906822E8 > double>=long PASSED > double ... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.