From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by sourceware.org (Postfix) with ESMTPS id 8ADA23858C83 for ; Wed, 19 Oct 2022 14:56:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8ADA23858C83 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=1666191377; x=1697727377; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=NT3oBHigm3oeR0onYQg7is3pnqn7ffiMPkSLKazcSo4=; b=cyJVfEBAJOzHC6HjySCuJwekU0UEAKlu/AzVuobHci6R+K7rhWqbD1yw rd5TPTgQTr+v/cyIP0HhWX+TpIwXfHEfLtvgR5lKaXuTDeiJ9ELfQcJy0 YBVk8vKAk/s7LCfYv9LWZyX5owYHglVeatE0RsVU48hDzxhGwnBPMUQoj tsCxs8Pq19tmbB/KmfFUhRWRDN9r33TW4orBUAilPyjQB7I39YNIsNa9G RPok4beWY6Eh4DuCjJnVV6uFdc2DOMCWgGa2gj9UJJ2m5M9WYfgSm1u1V i4o+IM/OXjsNRJQ/4lSVVgabB0onxbccnTctJFpxc14XNE5T7kJvcfZeR g==; X-IronPort-AV: E=McAfee;i="6500,9779,10505"; a="289749462" X-IronPort-AV: E=Sophos;i="5.95,196,1661842800"; d="scan'208";a="289749462" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 07:56:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10505"; a="804336399" X-IronPort-AV: E=Sophos;i="5.95,196,1661842800"; d="scan'208";a="804336399" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by orsmga005.jf.intel.com with ESMTP; 19 Oct 2022 07:56:14 -0700 Received: from shliclel320.sh.intel.com (shliclel320.sh.intel.com [10.239.240.127]) by shvmail03.sh.intel.com (Postfix) with ESMTP id 164A61007803; Wed, 19 Oct 2022 22:56:13 +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: Wed, 19 Oct 2022 22:56:03 +0800 Message-Id: <20221019145608.45213-6-haochen.jiang@intel.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20221019145608.45213-1-haochen.jiang@intel.com> References: <20221019145608.45213-1-haochen.jiang@intel.com> X-Spam-Status: No, score=-11.7 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 f887074e60..81bbf22fec 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.1