From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111091 invoked by alias); 13 Apr 2019 21:59:43 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 111059 invoked by uid 89); 13 Apr 2019 21:59:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=Wire, cgen, HX-Languages-Length:1774 X-HELO: mail-wm1-f68.google.com Received: from mail-wm1-f68.google.com (HELO mail-wm1-f68.google.com) (209.85.128.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 13 Apr 2019 21:59:41 +0000 Received: by mail-wm1-f68.google.com with SMTP id q16so15505180wmj.3 for ; Sat, 13 Apr 2019 14:59:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8PCVqRC7FD1zzbY04QqTZJkuC23rITuYJUB0ObrBCh0=; b=XT4gTCCSUVrfXRSS9gLSQe6ZmmjIZjXwTm0+/3w2+u5AOqrBsJxh/IQuC/nq7oVHGC J4MNhKkbM/swT5rqJeI6ZhYEnCq1pg7ReNSNIB6hO1Bk/XOFc6wX4+5DP7t4NyUD6WSC qRcnihcYffyjkrRPu3fQV+5unElk4JDAcSaIyjdOVgNKdrxeU/WBfsq5AtHMoM13OhZr R2vxkMSairsD7/1L3U3fsskKqpnK05KSztaihDA0xKrev/+P+ixR6v4VOMLrIo9LRlV4 vNhLLugbv5QtgAIL9/eAHjTa6m0Vpu+VdY2pQZqZgmtR8Jb/Z0A4/aAV2XH3NYDBVukN CbSw== Return-Path: Received: from localhost (host86-164-133-98.range86-164.btcentralplus.com. [86.164.133.98]) by smtp.gmail.com with ESMTPSA id 84sm22231984wme.43.2019.04.13.14.59.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 13 Apr 2019 14:59:38 -0700 (PDT) Date: Sat, 13 Apr 2019 21:59:00 -0000 From: Andrew Burgess To: Stafford Horne Cc: GDB patches , GNU Binutils , Andrey Bacherov , Openrisc Subject: Re: [PATCH v2 4/6] sim/common: Wire in df/di conversion Message-ID: <20190413215937.GK2737@embecosm.com> References: <20190409213925.32699-1-shorne@gmail.com> <20190409213925.32699-5-shorne@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190409213925.32699-5-shorne@gmail.com> X-Fortune: Your processor has processed too many intructions. Turn it off emideately, do not type any commands!! X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00166.txt.bz2 * Stafford Horne [2019-04-10 06:39:23 +0900]: > Up until now these have not been used in any CGEN targets, add them as > they are now used by OpenRISC. > > sim/common/ChangeLog: > > * cgen-accfp.c (floatdidf, fixdfdi): New functions. > (cgen_init_accurate_fpu): Add floatdidf and fixdfdi. This is fine. thanks, Andrew > --- > sim/common/cgen-accfp.c | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > > diff --git a/sim/common/cgen-accfp.c b/sim/common/cgen-accfp.c > index 5d600c6e41..51f5a29fe2 100644 > --- a/sim/common/cgen-accfp.c > +++ b/sim/common/cgen-accfp.c > @@ -349,6 +349,17 @@ floatsidf (CGEN_FPU* fpu, int how UNUSED, SI x) > return res; > } > > +static DF > +floatdidf (CGEN_FPU* fpu, int how UNUSED, DI x) > +{ > + sim_fpu ans; > + unsigned64 res; > + > + sim_fpu_i64to (&ans, x, sim_fpu_round_near); > + sim_fpu_to64 (&res, &ans); > + return res; > +} > + > static SF > ufloatsisf (CGEN_FPU* fpu, int how UNUSED, USI x) > { > @@ -382,6 +393,17 @@ fixdfsi (CGEN_FPU* fpu, int how UNUSED, DF x) > return res; > } > > +static DI > +fixdfdi (CGEN_FPU* fpu, int how UNUSED, DF x) > +{ > + sim_fpu op1; > + unsigned64 res; > + > + sim_fpu_64to (&op1, x); > + sim_fpu_to64i (&res, &op1, sim_fpu_round_near); > + return res; > +} > + > static USI > ufixsfsi (CGEN_FPU* fpu, int how UNUSED, SF x) > { > @@ -739,8 +761,10 @@ cgen_init_accurate_fpu (SIM_CPU* cpu, CGEN_FPU* fpu, CGEN_FPU_ERROR_FN* error) > o->ftruncdfsf = ftruncdfsf; > o->floatsisf = floatsisf; > o->floatsidf = floatsidf; > + o->floatdidf = floatdidf; > o->ufloatsisf = ufloatsisf; > o->fixsfsi = fixsfsi; > o->fixdfsi = fixdfsi; > + o->fixdfdi = fixdfdi; > o->ufixsfsi = ufixsfsi; > } > -- > 2.19.1 >