From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 15E6B3858D38 for ; Tue, 11 Apr 2023 09:59:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 15E6B3858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-248-SxlNJOqzMpqh76c945b7Ng-1; Tue, 11 Apr 2023 05:59:33 -0400 X-MC-Unique: SxlNJOqzMpqh76c945b7Ng-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F309E3855565; Tue, 11 Apr 2023 09:59:32 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AE7A9492B00; Tue, 11 Apr 2023 09:59:32 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 33B9xT372466291 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 11 Apr 2023 11:59:29 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 33B9xRDF2466290; Tue, 11 Apr 2023 11:59:27 +0200 Date: Tue, 11 Apr 2023 11:59:27 +0200 From: Jakub Jelinek To: juzhe.zhong@rivai.ai, Jeff Law , gcc-patches , "kito.cheng" , palmer , rguenther , richard.sandiford@arm.com Subject: Re: [PATCH] machine_mode type size: Extend enum size from 8-bit to 16-bit Message-ID: Reply-To: Jakub Jelinek References: <20230410144808.324346-1-juzhe.zhong@rivai.ai> <89f088ec-8692-01f5-0395-5a66ddf085d7@gmail.com> <47D962C7C724E3A2+20230410231445834316202@rivai.ai> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-24.4 required=5.0 tests=BAYES_00,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,KAM_MANYTO,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no 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, Apr 11, 2023 at 10:46:25AM +0100, Richard Sandiford wrote: > I agree with all the comments about the danger of growing the number of > modes too much. But it looks like rtx_def should be easy to rearrange. > Unless I'm missing something, there are less than 256 rtx codes at > present. So one simple option would be to make the code 8 bits and > the machine_mode 16 bits (and swap them, so that they stay well-aligned > wrt their size). > > That of course would create new problem if we want more than 256 codes > in future. But then there would be the option of a non-power-of-2 > split (12/12 or whatever). Also, it's possible to multiplex operations > into a single code by adding an extra operand, whereas it's harder to > multiplex modes. We have 151 rtx codes if not a generator, 201 otherwise. That is closer to the limit except for the RISCV proposed changes. Jakub