aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2022-07-06 15:39:37 +0200
committerJan Beulich <jbeulich@suse.com>2022-07-06 15:39:37 +0200
commit3d0738af2a6dac3c729126f2ceb3af6529da7348 (patch)
treedf6758a331efbcafbc63c816da8c225f2f834251 /gas
parentc975cec5fffacc073866be11c0599c97054b3052 (diff)
downloadgdb-3d0738af2a6dac3c729126f2ceb3af6529da7348.zip
gdb-3d0738af2a6dac3c729126f2ceb3af6529da7348.tar.gz
gdb-3d0738af2a6dac3c729126f2ceb3af6529da7348.tar.bz2
x86: fold two switch() statements in match_template()
I don't see why two of them were introduced (very long ago) using similar fall-through logic.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-i386.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 542f5cd..31b10d2 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -6763,22 +6763,7 @@ match_template (char mnem_suffix)
switch (t->operands)
{
case 5:
- overlap4 = operand_type_and (i.types[4],
- operand_types[4]);
- /* Fall through. */
- case 4:
- overlap3 = operand_type_and (i.types[3],
- operand_types[3]);
- /* Fall through. */
- case 3:
- overlap2 = operand_type_and (i.types[2],
- operand_types[2]);
- break;
- }
-
- switch (t->operands)
- {
- case 5:
+ overlap4 = operand_type_and (i.types[4], operand_types[4]);
if (!operand_type_match (overlap4, i.types[4])
|| !operand_type_register_match (i.types[3],
operand_types[3],
@@ -6787,6 +6772,7 @@ match_template (char mnem_suffix)
continue;
/* Fall through. */
case 4:
+ overlap3 = operand_type_and (i.types[3], operand_types[3]);
if (!operand_type_match (overlap3, i.types[3])
|| ((check_register & 0xa) == 0xa
&& !operand_type_register_match (i.types[1],
@@ -6801,6 +6787,7 @@ match_template (char mnem_suffix)
continue;
/* Fall through. */
case 3:
+ overlap2 = operand_type_and (i.types[2], operand_types[2]);
if (!operand_type_match (overlap2, i.types[2])
|| ((check_register & 5) == 5
&& !operand_type_register_match (i.types[0],