From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by sourceware.org (Postfix) with ESMTPS id CDD023857C47 for ; Mon, 10 Aug 2020 23:37:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CDD023857C47 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jimw@sifive.com Received: by mail-ed1-x529.google.com with SMTP id di22so7661879edb.12 for ; Mon, 10 Aug 2020 16:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RWaCv32iC9GKIdQq0Th+3YlFITx4nU8NM0sbswqs9M8=; b=KXr3damUrBwKhf23Q3U1atSfq+Z1+Wzc14g0uS/mZln3y/7aBIjtldApRFpDvrOCze D1/eqbojBXPIkU6l1KOqoEdN6jERJ4u8blDsCPaJkDrRm2+xXD3OK+jJg8Pu9fOhqvvh 0EncchmZTQCFLIenEVBSXQCqFeukQNFrB3e1JNkk3FjnzCW7q5JLHbZXiRBarC6xnJxG zArvmTN95jj85DjHQN2oyaKxW/dBrG7mmS/RxoOiCb9b7+fzHTEM+s3vwjTLPkyTy3wV l3w2BDaFf1idJV9xwZdEz725MBt+Ux0mbtr/SPprjbe3yKAZ4+WYLJ7zDkH8vo/9mG7G m/Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RWaCv32iC9GKIdQq0Th+3YlFITx4nU8NM0sbswqs9M8=; b=AD2qCzFVZDtfUpjlLkVV6wSd+jm7l63azSP3LjgssKE5w7kXYq1bXzDRnbz62kJtvf 2UEecCVYifQuW2l0Jor4NtvXOKZEB89h0dAQVYoqAAaz8DsLQss4kylriRbEH+jc9YeK SiykFzmr6/jXxc+HmSY0SEaKPyel/FBiLLSniQhnXBgpRJusAxbwg3Pmou25i27HRwLT p7gRZ6pzocoDB8L8PJElUe9Uz4dUZZnJxO9G+a6T+8ENEu10uX2ApJeHu1irdedVrrrl uPo2o1cacdyKDu96ChwCy6PwUzTEtbKbKSYT5JwSqEkDTIr6EeFaKI0fgQLpxpb2Qgih u0aQ== X-Gm-Message-State: AOAM533FwrmOdUICBUojr7ykzR2FiCl4oovmPgrpEN8HBklS18yYKX4e 274QBu4/k/45UHfukXZbuz8F/Qn9qAE/q3XbENPM3j2l X-Google-Smtp-Source: ABdhPJxnlHa2VmcRy5CZCT++wjwkaH1MerC7tGU98Js2vHNoJ+ksFkyJMbzDMXOC8P6KnyXpI8Ro/BGCxZZvSyX0srg= X-Received: by 2002:a05:6402:17c2:: with SMTP id s2mr22752901edy.188.1597102648683; Mon, 10 Aug 2020 16:37:28 -0700 (PDT) MIME-Version: 1.0 References: <9a66e245-61cf-9eb2-f4f5-3fc7d10d9ff8@blastwave.org> In-Reply-To: <9a66e245-61cf-9eb2-f4f5-3fc7d10d9ff8@blastwave.org> From: Jim Wilson Date: Mon, 10 Aug 2020 16:37:17 -0700 Message-ID: Subject: Re: making double type default to 80 or 128 bytes To: Dennis Clarke Cc: gcc-help Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2020 23:37:31 -0000 On Fri, Aug 7, 2020 at 9:00 AM Dennis Clarke via Gcc-help wrote: > There is no such thng as an 80 byte double. The standards state that we > shall use floating point types which are of specific bit widths and all > of those are perfectly aligned on perfect power of two bit widths. These > range from 16 bits to 256 bit width. To date I have not seen hardware > which natively supports the 256-bit floating point type. The IBM POWER9 > processor as well as the RISC-V and Fujitsu SPARC provide hardware for > the 128-bit width and they seem to work very well indeed. The 80-bit > thing to which you refer is a hack put in place by the intel/x86 world > simply because the hardware can not properly handle anything larger. It > should not exist at all in if we use the floating point standards. The IEEE FP standard defines some basic formats which have fixed bit-widths, and extended formats which have implementation defined bit widths. The 80-bit x86 format meets the definition of extended binary64 in the 2008 standard, and extended double in the 1985 standard. Likewise the similar 96 bit (with 16-bits of zero padding) format used on 68k systems. Nowadays though, I think most people would rather have a proper 128-bit long double than an 80/96-bit extended double. But there is nothing hackish about the 80/96 bit extended doubles on x86/68k. They have just outlived their usefulness. Jim