From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32467 invoked by alias); 4 Oct 2011 00:54:01 -0000 Received: (qmail 32404 invoked by uid 22791); 4 Oct 2011 00:54:01 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_JL,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-qy0-f182.google.com (HELO mail-qy0-f182.google.com) (209.85.216.182) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 04 Oct 2011 00:53:47 +0000 Received: by qyk4 with SMTP id 4so3921149qyk.20 for ; Mon, 03 Oct 2011 17:53:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.79.5 with SMTP id n5mr463251qck.275.1317689626598; Mon, 03 Oct 2011 17:53:46 -0700 (PDT) Received: by 10.229.33.6 with HTTP; Mon, 3 Oct 2011 17:53:46 -0700 (PDT) In-Reply-To: References: <201110031834.35051.vapier@gentoo.org> <201110031903.43037.vapier@gentoo.org> Date: Tue, 04 Oct 2011 00:54:00 -0000 Message-ID: Subject: Re: new triplet for x32 psABI? From: "H.J. Lu" To: x32-abi@googlegroups.com Cc: Mike Frysinger , autoconf@gnu.org, gcc@gcc.gnu.org, config-patches@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00033.txt.bz2 On Mon, Oct 3, 2011 at 4:47 PM, Michael LIAO wrot= e: > On Mon, Oct 3, 2011 at 4:03 PM, Mike Frysinger wrote: >> On Monday, October 03, 2011 18:57:28 Michael LIAO wrote: >> >> please don't top post >> > > sorry, it's my first post on mailing. > >>> Most examples would be related to tools generating code. >>> >>> Suppose you have a software package with several hard-coded fully >>> optimized assembly file for different targets. Your build system need >>> to know the current target as well as target ABI to select the correct >>> assembly file to build it. It even desirable if it includes a simple >>> script to help generate assembly code (like the one in OpenSSL), you'd >>> better know the target ABI to prepare proper glue code without >>> breaking ABI. >> >> hjlu posted examples to the x32 site as to handle this. =A0the only diff= erence >> between x86_64 and x32 is the size of the pointers. >> > > Besides the pointer size, there are other differences like indirect > branch which need different code sequence on x32 and x64. Indirect > branch would be used in assembly code (yeah, concrete example would > valuable here but indirect branch should be used potentially and > possibly in assembly code.) If the assembly code use indirect branch, > it needs to know the target ABI and generate/use difference code path. > In assembly codes, most, if not all, of x86-64 indirect branch work fine fo= r x32 --=20 H.J.