From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8506 Path: news.gmane.org!not-for-mail From: Rob Landley Newsgroups: gmane.linux.lib.musl.general Subject: Re: [0pf] musl/SH-FDPIC progress Date: Sun, 13 Sep 2015 18:45:49 -0500 Message-ID: <55F60AAD.9010004@landley.net> References: <20150911014850.GA18775@brightrain.aerifal.cx> <20150911190522.GW17773@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1442187982 13381 80.91.229.3 (13 Sep 2015 23:46:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Sep 2015 23:46:22 +0000 (UTC) Cc: 0pf@nommu.org To: Rich Felker , musl@lists.openwall.com Original-X-From: musl-return-8518-gllmg-musl=m.gmane.org@lists.openwall.com Mon Sep 14 01:46:15 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ZbGyN-0007Wb-6H for gllmg-musl@m.gmane.org; Mon, 14 Sep 2015 01:46:15 +0200 Original-Received: (qmail 32046 invoked by uid 550); 13 Sep 2015 23:46:13 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 31968 invoked from network); 13 Sep 2015 23:46:05 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=hOBePy5Clb2TpgyCW79JeQXNfLHwDWp/5R9KBdnGpqM=; b=XrHxG3NAJELyAP29TKE6EivwXC3TqaoncFYLbdWavW18UmO2IANSoqyxjaRWXpLVXt BH0j/v+4dU4reE/ikqtpRp3KznYFUzrSFivgq6Po4GT13bD5pUCNaOLjv4Qgd3en2oFc v8/cZ7XGRlCToWiUTBcPJqZNLl+/6EwtK/g473E5G91tcJwVIS1YOk1y5SqLUKirmdC1 Ip0tx1Rr53DFEshYCSOtpkgBjBN6f3vTqjimyubiB8419pZX0poZAkNRaqaOq1qENCas 0yjkE+ZnqXmNLSdbjMKRCH0dv+zYtXnN46M4qYq8aQoyeJMZVElGfEJgrb/wQMk870Gf Ei0A== X-Gm-Message-State: ALoCoQlGNCBFBVCmaK4VEOgkAxo2iXLBEIDKOOQdwPMv9zcY4v64r5+MRy13mj0yg49HxgUCkfO6 X-Received: by 10.66.148.136 with SMTP id ts8mr28291760pab.15.1442187953574; Sun, 13 Sep 2015 16:45:53 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: <20150911190522.GW17773@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:8506 Archived-At: On 09/11/2015 02:05 PM, Rich Felker wrote: > As noted in the commit message, a patch on the musl side is needed to > get actual working binaries. I'll post a version of this (not > appropriate for upstream) soon. Did you ever write more documentation beyond: http://www.aerifal.cx/~dalias/binfmts.html I should add a link to that from the web page, but I dunno if there's more. I'd like to get a section on nommu.org comparing binflt, static pie, and fdpic. Jeff Dionne commented on your toolchain: > The only issue is he seems to be exclusively targeting fdpic. The > issue is you loose a few registers. I don't know what gcc will do > performance wise in that case, we need to test. Hopefully we don't > need a 'fall back' to bFLT, or something. > > A few % hit in an embedded system is a lot... To which I don't know how to respond. Register starvation mostly seems to crop up on x86 (where they have horrible behind the scenes hardware hacks with register renaming and multiple register profiles and so on to get decent performance out of a lousy assembly design). But sh2 has 16 general purpose registers, which is much less constained... I'd say "get 'em both out and benchmark them" but the binflt toolchain I've got (cutting an aboriginal linux release as we speak by the way) is gcc 4.2.1+binutils 2.17, and yours is something like 8 years later so the whole code generation backend is basically redone. Not remotely apples to apples there. And then there's llvm and you said you got libfirm working? What's involved in making a libfirm toolchain, trying to build a system with it, and getting j2 code generation out of it? Rob