public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] Add handler for more i386_cpu_flags
@ 2022-11-02  1:28 Lili Cui
  0 siblings, 0 replies; only message in thread
From: Lili Cui @ 2022-11-02  1:28 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=75f8266aba00d410ad9a5f82ed46ecffafed1766

commit 75f8266aba00d410ad9a5f82ed46ecffafed1766
Author: Kong Lingling <lingling.kong@intel.com>
Date:   Tue Nov 1 10:50:08 2022 +0800

    Add handler for more i386_cpu_flags
    
    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.

Diff:
---
 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 47161158676..ecf36c89fbc 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.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-02  1:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-02  1:28 [binutils-gdb] Add handler for more i386_cpu_flags Lili Cui

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).