From owner-freebsd-arch@FreeBSD.ORG Sun Jan 13 23:00:12 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F2A39B30 for ; Sun, 13 Jan 2013 23:00:12 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx1.freebsd.org (Postfix) with ESMTP id A5E1A357 for ; Sun, 13 Jan 2013 23:00:12 +0000 (UTC) Received: by mail-vc0-f173.google.com with SMTP id f13so3004281vcb.4 for ; Sun, 13 Jan 2013 15:00:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=M8Sk7jAlnzfxu9TTFMm3Mc7PxN3oqdpFoP0WVndoBR8=; b=kDlP+5bHhJiwatfQf8YyZFDCWgsVH5ZGk89N39FUsWvpWvEulKeE5/GZXoLup0I0/y hlV626F50PnNC9FVbolXtC5l6yTDWf5ztngQ71gDHVjnfCA51lLWlisWU++04OAz/b7C PjCVHm2XHyCOpAlIIvq2/r0C66tKzoYQ5WX5o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=M8Sk7jAlnzfxu9TTFMm3Mc7PxN3oqdpFoP0WVndoBR8=; b=lQQ1FxBe5DJ3n3vaPyZ5ke9LPiC3g22zR7RUloDph4TjuTjVx6prGbamjgbWQH3Xee bmbEkwSZUp2+z/Xa5q/kTUxSMjj8ahMsG4G6fNpG1RIddde2YG54uMXkpFW/ZF69Ny2m 1EhIrqsaBNofmXQkEh3WB1HUsrFvJhumUBGxltD9KiJWAR3u6VMZkIJ5iV9VzTFniz/C uZG8ByZWqxBXLkF2Epa0EanEMPQI7lG1Zm/sU8HKOZMhlRvedms4FK0zD5JGRY8/l/e1 KHISSIB+6NKNlcyN+N+WMbbxzAXeh+YwlWCKP98OEfUoXAWessGyNFdsFyYIqZvlqawD eu5w== MIME-Version: 1.0 Received: by 10.52.36.19 with SMTP id m19mr85816210vdj.33.1358118011729; Sun, 13 Jan 2013 15:00:11 -0800 (PST) Received: by 10.220.174.135 with HTTP; Sun, 13 Jan 2013 15:00:11 -0800 (PST) In-Reply-To: <50F33B02.6040303@freebsd.org> References: <20130112233147.GK1410@funkthat.com> <20130113014242.GA61609@troutmask.apl.washington.edu> <20130113053725.GL1410@funkthat.com> <20130113202952.GO1410@funkthat.com> <20130113224800.GS1410@funkthat.com> <50F33B02.6040303@freebsd.org> Date: Sun, 13 Jan 2013 15:00:11 -0800 Message-ID: Subject: Re: how long to keep support for gcc on x86? From: Peter Wemm To: Nathan Whitehorn Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQntudNqrQuy6aSfoeKnm/pKP0Yc3cCqPWjhEn6azrLSCg2+iLF/5szpJ3aVzWQ5xkputXOW Cc: freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2013 23:00:13 -0000 On Sun, Jan 13, 2013 at 2:53 PM, Nathan Whitehorn wrote: > On 01/13/13 14:48, John-Mark Gurney wrote: >> Peter Wemm wrote this message on Sun, Jan 13, 2013 at 14:26 -0800: >>> On Sun, Jan 13, 2013 at 12:29 PM, John-Mark Gurney wrote: >>>> Adrian Chadd wrote this message on Sat, Jan 12, 2013 at 23:44 -0800: >>>>> >>>>> People are still ironing out kinks/differences with clang. Anyone >>>>> saying otherwise is likely pushing an agenda. :-) >>>>> >>>>> Thus I think adding clang-only code to the system right now is very, >>>>> very premature. There still seem to be reasons to run systems on GCC >>>>> instead of clang. >>>>> >>>>> If you have a need for new instruction support, perhaps look at adding >>>>> it to our base GCC for the time being? >>>> >>>> I did look at it briefly, but I don't know gcc's internals, and it would >>>> take me 5+ hours to do it, while someone who does know gcc would take >>>> abount a half an hour (just a guess)... I don't have the free time I >>>> used to, otherwise I would of done it by now.. >>> >>> It seems to me that since clang is the default compiler for the >>> platforms that have AES-NI that the following could be done: >>> >>> * get the inline AES-NI stuff in and debugged and solid. >>> * .. without breaking the existing gcc-compatible code >>> * once the support is solid, decide what the appropriate thing to do for gcc is. >>> >>> .. so long as the existing code doesn't get broken. >>> >>> Trying to do backwards compatibility port to gcc with a moving target >>> has potential to be a work multiplier. >> >> I already have a gcc compatible version of an improved AES-NI for >> amd64... The real question is, do I improve things further by using >> intrinsics which means we can share code between amd64 and i386 and get >> great performance from both, or do I simply make a seperate version >> for i386 that is gcc compatible, but not as good performance... >> >> Though a lot of this last little bit of performance questions isn't too >> useful since the overhead of the crypto framework and geom introduces >> a significant overhead already... >> >> I'm not too interesting in creating AES-NI v2 module and having two >> versions that do the same thing just because of a compiler issue... >> >> So I'm going to go with the plan of making an i386 and gcc compatible >> version... it'll still be a 4x+ performance over the existing code... >> This also means we could back port it to 9-stable if we wanted to... >> >> Thanks for the input... >> > > This also raises the interesting question of whether we want to bother > supporting things like AES-NI on i386 at all. It's a legacy/embedded > architecture at this point, in my opinion, and the people who run it > probably don't care about fancy new features like this. A related > question is whether we want to have any clang-only features in the kernel... It wasn't so much an issue of being clang-only, but rather the antique gcc+binutils not having full support on i386. The code would work fine with later versions of gcc/binutils, intel's compiler and clang. Just not with the old gcc + old binutils on i386. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV bitcoin:188ZjyYLFJiEheQZw4UtU27e2FMLmuRBUE