From patchwork Thu Jan 11 09:22:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Cui, Lili" X-Patchwork-Id: 187264 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp1325788dyi; Thu, 11 Jan 2024 01:23:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IEgnYrOYOZED82Lz3Atlbgvm4SqvrYosjUz++1YN/YDaqFl2oU0hDhuOg405ENeTuRWaWpX X-Received: by 2002:ac8:7f4e:0:b0:429:9b17:5910 with SMTP id g14-20020ac87f4e000000b004299b175910mr297989qtk.136.1704965003682; Thu, 11 Jan 2024 01:23:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704965003; cv=pass; d=google.com; s=arc-20160816; b=nH1EZqUh2LMLdzkk9794Wf30q2nXTQ1IOphGgj1SqMZQPpRtbtCx/7ZGZwhPyfejtI er70c4av1iALqmWRW7gvUJzs1o+bLSLXXbUYpQwAjjxH67swOWaAcX4cZizt3mCH3ScF hfZtNV5U/SoIb/meadf2Nn7OqYCcxqk24yiLBpt9++HNCuI49EPhf822UC3t4utvxn0z Mi7bOy94ilyEi8KkqQBLLIBJ8Rsb1DYrDL8m6J4bXCkjUVZIbuOY/ub8L4Yd3CVlr1iL p8DusGJ84IaPukejKwa19bifhrcIeoZoGJCZkQy+HpyQBAj78YTHTnAo9JlBlmjRzFhT zmoA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=/HU5w16W2+TmPJHHpg9dxRR2WS0Oi/9BdskRLO0GXIE=; fh=FtUhYuQVHpmgNVnBO8Ns+o7k2Cbhq17uEhR8APdj3nE=; b=dIEGNOT8d0QC4RrNrKuJodmmItRU/U0M6HqwMQexs69qX1P23Z5v0fIOIiS/d8V0Db IHXdTb14GFjaw0vhP2wmsBZ1/vTrmyne1WNlwF9TcpZ/wqKsgPceKj4CW3SttAk0Z1Tl +TSchNMeg+cYY/RFWca7QZQBZsrr/zOCsuewTgySoDdL76MVva1MgTE7c/zPPPPM3qXC yaJgdP5VqHd+7aXDciVwrbkjmh92+ug5rmWpI1v8DYhpztN8aP6MN/QcefSVwgIkMTWO IujybQ4YAc/d/jnufcHk/S5WqeQxhpgRhkaSnmeZLeVvuqzrS0hOkg2ou8+GE7XMUEdD F3nA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HI7BajpO; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id 7-20020ac85707000000b00429acb31849si563377qtw.492.2024.01.11.01.23.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 01:23:23 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HI7BajpO; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5F063385770D for ; Thu, 11 Jan 2024 09:23:23 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by sourceware.org (Postfix) with ESMTPS id B5744385802F for ; Thu, 11 Jan 2024 09:22:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B5744385802F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B5744385802F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704964934; cv=none; b=GB/PJ0Cw8EV5LJWArWOnagYh9Of4pMuyeoiq2GXW+eUwSpFGeD56N/CiiBtIyQDGSkilsw17jvZxvEG4K4VzBdqSD35zZOQxtEZynWdaa9RDIH2Gyu0+4FM28jinLnRWFaeY34CN0sAG6UFFFK0ygQaoig3T1hG+JbyMWh1DL60= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704964934; c=relaxed/simple; bh=oe0nqFeVtqxzP5CcJrMaLiHPEhjk+KJYc4R8nDz/gDc=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=VPamsPxU38Md0aJrYhDPq3SvsBSZNFz7BnErTLlvN20LjtByOFnrvMFT6S10of3C2kkeNLKvJKfHUmlCyjwTcMyBGDfAEsWuFb6MgP/Ic3wtRW96o+gIcb3PBV1DeqcKkI4Dk32G/KaYHNn61DbysGaykEwD12QwSMPHHKRZnIg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704964930; x=1736500930; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=oe0nqFeVtqxzP5CcJrMaLiHPEhjk+KJYc4R8nDz/gDc=; b=HI7BajpOnnjGxMwtAUI6SrRZ6j8r60Ju+1JhDiBYu/HNcqoH9SA671bi HMgiM6FrUqUxHH28VBBmJ21jHR/QuueOekukDCTK4um7kNIaotmoL46ov wZaLXH/Ya5mz5d0IeQrsTd9p8hKtVKjZD0mXQFtbNEtqEKTSZkzuRnyph 2ud6uMJ9DF0ngl3Ey1XnkGP8d5CnFVg4/H0ohRXD7nBus4+OTVM6QeWTX 6onSiK6PgviKb/Ip8FZoS6JTGjJVqms4DUsW+LGTRS8W/GzdFhamg+WM1 CC2SMP0Ins8T4QJZEYf9W9497tdYsgNUKtr6Q9Wrd5JoS7m2XnIxWCquY A==; X-IronPort-AV: E=McAfee;i="6600,9927,10949"; a="20274407" X-IronPort-AV: E=Sophos;i="6.04,185,1695711600"; d="scan'208";a="20274407" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2024 01:22:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,185,1695711600"; d="scan'208";a="16980378" Received: from scymds04.sc.intel.com ([10.82.73.238]) by fmviesa002.fm.intel.com with ESMTP; 11 Jan 2024 01:22:08 -0800 Received: from shgcc101.sh.intel.com (shgcc101.sh.intel.com [10.239.85.97]) by scymds04.sc.intel.com (Postfix) with ESMTP id A65B62003114; Thu, 11 Jan 2024 01:22:07 -0800 (PST) From: "Cui, Lili" To: binutils@sourceware.org Cc: hongjiu.lu@intel.com, jbeulich@suse.com Subject: [PATCH] x86: Fix indentation and use true/false instead of 1/0 Date: Thu, 11 Jan 2024 09:22:06 +0000 Message-Id: <20240111092206.4134322-1-lili.cui@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787785383290974419 X-GMAIL-MSGID: 1787785383290974419 This patch is to Fix indentation and use true/false instead of 1/0. Regards, Lili. gas/ChangeLog: * config/tc-i386.c (establish_rex): Fix indentation. (check_EgprOperands): Use true/false instead of 1/0. --- gas/config/tc-i386.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index d599306b12c..856edbe557c 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -4300,7 +4300,7 @@ static void establish_rex (void) } } - if (i.rex == 0 && i.rex2 == 0 && (i.rex_encoding || i.rex2_encoding)) + if (i.rex == 0 && i.rex2 == 0 && (i.rex_encoding || i.rex2_encoding)) { /* Check if we can add a REX_OPCODE byte. Look for 8 bit operand that uses legacy register. If it is "hi" register, don't add @@ -4323,14 +4323,14 @@ static void establish_rex (void) i.rex = REX_OPCODE; } - if (is_apx_rex2_encoding ()) - { - build_rex2_prefix (); - /* The individual REX.RXBW bits got consumed. */ - i.rex &= REX_OPCODE; - } - else if (i.rex != 0) - add_prefix (REX_OPCODE | i.rex); + if (is_apx_rex2_encoding ()) + { + build_rex2_prefix (); + /* The individual REX.RXBW bits got consumed. */ + i.rex &= REX_OPCODE; + } + else if (i.rex != 0) + add_prefix (REX_OPCODE | i.rex); } static void @@ -7197,7 +7197,7 @@ static bool check_EgprOperands (const insn_template *t) { if (!t->opcode_modifier.noegpr) - return 0; + return false; for (unsigned int op = 0; op < i.operands; op++) { @@ -7207,7 +7207,7 @@ check_EgprOperands (const insn_template *t) if (i.op[op].regs->reg_flags & RegRex2) { i.error = register_type_mismatch; - return 1; + return true; } } @@ -7215,17 +7215,17 @@ check_EgprOperands (const insn_template *t) || (i.base_reg && (i.base_reg->reg_flags & RegRex2))) { i.error = unsupported_EGPR_for_addressing; - return 1; + return true; } /* Check if pseudo prefix {rex2} is valid. */ if (i.rex2_encoding) { i.error = invalid_pseudo_prefix; - return 1; + return true; } - return 0; + return false; } /* Check if APX operands are valid for the instruction. */