From owner-freebsd-amd64@FreeBSD.ORG Thu Mar 1 07:10:13 2012 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EABAE106564A for ; Thu, 1 Mar 2012 07:10:12 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id A6A898FC0C for ; Thu, 1 Mar 2012 07:10:12 +0000 (UTC) Received: by iahk25 with SMTP id k25so531000iah.13 for ; Wed, 29 Feb 2012 23:10:12 -0800 (PST) Received-SPF: pass (google.com: domain of peter@wemm.org designates 10.50.34.202 as permitted sender) client-ip=10.50.34.202; Authentication-Results: mr.google.com; spf=pass (google.com: domain of peter@wemm.org designates 10.50.34.202 as permitted sender) smtp.mail=peter@wemm.org; dkim=pass header.i=peter@wemm.org Received: from mr.google.com ([10.50.34.202]) by 10.50.34.202 with SMTP id b10mr3630919igj.2.1330585812380 (num_hops = 1); Wed, 29 Feb 2012 23:10:12 -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:content-transfer-encoding; bh=8JOny4nyVidF+s+deqIqWhsGEyxtlhjK63UIi++76OE=; b=f2jN2Vo3rYcQMuv0VN84iT3OPGwwFP7XJ0d0ef3wjsAwktHplBeAguSP1bRT2oLPoA xZ0JtwMjfl0UvoZ1xnJo0jh7AqfVwVPQZN1sHC5AXZi0xF+DXm9LGUGc7hpHTt52g7yT ieUds4LSlJsNqrJYSzmugonH66ayzm333dHAA= MIME-Version: 1.0 Received: by 10.50.34.202 with SMTP id b10mr2979607igj.2.1330585812253; Wed, 29 Feb 2012 23:10:12 -0800 (PST) Received: by 10.231.170.138 with HTTP; Wed, 29 Feb 2012 23:10:12 -0800 (PST) In-Reply-To: <20120229192417.U3167@besplex.bde.org> References: <4F3EA37F.9010207@speakeasy.org> <4F3EC0B4.6050107@speakeasy.org> <4F4DA398.6070703@speakeasy.org> <20120229161408.G2514@besplex.bde.org> <4F4DDCE7.9000008@speakeasy.org> <20120229192417.U3167@besplex.bde.org> Date: Wed, 29 Feb 2012 23:10:12 -0800 Message-ID: From: Peter Wemm To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQmllR1K468cd4DGWpmWQhkhDBt9ZLP14x9QI25vcry2IC2vbA/KN9WXVQ9xxaDybYwQw7BC Cc: freebsd-amd64@freebsd.org Subject: Re: Gcc46 and 128 Bit Floating Point X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2012 07:10:13 -0000 On Wed, Feb 29, 2012 at 12:40 AM, Bruce Evans wrote: > On Wed, 29 Feb 2012, Thomas D. Dean wrote: >> On 02/28/12 22:03, Bruce Evans wrote: >>> But why would you want it? It is essentially unusable on sparc64, >>> since it is several thousand times slower than 80-bit floating point >>> on i386. At equal CPU clock speeds, it is only about 1000 times slower. >>> ... >> I have an application that takes 10 days to run on a 4.16GHz Core-i7 >> 3930K. No output until it finishes. > > Look elsewhere :-). =A01000 times slower than that would be bad :-). See below: >> The application uses libgmp, but, about 1/2 to 2/3 of the work will fit = in >> a 128-bit float. This is what he's getting at. If he could get access to 128 bit fp, he could move between 1/2 and 2/3 of the work into hardware operations and bypass a large chunk of GMP work which would be many many times slower than 128 bit hardware FP. ports gcc with -march/-mtune set correctly and quadmath is his only option. If he's got gcc-4.6 generating code for generic amd64 instructions it won't use that stuff and will soft-float it. Those switch settings might be the difference between the earlier code reports that didn't show use of the instructions vs later ones that did. libm and libc can't grow support for __float128 with our existing compiler. We could write some in assembler but that doesn't do anything for libc like printf. he also said "no output for 10 days" so I'm guessing printf isn't an issue. Keeping it out of band with gcc-4.6+ / libquadmath and some impedance matching with libgmp is his only practical option. Later snapshots of gcc may even be required if its missing things he needs. --=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell