From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12473 invoked by alias); 20 Nov 2014 01:48:15 -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 12439 invoked by uid 89); 20 Nov 2014 01:48:12 -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-f171.google.com Received: from mail-pd0-f171.google.com (HELO mail-pd0-f171.google.com) (209.85.192.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 20 Nov 2014 01:48:10 +0000 Received: by mail-pd0-f171.google.com with SMTP id v10so2016610pde.16 for ; Wed, 19 Nov 2014 17:48:09 -0800 (PST) X-Received: by 10.66.192.66 with SMTP id he2mr52334401pac.68.1416448089024; Wed, 19 Nov 2014 17:48:09 -0800 (PST) Received: from bubble.grove.modra.org ([58.160.155.134]) by mx.google.com with ESMTPSA id w8sm420690pbt.71.2014.11.19.17.48.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Nov 2014 17:48:08 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id E8308EA017E; Thu, 20 Nov 2014 12:18:00 +1030 (ACDT) Date: Thu, 20 Nov 2014 01:48:00 -0000 From: Alan Modra To: libffi-discuss@sourceware.org Subject: powerpc: Fix ffi_go_closure_linux64 Message-ID: <20141120014800.GI22459@bubble.grove.modra.org> References: <20141120014435.GH22459@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141120014435.GH22459@bubble.grove.modra.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2014/txt/msg00249.txt.bz2 Unlike ffi_closure_LINUX64, this entry point is called normally, so we already have the TOC in R2 and the closure in R11. * powerpc/linux64_closure.S (ffi_closure_LINUX64): Remove a register dependency chain. (ffi_go_closure_linux64): Don't load r11 or r2. --- src/powerpc/linux64_closure.S | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/powerpc/linux64_closure.S b/src/powerpc/linux64_closure.S index 1364225..6487d2a 100644 --- a/src/powerpc/linux64_closure.S +++ b/src/powerpc/linux64_closure.S @@ -101,7 +101,7 @@ ffi_closure_LINUX64: # else # copy r2 to r11 and load TOC into r2 mr %r11, %r2 - ld %r2, 16(%r11) + ld %r2, 16(%r2) mflr %r0 # Save general regs into parm save area @@ -444,10 +444,6 @@ ffi_go_closure_linux64: # load up the pointer to the parm save area mr %r7, %r12 # else - # copy r2 to r11 and load TOC into r2 - mr %r11, %r2 - ld %r2, 16(%r11) - mflr %r0 # Save general regs into parm save area # This is the parameter save area set up by our caller. -- 2.1.0 -- Alan Modra Australia Development Lab, IBM