From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by sourceware.org (Postfix) with ESMTPS id 5F3243858404 for ; Fri, 14 Oct 2022 09:14:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5F3243858404 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665738895; x=1697274895; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=7QPrOmsBUEcHTKWWWVX+dgorItvCk+4tgQ9r313T2UY=; b=Qtl+Wyy+4+SGY9XDIBf7sszXyE1JPkoeC8/cqCt2D78QrkEvLd9lKOai DUs5vAiQzYEpEqRB43/D+/TG5k7OqNEAHoS9WYiRVRVScy/8h0zg4Ygk/ UrDbJ4ddgQ9BhAgdeYBg/J87MKjvbtsCgBferLYCbmlHqfwn1KbPWH9Lv bsrnXTt6F01ggp7I3UhKsscxZW3tekbLilqOorFyxD3Xwa+Ile8ZawHFP 52uHBTkLuBV+xkmVrWwUXjip7RkJfuyvuBH5a+8mGcFgUFPjGQ0YZtzNu SeJG2YxL8qVxpkkIm6d22vR7xNkNlHWKNelsngu8MsvuHHW4FzGHBMMLo w==; X-IronPort-AV: E=McAfee;i="6500,9779,10499"; a="369520160" X-IronPort-AV: E=Sophos;i="5.95,182,1661842800"; d="scan'208";a="369520160" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2022 02:14:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10499"; a="629873042" X-IronPort-AV: E=Sophos;i="5.95,182,1661842800"; d="scan'208";a="629873042" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by fmsmga007.fm.intel.com with ESMTP; 14 Oct 2022 02:14:52 -0700 Received: from shliclel314.sh.intel.com (shliclel314.sh.intel.com [10.239.240.214]) by shvmail03.sh.intel.com (Postfix) with ESMTP id 5500D1009C98; Fri, 14 Oct 2022 17:14:50 +0800 (CST) From: Haochen Jiang To: binutils@sourceware.org Cc: jbeulich@suse.com, hjl.tools@gmail.com, Kong Lingling Subject: [PATCH 05/10] Add handler for more i386_cpu_flags Date: Fri, 14 Oct 2022 17:12:43 +0800 Message-Id: <20221014091248.4920-6-haochen.jiang@intel.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20221014091248.4920-1-haochen.jiang@intel.com> References: <20221014091248.4920-1-haochen.jiang@intel.com> X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_NONE,TXREP 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: From: Kong Lingling gas/ChangeLog: * config/tc-i386.c (cpu_flags_all_zero): Add new ARRAY_SIZE handle. (cpu_flags_equal): Ditto. (cpu_flags_and): Ditto. (cpu_flags_or): Ditto. (cpu_flags_and_not): Ditto. --- gas/config/tc-i386.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 0d161d60ef..7045e18cff 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -1618,6 +1618,10 @@ cpu_flags_all_zero (const union i386_cpu_flags *x) { switch (ARRAY_SIZE(x->array)) { + case 5: + if (x->array[4]) + return 0; + /* Fall through. */ case 4: if (x->array[3]) return 0; @@ -1643,6 +1647,10 @@ cpu_flags_equal (const union i386_cpu_flags *x, { switch (ARRAY_SIZE(x->array)) { + case 5: + if (x->array[4] != y->array[4]) + return 0; + /* Fall through. */ case 4: if (x->array[3] != y->array[3]) return 0; @@ -1675,6 +1683,9 @@ cpu_flags_and (i386_cpu_flags x, i386_cpu_flags y) { switch (ARRAY_SIZE (x.array)) { + case 5: + x.array [4] &= y.array [4]; + /* Fall through. */ case 4: x.array [3] &= y.array [3]; /* Fall through. */ @@ -1698,6 +1709,9 @@ cpu_flags_or (i386_cpu_flags x, i386_cpu_flags y) { switch (ARRAY_SIZE (x.array)) { + case 5: + x.array [4] |= y.array [4]; + /* Fall through. */ case 4: x.array [3] |= y.array [3]; /* Fall through. */ @@ -1721,6 +1735,9 @@ cpu_flags_and_not (i386_cpu_flags x, i386_cpu_flags y) { switch (ARRAY_SIZE (x.array)) { + case 5: + x.array [4] &= ~y.array [4]; + /* Fall through. */ case 4: x.array [3] &= ~y.array [3]; /* Fall through. */ -- 2.18.2