From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Content-Transfer-Encoding: 8bit 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 List-Id: 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. */ -- 2.25.1