public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Haochen Jiang <haochen.jiang@intel.com>
To: binutils@sourceware.org
Cc: jbeulich@suse.com, hjl.tools@gmail.com,
	Kong Lingling <lingling.kong@intel.com>
Subject: [PATCH 4/6] Add handler for more i386_cpu_flags
Date: Mon, 31 Oct 2022 11:05:05 +0800	[thread overview]
Message-ID: <20221031030507.35588-5-haochen.jiang@intel.com> (raw)
In-Reply-To: <20221031030507.35588-1-haochen.jiang@intel.com>

From: Kong Lingling <lingling.kong@intel.com>

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 9c0f86ac3d..99d1a4cfec 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1619,6 +1619,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;
@@ -1644,6 +1648,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;
@@ -1676,6 +1684,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.  */
@@ -1699,6 +1710,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.  */
@@ -1722,6 +1736,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


  parent reply	other threads:[~2022-10-31  3:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31  3:05 [PATCH v4 0/6] Support Intel Sierra Forest Instructions Haochen Jiang
2022-10-31  3:05 ` [PATCH 1/6] Support Intel AVX-IFMA Haochen Jiang
2022-10-31 16:52   ` H.J. Lu
2022-10-31  3:05 ` [PATCH 2/6] Support Intel AVX-VNNI-INT8 Haochen Jiang
2022-10-31 16:53   ` H.J. Lu
2022-11-02 10:45   ` Jan Beulich
2022-10-31  3:05 ` [PATCH 3/6] Support Intel CMPccXADD Haochen Jiang
2022-10-31 16:54   ` H.J. Lu
2022-11-02 10:52   ` Jan Beulich
2022-11-02 16:25     ` H.J. Lu
2022-10-31  3:05 ` Haochen Jiang [this message]
2022-10-31 16:54   ` [PATCH 4/6] Add handler for more i386_cpu_flags H.J. Lu
2022-10-31  3:05 ` [PATCH 5/6] Support Intel WRMSRNS Haochen Jiang
2022-10-31 16:56   ` H.J. Lu
2022-11-02 10:56   ` Jan Beulich
2022-11-02 14:35   ` Jan Beulich
2022-10-31  3:05 ` [PATCH 6/6] Support Intel MSRLIST Haochen Jiang
2022-10-31 16:55   ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221031030507.35588-5-haochen.jiang@intel.com \
    --to=haochen.jiang@intel.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=lingling.kong@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).