From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id 29B113858D37 for ; Tue, 24 Oct 2023 04:07:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 29B113858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 29B113858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2401:2500:203:30b:4000:6bfe:4757:0 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698120469; cv=none; b=CoWAIfw3MOcZ4cbPpY1MygHVO0mDQ0WnSYKmQmDmuh7DYdNEnRuKlCn3NW/Z7ET051QkGZs/DdgdjinGBIsmUEjFNLGX4MCud4JZEtC5N9Ws5STnmQnC1/D5QCGxPuhSCDz/PV7nYdsv+Mdr41/QZcZ5Z6Q4e5T8btBnp2ma5vQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698120469; c=relaxed/simple; bh=MvMVi6XQd+twVsYbaWnlNyDC+6kaA6Z+ZwCIoafMl9o=; h=DKIM-Signature:Message-ID:Date:Mime-Version:Subject:To:From; b=x0KzhtX9Mz/+zxZxSuVCStBA0Nf1TOwu9KXTW0+JS/xi1/YfG4Y008QhlUWwI+eS2bl9zXny1URN0T1FaWD8i2ClFvbHvECAqRFtn8SJbd1mG0fHSnYBoZ0gUtMGtD8xDvWmmQgH66mfIsj6pXms8mJ6ENOI94c1tZZqwybCyUA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 3011F300089; Tue, 24 Oct 2023 04:07:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1698120459; bh=08qaaQOisazqO3dQSrMyyXwbJUO3mTVuR4oWMTC9mCo=; h=Message-ID:Date:Mime-Version:Subject:To:References:From: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=idHoYomSyiXc4jK40gJtJJBTgZG3qZTeqGcoW55/5CwZ6tUq8CNrLMhjD9nL91LtX 0CwD+hGfreots2CWSd3DQmeMLFAC+QVsavGlQCq3E/u/OYM9mPglA/DrCicGznS1eC VqtldhRQLpTdSCaTYQsLM7U4z/SRCQZKczK+GoZs= Message-ID: Date: Tue, 24 Oct 2023 13:07:37 +0900 Mime-Version: 1.0 Subject: Re: [PATCH v2] RISC-V: Add support for 'Zacas' atomic CAS Content-Language: en-US To: Jan Beulich , Binutils References: <1279cd5fe3d0b809a20e18ac61f817017cca7ec9.1697946848.git.research_trasio@irq.a4lg.com> From: Tsukasa OI In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 2023/10/23 15:47, Jan Beulich wrote: > > Mind me asking what good the former of the two really does? It's just > match_opcode() aiui, properly obfuscated. > > Jan > ****Excuse me?**** As a single patch set, I think Gianluca's patch with a minor fix will work perfectly. But, the concept of register pairs / register groups are not specific to 'Zacas', that's what I'm talking about and the reason I think Gianluca's patch set's match function will not be a long term solution (actually, I found Gianluca's patch set after I wrote mine, but that wouldn't change my opinion). So, let me list all register group-related constraints in existing and upcoming extensions (except all ones; x is "not applicable" and can be theoretically replaced to "1" but it's probably better to be named "x" to indicate that the instruction does not use "x" operand as register): Extension | RD | RS1 | RS2 | RS3 ----------- | --- | --- | --- | --- Zdinx | 2 | 2 | 2 | x Zdinx | 2 | 2 | 2 | 2 Zdinx | x | 2 | 2 | x Zdinx | 1 | 2 | x | x Zdinx | 2 | 1 | x | x Zdinx | 2 | 2 | x | x ----------- | --- | --- | --- | --- Zqinx | 2 | 2 | 2 | x Zqinx | 4 | 4 | 4 | x Zqinx | 2 | 2 | 2 | 2 Zqinx | 4 | 4 | 4 | 4 Zqinx | x | 2 | 2 | x Zqinx | x | 4 | 4 | x Zqinx | 1 | 2 | x | x Zqinx | 1 | 4 | x | x Zqinx | 2 | 1 | x | x Zqinx | 2 | 2 | x | x Zqinx | 2 | 4 | x | x Zqinx | 4 | 1 | x | x Zqinx | 4 | 2 | x | x Zqinx | 4 | 4 | x | x ----------- | --- | --- | --- | --- Zpsfoperand | 2 | 1 | 1 | x Zpsfoperand | 2 | 2 | 1 | x Zpsfoperand | 2 | 2 | 2 | x ----------- | --- | --- | --- | --- Zacas | 2 | 1 | 2 | x Lots of similar constraints but different values. Don't you think a generator macro is the best solution for this kind of situation? Tsukasa