From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47759 invoked by alias); 1 Sep 2017 08:29:49 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 47666 invoked by uid 89); 1 Sep 2017 08:29:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pf0-f176.google.com Received: from mail-pf0-f176.google.com (HELO mail-pf0-f176.google.com) (209.85.192.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 01 Sep 2017 08:29:43 +0000 Received: by mail-pf0-f176.google.com with SMTP id r187so6172451pfr.3 for ; Fri, 01 Sep 2017 01:29:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=e17Ety0TsxZKaKb/E4BSU8qWl7A7nETdn3FXDxXjwsk=; b=BdOERgASFlpAvSrK/UJNxUOv85BTVyKZndqVH+FBA0g85IiCn1vMKsHwA/bRikIAKX SGCsGmuMvFnD8mn+kGlNVRSO4a3nYIk19xgmMusuTNSsb17E13q2GKB1+6MtVi8yuLw9 XpZTkaMNu3C6OQbWSrLEh1gIwYg08nFb3s8wkp/TC3sFDVDy3SiORWF0WpViIetGEd92 qe7o+tyLNo3cz26zgwaZRay0kk2MrYW78OrEB7txtzP0kmgWrUYObFjjGbBsYgMlCaky 5unr5Yyk3tgnNfOEvoKPopn4USW11DnD49+x2eTjxOHuiLYC6QcKfU6PSmoOVahfWjLw qknA== X-Gm-Message-State: AHPjjUh7+PHAOWmFPBmrlh5y7frZgN1aGy2xjGGGesclZJyfuqy3OJMl /ip1JT2LgEoPWQ== X-Google-Smtp-Source: ADKCNb4gukrWRMz6ixXjJOMfSbXYkJoftKzxo43c7T3SbQkskDxbqKoWoXANmfAGsLuTwtdjifioIw== X-Received: by 10.84.130.41 with SMTP id 38mr1500207plc.0.1504254581871; Fri, 01 Sep 2017 01:29:41 -0700 (PDT) Received: from localhost (g206.61-45-91.ppp.wakwak.ne.jp. [61.45.91.206]) by smtp.gmail.com with ESMTPSA id s189sm2433434pgc.66.2017.09.01.01.29.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Sep 2017 01:29:41 -0700 (PDT) Date: Fri, 01 Sep 2017 08:29:00 -0000 From: Stafford Horne To: Simon Marchi Cc: GDB patches , Openrisc , Mike Frysinger , Peter Gavin Subject: Re: [PATCH v4 1/5] sim: cgen: add remainder functions (needed for OR1K lf.rem.[sd]) Message-ID: <20170901082939.GJ2609@lianli.shorne-pla.net> References: <643da7dcb7d9913a1b239f3aae0ebaebb85a00d7.1496066478.git.shorne@gmail.com> <20170831223321.GE2609@lianli.shorne-pla.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00004.txt.bz2 On Fri, Sep 01, 2017 at 09:56:54AM +0200, Simon Marchi wrote: > On 2017-09-01 00:33, Stafford Horne wrote: > > > I can't tell for sure because I'm not maintainer of sim/, but I > > > suppose that > > > we would need a proper implementation that doesn't use the host fpu > > > here. > > > > Right, as mentioned in the summary, this is the one place that is a bit > > controversial. > > > > I was thinking its kind of strange to not allow using libmath, since > > integer math runs on the host system, why not FPU as well? > > (probably to implement this I would just copy from libmath in the end:) > > That was just my conclusion after reading the comment in sim-fpu.h: > > https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=sim/common/sim-fpu.h;h=d27d80a513aa8d996a7b4c6af53fde31dcb8dad7;hb=HEAD#l54 > > It is easy for floating point unit implementations to return wrong or > slightly different results. Integer math is more consistent. > > > https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=sysdeps/ieee754/dbl-64/e_remainder.c;hb=HEAD > > > > There are actually no OpenRISC cores that implement the remainder > > instruction (as its a bit complicated to do in hardware and not really > > used > > much). I could remove it if the implementation is beyond the scope of > > this > > series. > > Indeed, it can always be contributed later. Right, I think thats the easiest route. Ill resubmit the series in a few days after I receive other comments from you. -Stafford