From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7804) id 426863858C00; Wed, 2 Nov 2022 01:28:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 426863858C00 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Lili Cui To: bfd-cvs@sourceware.org Subject: [binutils-gdb] Add handler for more i386_cpu_flags X-Act-Checkin: binutils-gdb X-Git-Author: Kong Lingling X-Git-Refname: refs/heads/master X-Git-Oldrev: a93e32342743d9e5bc428c474c7ac422b0e34c5f X-Git-Newrev: 75f8266aba00d410ad9a5f82ed46ecffafed1766 Message-Id: <20221102012800.426863858C00@sourceware.org> Date: Wed, 2 Nov 2022 01:28:00 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2022 01:28:00 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D75f8266aba00= d410ad9a5f82ed46ecffafed1766 commit 75f8266aba00d410ad9a5f82ed46ecffafed1766 Author: Kong Lingling Date: Tue Nov 1 10:50:08 2022 +0800 Add handler for more i386_cpu_flags =20 gas/ChangeLog: =20 * config/tc-i386.c (cpu_flags_all_zero): Add new ARRAY_SIZE han= dle. (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] !=3D y->array[4]) + return 0; + /* Fall through. */ case 4: if (x->array[3] !=3D 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] &=3D y.array [4]; + /* Fall through. */ case 4: x.array [3] &=3D 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] |=3D y.array [4]; + /* Fall through. */ case 4: x.array [3] |=3D 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] &=3D ~y.array [4]; + /* Fall through. */ case 4: x.array [3] &=3D ~y.array [3]; /* Fall through. */