From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2397 invoked by alias); 9 Oct 2017 17:06:01 -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 2381 invoked by uid 89); 9 Oct 2017 17:06:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*MI:google, H*M:google X-HELO: mail-oi0-f73.google.com Received: from mail-oi0-f73.google.com (HELO mail-oi0-f73.google.com) (209.85.218.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Oct 2017 17:06:00 +0000 Received: by mail-oi0-f73.google.com with SMTP id g125so7065712oib.13 for ; Mon, 09 Oct 2017 10:05:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:message-id:date:subject:from:to:cc; bh=ofsYBWEbTTxtqh7MbIhcPflf+UTAhuu9cW5O52UMN+Q=; b=lWEve/qXXRzGIotmmn0PlBYKrW4zHMnrpLVftD5aA9jkNT0fXy7EBPeDwVJdYIzDZr RFipMV/n9OFXTfE0xWu26S7SkeNeTAvCzoKvZfn6sfBiyBcjZ1MCdLI5kfBxY4DLSYxZ k6IH3Ck/ts0vBsY9HyZrmyJiLh+EQGlCi681rDC0MxnozooQt7sbBo+rUm2rtcu4I9Ja j6gwt2yxHbn8GPVAn+a+z0oKhYhjl9vsGxObrMpHsmOk/mXkuziitb4KVXKKdRGmYFgK Db/4W1uP7PbdiJiBWcdnJuimUbnYkqVkYhH9ehMmh9JrYPyYUjDpWAhWmNqkaUQZ0kRL aUyA== X-Gm-Message-State: AMCzsaWhM08kmjSkbrnk1PmpdZShs24rPnQh5AC3ycihX4H25By5p0Gx Bcg5P8XqYgwJ220EySiD2yEumrE= X-Google-Smtp-Source: AOwi7QAExfsIE37LGjF11bU98lG8ky8T5yRQ4/gtWtcurxYbPTSXHWhZusxj4M2ljF1+cv1bhdkBuWE= MIME-Version: 1.0 X-Received: by 10.157.11.106 with SMTP id p39mr86623otd.84.1507568758329; Mon, 09 Oct 2017 10:05:58 -0700 (PDT) Message-ID: <001a113b1b7650e4fd055b2034d6@google.com> Date: Mon, 09 Oct 2017 17:06:00 -0000 Subject: Re: [PATCH v5 2/6] sim: cgen: add MUL2OFSI and MUL1OFSI macros (needed for OR1K l.mul[u]) From: "Doug Evans via gdb-patches" Reply-To: Doug Evans To: Stafford Horne Cc: Simon Marchi , GDB patches , Openrisc , Mike Frysinger , Peter Gavin Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00227.txt.bz2 Stafford Horne writes: > 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. Maybe I'm missing something but the text looks backwards. IOW: * cgen-ops.h (MUL2OFSI): New function, 2's complement overflow. (MUL1OFSI): New function, 1's complement overflow. ? OK with that change (and the other suggested changes to date). > > > > 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