From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11141 invoked by alias); 6 Nov 2014 12:48:51 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 11076 invoked by uid 89); 6 Nov 2014 12:48:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f182.google.com Received: from mail-pd0-f182.google.com (HELO mail-pd0-f182.google.com) (209.85.192.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 06 Nov 2014 12:48:49 +0000 Received: by mail-pd0-f182.google.com with SMTP id fp1so1089816pdb.27 for ; Thu, 06 Nov 2014 04:48:47 -0800 (PST) X-Received: by 10.70.102.77 with SMTP id fm13mr4305783pdb.62.1415278127357; Thu, 06 Nov 2014 04:48:47 -0800 (PST) Received: from bubble.grove.modra.org ([58.160.155.134]) by mx.google.com with ESMTPSA id b16sm3424539pbu.59.2014.11.06.04.48.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Nov 2014 04:48:46 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id A7843EA4722; Thu, 6 Nov 2014 23:18:38 +1030 (ACDT) Date: Thu, 06 Nov 2014 12:48:00 -0000 From: Alan Modra To: Richard Henderson Cc: "Lynn A. Boger" , gcc-patches@gcc.gnu.org, libffi-discuss@sourceware.org, gofrontend-dev@googlegroups.com Subject: Re: [PATCH 00/13] Go closures, libffi, and the static chain Message-ID: <20141106124838.GJ30857@bubble.grove.modra.org> Mail-Followup-To: Richard Henderson , "Lynn A. Boger" , gcc-patches@gcc.gnu.org, libffi-discuss@sourceware.org, gofrontend-dev@googlegroups.com References: <1412973773-3942-1-git-send-email-rth@redhat.com> <545A97BA.3030507@linux.vnet.ibm.com> <545B1C44.3000306@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <545B1C44.3000306@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2014/txt/msg00182.txt.bz2 On Thu, Nov 06, 2014 at 07:59:16AM +0100, Richard Henderson wrote: > I haven't done powerpc yet. If you'd like to help, I'd be delighted. I was going to say that it doesn't look too difficult, but then I noticed we have a problem. PowerPC uses r11 as the static chain, a register that is allowed to be used by linkage stubs. So any call to a shared libffi will (or may) blow away r11. On ppc32, every plt call currently uses r11. On ppc64 ELFv1 most plt calls do (in fact r11 is loaded from the third word of the plt function descriptor if using a standard plt stub). On ppc64 ELFv2 just the lazy plt resolution trashes r11. -- Alan Modra Australia Development Lab, IBM