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 A8E91385734D for ; Tue, 16 May 2023 06:53:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A8E91385734D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684220005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4gjLohEpSxlLmXUGiZPXAzosVeCuoiaPvQu4ppoG/HI=; b=EeJytLYp/dLVB8bex589AdFuT69x/eUK2vdOk85k8arfB+0cYxTXQ5erHd4UThMr9I6klk 04R5vEP15ea7uOixbvYd0XI4lbw9ZUqoSObxAyOCUdehq2XYWCgyPbuB+MMiV8pfsc5BEZ 9B2DaLpHH2zJnFjT+0e+GXPNukIwcVM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-220-20_aJTJ1OuyTFJIMfxBMYQ-1; Tue, 16 May 2023 02:53:22 -0400 X-MC-Unique: 20_aJTJ1OuyTFJIMfxBMYQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A5C9E84AF32; Tue, 16 May 2023 06:53:21 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 995C72166B31; Tue, 16 May 2023 06:53:19 +0000 (UTC) From: Florian Weimer To: "Ying Huang" Cc: , Subject: Re: [PATCH v2] MIPS: Sync elf.h from binutils References: <20230516061449.192954-1-ying.huang@oss.cipunited.com> Date: Tue, 16 May 2023 08:53:18 +0200 In-Reply-To: <20230516061449.192954-1-ying.huang@oss.cipunited.com> (Ying Huang's message of "Tue, 16 May 2023 14:15:09 +0800") Message-ID: <87v8gs6a3l.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: * Ying Huang: > +#define EF_MIPS_MACH 0x00FF0000 /* Machine variant if we know it. This field was invented at Cygnus, > + but it is hoped that other vendors will adopt it. If some standard > + is developed, this code should be changed to follow it. */ > +#define E_MIPS_MACH_3900 0x00810000 /* Cygnus is choosing values between 80 and 9F; > + 00 - 7F should be left for a future standard; > + the rest are open. */ Surely after around 25 years, these comments can be more precise? > +/* Object attribute tags. */ > +enum > +{ > + /* 0-3 are generic. */ > + > + /* Floating-point ABI used by this object file. */ > + Tag_GNU_MIPS_ABI_FP = 4, > + > + /* MSA ABI used by this object file. */ > + Tag_GNU_MIPS_ABI_MSA = 8, > +}; > + > +/* Object attribute values. */ > +enum > +{ > + /* Values defined for Tag_GNU_MIPS_ABI_MSA. */ > + > + /* Not tagged or not using any ABIs affected by the differences. */ > + Val_GNU_MIPS_ABI_MSA_ANY = 0, > + > + /* Using 128-bit MSA. */ > + Val_GNU_MIPS_ABI_MSA_128 = 1, > +}; Any reason for using enum constants here, and not #define? I understand there is other MIPS precedent, but why continue in this direction? Thanks, Florian