From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) by sourceware.org (Postfix) with ESMTPS id 4B3F03858D28 for ; Wed, 6 Sep 2023 03:16:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4B3F03858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dabbelt.com Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-57355a16941so2088543eaf.2 for ; Tue, 05 Sep 2023 20:16:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20230601.gappssmtp.com; s=20230601; t=1693970186; x=1694574986; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=h5LyNggD+bmyX0JUT+9CEiLufzracqMK8stmG8M59UE=; b=KhWAqca9bYnlC/NDaZYKx/YrrqPrCxmbNZIxoEVJ7K1TLuGN51d82SAKnQC/aqIibm 1IOtAVJbTbtx5QUlQHrFsyw2Wmn1GSfXyl+obF/lML5mtgz1qGGpiOewXmdTvDLJNKVH X6zYGvT3pXO+KFxpmGlcvJ4/YF+xK4dxmCBvIU9naMMJFbW9dCp4cvsfltCyzt+IfLeu AF7alWDcU6P1wYRFYvJ7yIGSOO5Jd9FhbJC+968yYl8rLHOpWPtVS7yxauDYjr2nocL8 ri7v2Fr4iFyuGYc7La7gBZ82yE4f9eRULJ/NmTOSgT7aP9Xw+aHZPVx1j2y1YN0VinCd G8mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693970186; x=1694574986; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=h5LyNggD+bmyX0JUT+9CEiLufzracqMK8stmG8M59UE=; b=XJPZWyyZ/xCLK8yZUC+rr5my2VkDbh2yTg1DjyKmeCsVm03Sk37qbvx2KVaoDmRjy8 fstkJqMuvWJw+C8L6Jk5eY5qOESFm1ztO5vsK13Wu3VkRDN/z1yBHKq0s9jejc0fdWIT oK4IbC0vlSm2r3SLEay6KV6qp7A9+EHNdxOekDxSjAkJYE+Z8SYRnpu9G3qlmMEOWAFF ugYnWGj+TfLoAxqeApI6EA8Rv17WouHsh+twrDUKIPV6k2+Wt7UtY7UC/qnwwjWrIrLQ 51GUeY3XQKbGdltYrtDb+WnObwW9mZ76ZYxCi87ix5I+vniZjuQj+yKqewY5so7ukyC7 PPLQ== X-Gm-Message-State: AOJu0Yz9t11Krtz/FM3QwHvlRUcRA4oEFSufKs5/Du2+JWf+LuIXtCQp SBde/MHFatQITElpaq15gCTKccStD14Sm+5MqFs= X-Google-Smtp-Source: AGHT+IGhY3VYt/ASQfJiW64ehprm9VNV/CzHS4uLi63LAnjonugfcJ9DWs5vOAtXinRXBxGNBSNzEA== X-Received: by 2002:a05:6358:949d:b0:134:d282:92e9 with SMTP id i29-20020a056358949d00b00134d28292e9mr2148657rwb.29.1693970186182; Tue, 05 Sep 2023 20:16:26 -0700 (PDT) Received: from localhost ([135.180.227.0]) by smtp.gmail.com with ESMTPSA id x6-20020aa793a6000000b00687dde8ae5dsm9679589pff.154.2023.09.05.20.16.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 20:16:25 -0700 (PDT) Date: Tue, 05 Sep 2023 20:16:25 -0700 (PDT) X-Google-Original-Date: Tue, 05 Sep 2023 20:16:23 PDT (-0700) Subject: Re: [PATCH v3 1/1] RISC-V: Add support for 'XVentanaCondOps' reusing 'Zicond' support In-Reply-To: CC: research_trasio@irq.a4lg.com, gcc-patches@gcc.gnu.org From: Palmer Dabbelt To: gcc-patches@gcc.gnu.org Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,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 Tue, 05 Sep 2023 20:07:16 PDT (-0700), gcc-patches@gcc.gnu.org wrote: > > > On 9/5/23 20:33, Tsukasa OI wrote: > >> Internally we have this as: >>> >>> (TARGET_ZICOND || TARGET_XVENTANACONDOPS) >>> >>> I don't really care, so I'm happy to go with yours. > >> Because XVentanaCondOps instructions are only available on 64-bit target >> (I wanted to prevent misuses because we don't reject XVentanaCondOps on >> RV32), the target expression would be: >> >> (a) (TARGT_ZICOND || (TARGET_XVENTANACONDOPS && TARGET_64BIT)) >> >> and I had three options to deal with it. >> >> 1. Use the plain expression (a) >> 2. Name te expression (a) >> 3. Enable TARGET_XVENTANACONDOPS only on 64-bit target >> >> I think option 2 is the simplest yet understandable. > Sure. It may also give us the option to roll in some of the thead code > at some point. Their conditional move support seems to line up pretty > well with zicond/xventanacondops too, though I haven't looked at it very > deeply yet. IIUC the T-Head stuff is actually a conditional move, so it's a little different than the conditional move/zero extensions (which IIUC have exactly the same semantics, just different encodings). Hopefully the cmov fits in a bit easier, we shouldn't need to juggle the extra 0 input. >> I'm happy to hear that because I had no confidence so whether we can use >> #include to share common parts. I haven't tried yet but I believe we >> have to #include only common parts (not including dg instructions >> containing -march=..._zicond) so I will likely required to modify zicond >> tests as well. > You actually don't even have to break out the common parts. The dg- > directives in an included file aren't parsed by the dg framework. > > >> >> I'll submit PATCH v4 (not committing directly) as changes will be a bit >> larger (and Jeff's words seem "near approval" even after fixing the >> tests, not complete approval). > Sounds perfect. Given the bulk of the review work is already done, the > final review ack will be easy. > > jeff