From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 63F97385840F for ; Fri, 24 Feb 2023 10:21:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 63F97385840F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu Received: by mail-wr1-x430.google.com with SMTP id r7so13223740wrz.6 for ; Fri, 24 Feb 2023 02:21:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=aEiFXPr0oNv/dqq9ZDuKK1pSB/P9Zdhw1mZ/zEhIGR0=; b=QLx3d5Wr8OHf5xRdkRWeCyEMFUGrIDQBBhNCtW2wkptlp/nPlHEIZ4BEPXojLO7hJB 4a1anJs3V9JKjWlLlV6NIXpXq2zkxqfhDGaYRl1lK5YvAXPnFIdfo4i9GwE6+eTXhj0z /BGXD89PqW42taT1OBLVfB8ordgc+sOgQKAnL3oRE1oVD8pe39vFlRfs7f2ZnYTuGLob sby8M5vpQTtzH2/IVIovpgUFszozA70o7PYqq8RsDAuhYJ4xGU0zEeW44Lj7REnqaVo4 n4dCl3JNVyObDbZP9byD6A4WEZEDXudxSUKHVtFmObzoYcCmrM/3H/9DCyUU/ltnPjtJ jLgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aEiFXPr0oNv/dqq9ZDuKK1pSB/P9Zdhw1mZ/zEhIGR0=; b=CzHk/bSVYyyZYaifTfN49qbW5zZYRg6TusOu9ViIw9liPhbl+SSMn8k6vYFTkdIkTO abfYShGxhGbiUCRAQVISsuvshNCkodYmNI99uUgaz55xns55rB2pS5vctI3WE0dzPKiL 5mwJZ9gnWrpaGaRPZ1aqm3MrKpkBvCUv9346QHlab/4M0WToZUvTxzvXDKB/Wz8A7z/h wSoi2z/FHsHCeVp8+TamqYCzr50/uNWtsez42pBurNRic5c2/D28ZgKcIBFFgqfDDkVz 7+o5HnM2NTZB5z4w/0k9QR5VXiFt+zSq1kRoGzs3YrBFc9RtzOU5HlmAn6L6Q7zZz/QF 7Z2g== X-Gm-Message-State: AO0yUKVJrn+dlEK59t5NjgHAwUopej3ygFu6P/0H+EjhDvYOLpQlumF+ 3NUvEkgh1OVHfuoHiEHTNgml1z1LXDhNzHo3js8uBw== X-Google-Smtp-Source: AK7set/KOwxKwTU3Qp1WoxuReoocMQW90yVacN1JLzryX95gPrPzIBbyg0QavByAcLj139RItWp1tXuGAlIB5za3KNc= X-Received: by 2002:a5d:544a:0:b0:2c5:3fcb:682b with SMTP id w10-20020a5d544a000000b002c53fcb682bmr1028903wrv.2.1677234114958; Fri, 24 Feb 2023 02:21:54 -0800 (PST) MIME-Version: 1.0 References: <20230224055127.2500953-1-christoph.muellner@vrull.eu> <20230224055127.2500953-5-christoph.muellner@vrull.eu> In-Reply-To: From: =?UTF-8?Q?Christoph_M=C3=BCllner?= Date: Fri, 24 Feb 2023 11:21:43 +0100 Message-ID: Subject: Re: [PATCH v3 04/11] riscv: thead: Add support for the XTheadBs ISA extension To: Kito Cheng Cc: gcc-patches@gcc.gnu.org, Jim Wilson , Palmer Dabbelt , Andrew Waterman , Philipp Tomsich , Jeff Law , Cooper Qu , Lifang Xia , Yunhai Shang , Zhiwei Liu Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Feb 24, 2023 at 8:37 AM Kito Cheng wrote: > > > diff --git a/gcc/config/riscv/thead.md b/gcc/config/riscv/thead.md > > index 158e9124c3a..2c684885850 100644 > > --- a/gcc/config/riscv/thead.md > > +++ b/gcc/config/riscv/thead.md > > @@ -29,3 +29,14 @@ (define_insn "*th_addsl" > > "th.addsl\t%0,%3,%1,%2" > > [(set_attr "type" "bitmanip") > > (set_attr "mode" "")]) > > + > > +;; XTheadBs > > + > > +(define_insn "*th_tst" > > + [(set (match_operand:X 0 "register_operand" "=r") > > + (zero_extract:X (match_operand:X 1 "register_operand" "r") > > + (const_int 1) > > + (match_operand 2 "immediate_operand" "i")))] > > + "TARGET_XTHEADBS" > > Add range check like *bexti pattern? > > TARGET_XTHEADBS && UINTVAL (operands[2]) < GET_MODE_BITSIZE (mode) Ok. Thanks, Christoph > > > + "th.tst\t%0,%1,%2" > > + [(set_attr "type" "bitmanip")])