From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id 206FA3858C66 for ; Tue, 9 Jan 2024 08:14:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 206FA3858C66 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 206FA3858C66 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::134 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704788047; cv=none; b=TB3Zu1kc1I8qGyOuHrgmgoUwDXZYsS5Et8MdIeT4iZPaUsddOKthYonkE8wy2SauDIEkLly8zisB0c4T1cZbucx/+ghMj7pWRieBoHJcIYiz8+M8UfEn6EpaWgbEP1vPdfKuv/OtV4tVT2pYG20JYAS5DDAAMNLSPAUBxph7/FY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704788047; c=relaxed/simple; bh=h5LrA25XUhhvjSo36CS1Oe6xgb5j2tPICdYgngvZmpA=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=o7E7NaD4KeFwhG1fSXl8Ruov0UoGIoZUlkWlHaYRdKdKKd1ggExmZeomUddlbV0gkgYVhKrrjrkOli6VBAMM960LxUX4RmPbUuJ0AcS3YLAyxss1wD9SgpM5bIei/y6vpDujA4ddtwDM7pcQzZT1MxYnr/y8LYYBUKJQHbI6WCQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-50e7c6e3c63so2656037e87.3 for ; Tue, 09 Jan 2024 00:14:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1704788043; x=1705392843; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:cc :content-language:references:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=6EZ6RHQWJTu+QWwwdJT0JbVXEjgP1dcusbo73i1jDEo=; b=HFWd+aQDcOfQ7E0Czbgp8euBd1VyaCwyp9d+YWcmMvcYTx9dBUMQ859zTvmlJnwcaV JFP6Swb/ee9RvJUEaT1DxJHb69tMFLqIPRMFoHk3MIdeaGkhGjRgq9q8PaKJMZxa/4im KdeEsXpXc1+vV5jHb3z7EC4Ui9mwSw4FVQqTk09iEFZucmRY+Q+NWiw8TYh7tQRWLZ46 655J9/+fiC+/LM3/DXsmDl4xMO9Dmq+VJR9YcGs0HfI89uNj3022rzBqzgmUdZSf/opS bHvzifdSl1zPJfFmn9LsVWsRHT9p9zd6mABO20/hRXC05Zye4iqgGSNtD9RRZLAbheCT /AwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704788043; x=1705392843; h=content-transfer-encoding:in-reply-to:autocrypt:from:cc :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6EZ6RHQWJTu+QWwwdJT0JbVXEjgP1dcusbo73i1jDEo=; b=tANZN5TdE9rqoNTcDf8+F83rkymSlhBwjGX25BTCybImHV06FmLGDfnyde2QIIDvg0 HB+QdTaro0BPAHQfIC7iaKDpLgzvJWcmg/VvAJfLNVm27L/R35ceS+MYgaekUSsGXXaL XVZOSVUlURzvWeYfuIAuaTZFSgKMOLYO29h5uyG80qGcpN0eICniNjexCb+p17EZ/chY Oe12NpbMvjfRy3HWWaW9g3+kDXIMW8794thZ08GqGTzKLM1RXadC5FoHyG+boIT9uaSp lm63jEbwVsPCghgN8Ky5Vlg3sxI9F1CkIp3Y854vPv9omFa2dKQa8iUFP96r3/Ky3ju+ hOLg== X-Gm-Message-State: AOJu0Yx1+8Ac6YsZPvwwNrQeVkJiRyKIUrIIB06g9f8h5XZCTZxD+ZxC oIViJNJTORmwuvXTuFvIgGId5r2Bchfq X-Google-Smtp-Source: AGHT+IEUYReA+7gAPw9WU39AGkuInibWrtGeSsWcXR3PrpWuP9ftLiAH4PW0aqFUSXbJnuldcz/amQ== X-Received: by 2002:ac2:4576:0:b0:50e:3726:7036 with SMTP id k22-20020ac24576000000b0050e37267036mr890310lfm.170.1704788043629; Tue, 09 Jan 2024 00:14:03 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id r26-20020a6b441a000000b007bc4a820644sm389653ioa.34.2024.01.09.00.14.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Jan 2024 00:14:03 -0800 (PST) Message-ID: Date: Tue, 9 Jan 2024 09:14:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] opcodes: gas: i386: use Rex2 as attribute not constraint To: Indu Bhagat References: <20240109011229.4191052-1-indu.bhagat@oracle.com> <20240109011229.4191052-2-indu.bhagat@oracle.com> Content-Language: en-US Cc: binutils@sourceware.org From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDt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Alk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <20240109011229.4191052-2-indu.bhagat@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3031.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: On 09.01.2024 02:12, Indu Bhagat wrote: > It seems to fit better if Rex2 is an attribute for now rather than a > constraint. On its own, I disagree with this as justification. When it was introduced, I had specifically asked for it to be the way it is right now. The issue with it is that it conflicts with an operand constraint you mean to add. So while I'm okay with the code change, I'd like to ask that - the description be extended, - the patch be part of the SCFI series, preferably to also be committed together with the (subsequent) patch introducing the new operand constraint. Jan > PS: Removed the opcodes/i386-tbl.h diffs from patch to keep the message > size within limits. > > ChangeLog: > * gas/config/tc-i386.c (is_apx_rex2_encoding): Update the check. > * opcodes/i386-gen.c: Add a new BITFIELD for Rex2. > * opcodes/i386-opc.h (REX2_REQUIRED): Remove. > * opcodes/i386-opc.tbl: Remove Rex2 operand constraint. > * opcodes/i386-tbl.h: Regenerated. > --- > gas/config/tc-i386.c | 2 +- > opcodes/i386-gen.c | 1 + > opcodes/i386-opc.h | 6 +- > opcodes/i386-opc.tbl | 1 - > opcodes/i386-tbl.h | 11659 +++++++++++++++++++++++++++-------------- > 5 files changed, 7778 insertions(+), 3891 deletions(-) > > diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c > index 27d0742c6c8..b25cc517240 100644 > --- a/gas/config/tc-i386.c > +++ b/gas/config/tc-i386.c > @@ -3929,7 +3929,7 @@ static INLINE bool > is_apx_rex2_encoding (void) > { > return i.rex2 || i.rex2_encoding > - || i.tm.opcode_modifier.operandconstraint == REX2_REQUIRED; > + || i.tm.opcode_modifier.rex2; > } > > static unsigned int > diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c > index e8b92e32f45..21331216486 100644 > --- a/opcodes/i386-gen.c > +++ b/opcodes/i386-gen.c > @@ -490,6 +490,7 @@ static bitfield opcode_modifiers[] = > BITFIELD (ISA64), > BITFIELD (NoEgpr), > BITFIELD (NF), > + BITFIELD (Rex2), > }; > > #define CLASS(n) #n, n > diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h > index 38661ffe70c..eaebfaa9ba8 100644 > --- a/opcodes/i386-opc.h > +++ b/opcodes/i386-opc.h > @@ -579,8 +579,6 @@ enum > /* Instrucion requires that destination must be distinct from source > registers. */ > #define DISTINCT_DEST 9 > - /* Instrucion requires REX2 prefix. */ > -#define REX2_REQUIRED 10 > OperandConstraint, > /* instruction ignores operand size prefix and in Intel mode ignores > mnemonic size suffix check. */ > @@ -750,6 +748,9 @@ enum > /* No CSPAZO flags update indication. */ > NF, > > + /* Instrucion requires REX2 prefix. */ > + Rex2, > + > /* The last bitfield in i386_opcode_modifier. */ > Opcode_Modifier_Num > }; > @@ -796,6 +797,7 @@ typedef struct i386_opcode_modifier > unsigned int isa64:2; > unsigned int noegpr:1; > unsigned int nf:1; > + unsigned int rex2:1; > } i386_opcode_modifier; > > /* Operand classes. */ > diff --git a/opcodes/i386-opc.tbl b/opcodes/i386-opc.tbl > index 1751eff8bd2..ada5c06e501 100644 > --- a/opcodes/i386-opc.tbl > +++ b/opcodes/i386-opc.tbl > @@ -85,7 +85,6 @@ > #define RegKludge OperandConstraint=REG_KLUDGE > #define SwapSources OperandConstraint=SWAP_SOURCES > #define Ugh OperandConstraint=UGH > -#define Rex2 OperandConstraint=REX2_REQUIRED > > #define ATTSyntax Dialect=ATT_SYNTAX > #define ATTMnemonic Dialect=ATT_MNEMONIC