From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7763 invoked by alias); 17 Nov 2013 03:17:05 -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 7745 invoked by uid 89); 17 Nov 2013 03:17:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RDNS_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pb0-f45.google.com Received: from Unknown (HELO mail-pb0-f45.google.com) (209.85.160.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 17 Nov 2013 03:17:03 +0000 Received: by mail-pb0-f45.google.com with SMTP id mc8so5251577pbc.4 for ; Sat, 16 Nov 2013 19:16:55 -0800 (PST) X-Received: by 10.66.8.66 with SMTP id p2mr14137529paa.129.1384658215609; Sat, 16 Nov 2013 19:16:55 -0800 (PST) Received: from bubble.grove.modra.org ([101.166.26.37]) by mx.google.com with ESMTPSA id qz9sm12932739pbc.3.2013.11.16.19.16.53 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 16 Nov 2013 19:16:54 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id BB308EA006D; Sun, 17 Nov 2013 13:46:50 +1030 (CST) Date: Sun, 17 Nov 2013 03:17:00 -0000 From: Alan Modra To: libffi-discuss@sourceware.org Subject: Straying #endif in ppc_closure.S Message-ID: <20131117031650.GR22514@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013/txt/msg00213.txt.bz2 An #endif in the wrong place would cause compile failure on powerpcle. Using bl instead of b doesn't cause runtime failures as you might think, but does mess the processor branch prediction. * src/powerpc/ppc_closure.S: Move errant #endif to where it belongs. Don't bl .Luint128. diff --git a/src/powerpc/ppc_closure.S b/src/powerpc/ppc_closure.S index 3eefe7e..1f72340 100644 --- a/src/powerpc/ppc_closure.S +++ b/src/powerpc/ppc_closure.S @@ -238,7 +238,7 @@ ENTRY(ffi_closure_SYSV) lwz %r3,112+0(%r1) lwz %r4,112+4(%r1) lwz %r5,112+8(%r1) - bl .Luint128 + b .Luint128 # The return types below are only used when the ABI type is FFI_SYSV. # case FFI_SYSV_TYPE_SMALL_STRUCT + 1. One byte struct. @@ -320,13 +320,13 @@ ENTRY(ffi_closure_SYSV) mtlr %r0 addi %r1,%r1,144 blr +#endif .Luint128: lwz %r6,112+12(%r1) mtlr %r0 addi %r1,%r1,144 blr -#endif END(ffi_closure_SYSV) -- Alan Modra Australia Development Lab, IBM