From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29900 invoked by alias); 27 Jun 2016 21:20:42 -0000 Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org Received: (qmail 29880 invoked by uid 89); 27 Jun 2016 21:20:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=sk:Matthew, matthew.fortune@imgtec.com, D*imgtec.com, matthewfortuneimgteccom X-HELO: gproxy7-pub.mail.unifiedlayer.com Received: from gproxy7-pub.mail.unifiedlayer.com (HELO gproxy7-pub.mail.unifiedlayer.com) (70.40.196.235) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with SMTP; Mon, 27 Jun 2016 21:20:32 +0000 Received: (qmail 26809 invoked by uid 0); 27 Jun 2016 21:20:28 -0000 Received: from unknown (HELO cmgw4) (10.0.90.85) by gproxy7.mail.unifiedlayer.com with SMTP; 27 Jun 2016 21:20:28 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by cmgw4 with id BxLP1t00h2f2jeq01xLSU5; Mon, 27 Jun 2016 15:20:28 -0600 X-Authority-Analysis: v=2.1 cv=ecGuId0H c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=PnD2wP_eR3oA:10 a=7XZj0uCbPdcA:10 a=pD_ry4oyNxEA:10 a=r_1tXGB3AAAA:8 a=Y4AGR_T4NHJ_jLpUj1AA:9 a=t8nPyN_e6usw4ciXM-Pk:22 Received: from [75.171.172.174] (port=50146 helo=pokyo) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2) (envelope-from ) id 1bHdx9-00082l-4F; Mon, 27 Jun 2016 15:20:23 -0600 From: Tom Tromey To: Matthew Fortune Cc: "java-patches\@gcc.gnu.org" , "'gcc-patches\@gcc.gnu.org' \(gcc-patches\@gcc.gnu.org\)" , "per\@bothner.com" , "aph\@redhat.com" , Aurelien Jarno Subject: Re: [PATCH] Fix FFI return type for closures in the java interpreter References: <6D39441BF12EF246A7ABCE6654B023537E45FD9F@HHMAIL01.hh.imgtec.org> Date: Mon, 27 Jun 2016 21:20:00 -0000 In-Reply-To: <6D39441BF12EF246A7ABCE6654B023537E45FD9F@HHMAIL01.hh.imgtec.org> (Matthew Fortune's message of "Mon, 27 Jun 2016 20:17:24 +0000") Message-ID: <87shvyib1n.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Identified-User: {36111:box522.bluehost.com:elynrobi:tromey.com} {sentby:smtp auth 75.171.172.174 authed with tom+tromey.com} X-Exim-ID: 1bHdx9-00082l-4F X-Source-Sender: (pokyo) [75.171.172.174]:50146 X-Source-Auth: tom+tromey.com X-Email-Count: 0 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-SW-Source: 2016-q2/txt/msg00025.txt.bz2 >>>>> "Matthew" == Matthew Fortune writes: Matthew> I've identified a latent bug in the java interpreter that affects MIPS Matthew> n32 and n64 ABIs both little and big endian and, I presume, any 64-bit Matthew> big endian target with int as 32-bit. Thanks. Matthew> I mentioned in my earlier post about a possible similar issue in the Matthew> lang/reflect/natVMProxy.cc code (unbox function) by code inspection. I Matthew> don't know how to trigger this code but perhaps someone can advise. It's a bit complicated, and it's been a while since I looked at any of this, but I think what you want to do is make an InvocationHandler that handles some method returning "int" (maybe hashCode would work), then make a Proxy class that wraps it. Then, make an instance of the proxy class and call the method. Matthew> libjava/ Matthew> * interpret-run.cc: Use ffi_arg for FFI integer return types. Matthew> libjava/testsuite/ Matthew> * libjava.jar/arraysort.java: New file. Matthew> * libjava.jar/arraysort.jar: New file. Matthew> * libjava.jar/arraysort.out: New file. Matthew> * libjava.jar/arraysort.xfail: New file. This is ok. Tom