From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40484 invoked by alias); 8 Oct 2017 12:27:30 -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 40475 invoked by uid 89); 8 Oct 2017 12:27:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=Arent, Aren't X-HELO: mail-pf0-f195.google.com Received: from mail-pf0-f195.google.com (HELO mail-pf0-f195.google.com) (209.85.192.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 08 Oct 2017 12:27:28 +0000 Received: by mail-pf0-f195.google.com with SMTP id m28so21471471pfi.0 for ; Sun, 08 Oct 2017 05:27:28 -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=sb/r5j6ExLs+EtGbpXFwN14JVQSkEzMHAcPLg9VMod8=; b=m+AGsk0ATB6vPb8E3EEmIBzN2IFXcQhWU98BwalCY2n7yukAMuAxbnaMPKToK2fvGR R3cekzt4Q+2mHbJ3RsgS4Wg8Mq+jKDLwCBIvkJv2+NDE9WIqjB4n8tPbNGcrDTX4Plv3 pe81SVFCHo/ClWqnxvxWRuwxR+XlNbJDfQ5dDeJyahS6eh5q7mifHsFFJpPFLuwHQhfF WVpCwqtiVZlZwWodc8CUbir8sLMld88L0U/s2jHbAHe2cIpBRJxkp9DTFVzpwBkT8HUJ gmCr0DtKyD+2IQknSKTFvwKS2S4OHoY8TjxxuedaDcLwIsl8qmW69CgBstbQ1Iva4K7u D9DQ== X-Gm-Message-State: AMCzsaXCZejxvqfjyuGjYTSXcjvRK6Hozb/y1zPWSWTp5UF0aE7Ac8SE tgdC6j1rZIn+rYG83LPeYajpBAyH X-Google-Smtp-Source: AOwi7QDOK34WnZ/ZICEeelyao24Vql7B0z1bMMVjgytZzL2trhumhrvHImy1xMyUXXMfBSJxt80TuQ== X-Received: by 10.98.82.85 with SMTP id g82mr1361296pfb.31.1507465646393; Sun, 08 Oct 2017 05:27:26 -0700 (PDT) Received: from localhost (g248.61-45-56.ppp.wakwak.ne.jp. [61.45.56.248]) by smtp.gmail.com with ESMTPSA id h1sm12209503pgf.54.2017.10.08.05.27.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 08 Oct 2017 05:27:25 -0700 (PDT) Date: Sun, 08 Oct 2017 12:27:00 -0000 From: Stafford Horne To: Simon Marchi Cc: GDB patches , Openrisc , Mike Frysinger , Peter Gavin Subject: Re: [PATCH v5 2/6] sim: cgen: add MUL2OFSI and MUL1OFSI macros (needed for OR1K l.mul[u]) Message-ID: <20171008122723.GB2958@lianli.shorne-pla.net> References: <20171005134912.26799-1-shorne@gmail.com> <20171005134912.26799-3-shorne@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00160.txt.bz2 On Sat, Oct 07, 2017 at 12:00:55PM -0400, Simon Marchi wrote: > On 2017-10-05 09:49 AM, Stafford Horne wrote: > > From: Peter Gavin > > > > sim/common/ChangeLog: > > > > 2012-03-14 Peter Gavin > > > > * cgen-ops.h (MUL2OFSI): New macro, 1's complement overflow. > > (MUL1OFSI): New macro, 2's complement overflow. > > Macro? Aren't they functions? Yes, I am not sure where macro came from. Maybe I added that, maybe it was there before. > > --- > > sim/common/cgen-ops.h | 18 ++++++++++++++++++ > > 1 file changed, 18 insertions(+) > > > > diff --git a/sim/common/cgen-ops.h b/sim/common/cgen-ops.h > > index 97585d7943..ffbdf3fd6e 100644 > > --- a/sim/common/cgen-ops.h > > +++ b/sim/common/cgen-ops.h > > @@ -631,6 +631,22 @@ SUBOFQI (QI a, QI b, BI c) > > return res; > > } > > > > +SEMOPS_INLINE BI > > +MUL2OFSI (SI a, SI b) > > +{ > > + DI tmp = MULDI (EXTSIDI(a), EXTSIDI(b)); > > Add spaces before the parentheses. Right, fixed. > > + BI res = tmp < -0x80000000LL || tmp > 0x7fffffffLL; > > + return res; > > +} > > + > > +SEMOPS_INLINE BI > > +MUL1OFSI (USI a, USI b) > > +{ > > + UDI tmp = MULDI (ZEXTSIDI(a), ZEXTSIDI(b)); > > Here too. > > Otherwise, this patch makes sense to me. > > Simon Thank You -Stafford