Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 43551 invoked from network); 25 Oct 2007 13:04:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Oct 2007 13:04:43 -0000 Received: (qmail 88261 invoked by uid 500); 25 Oct 2007 13:04:30 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 88237 invoked by uid 500); 25 Oct 2007 13:04:30 -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 88143 invoked by uid 99); 25 Oct 2007 13:04:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Oct 2007 06:04:29 -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; Thu, 25 Oct 2007 13:04:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0522E714243 for ; Thu, 25 Oct 2007 06:03:51 -0700 (PDT) Message-ID: <18471347.1193317431018.JavaMail.jira@brutus> Date: Thu, 25 Oct 2007 06:03:51 -0700 (PDT) From: "Pavel Pervov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-5021) [drlvm][encoder] native methods returning jchar can't return values greater than 255 on x86-64 platforms In-Reply-To: <25906096.1193316593732.JavaMail.jira@brutus> 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-5021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537586 ] Pavel Pervov commented on HARMONY-5021: --------------------------------------- This issue is the reason of failure of the following 9 VTSVM tests on x86-64: vm.jni.object_methods.CallCharMethodATest vm.jni.object_methods.CallCharMethodTest vm.jni.object_methods.CallCharMethodVTest vm.jni.object_methods.CallNonvirtualCharMethodATest vm.jni.object_methods.CallNonvirtualCharMethodTest vm.jni.object_methods.CallNonvirtualCharMethodVTest vm.jni.static_methods.CallStaticCharMethodATest vm.jni.static_methods.CallStaticCharMethodTest vm.jni.static_methods.CallStaticCharMethodVTest > [drlvm][encoder] native methods returning jchar can't return values greater than 255 on x86-64 platforms > -------------------------------------------------------------------------------------------------------- > > Key: HARMONY-5021 > URL: https://issues.apache.org/jira/browse/HARMONY-5021 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Environment: x86-64 > Reporter: Pavel Pervov > Attachments: char16.zip > > > I managed to trace the problem to encoder. > It is not possible to encode "movzx r64, r16" operation on x86-64. > Here is the stack trace from encoding JNI jnvocation stub. > harmonyvm.dll!EncoderBase::lookup(Mnemonic mn=Mnemonic_MOVZX, const EncoderBase::Operands & opnds={...}) Line 731 C++ > harmonyvm.dll!EncoderBase::encode(char * stream=0x000000000529fdf1, Mnemonic mn=Mnemonic_MOVZX, const EncoderBase::Operands & opnds={...}) Line 291 + 0x14 bytes C++ > harmonyvm.dll!movzx(char * stream=0x000000000529fdf1, const R_Opnd & r={...}, const RM_Opnd & rm={...}, Opnd_Size sz=size_16) Line 363 C++ > >harmonyvm.dll!LcgEM64TCodeGen::un_op_rm(LilOperation o=LO_Zx2, const LcgEM64TLoc * dest=0x00000000052a9e80, const LcgEM64TLoc * src=0x00000000052a9e90) Line 852 + 0x34 bytes C++ > harmonyvm.dll!LcgEM64TCodeGen::asgn(LilVariable * dest=0x0000000005280e74, LilOperation o=LO_Zx2, LilOperand * op1=0x0000000005280e80, LilOperand * op2=0x0000000005280e98) Line 1267 C++ > harmonyvm.dll!lil_visit_instruction(LilInstruction * i=0x0000000005280e68, LilInstructionVisitor * v=0x000000000012d410) Line 1697 C++ > harmonyvm.dll!LcgEM64TCodeGen::LcgEM64TCodeGen(LilCodeStub * cs=0x00000000052802b8, LcgEM64TContext & c={...}, tl::MemoryPool & m={...}) Line 1095 C++ > harmonyvm.dll!LilCodeGeneratorEM64T::compile_main(LilCodeStub * cs=0x00000000052802b8, unsigned __int64 * stub_size=0x000000000012d518, PoolManager * code_pool=0x0000000005136d90) Line 1721 C++ > harmonyvm.dll!LilCodeGenerator::compile(LilCodeStub * cs=0x00000000052802b8, PoolManager * code_pool=0x0000000005136d90) Line 61 + 0x1e bytes C++ > harmonyvm.dll!compile_create_lil_jni_stub(Method * method=0x00000000052d3020, void * func=0x0000000005e910b4, LilCodeStub * (LilCodeStub *, Method *)* nso=0x0000000000000000) Line 525 + 0x37 bytes C++ > harmonyvm.dll!compile_create_jni_stub(Method * method=0x00000000052d3020, void (void)* func=0x0000000005e910b4, LilCodeStub * (LilCodeStub *, Method *)* nso=0x0000000000000000) Line 594 C++ > harmonyvm.dll!compile_prepare_native_method(Method * method=0x00000000052d3020) Line 617 + 0x1d bytes C++ > harmonyvm.dll!compile_do_compilation(Method * method=0x00000000052d3020) Line 763 + 0xa bytes C++ > harmonyvm.dll!compile_me(Method * method=0x00000000052d3020) Line 799 + 0xd bytes C++ > EncoderBase::lookup returns "movzx r64, r8" match for this operation. It is illegal though as high 8 bits are lost from jchar. > I'll attach simple test which illustrates the problem. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.