From d1cbb4db761d593ea18e8cd3526b0167f857b788 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 14 Dec 2006 13:28:24 +0000 Subject: [PATCH] 2006-12-14 H.J. Lu * config/tc-i386.c (match_template): Simplify 3 and 4 operand match. --- gas/ChangeLog | 5 +++++ gas/config/tc-i386.c | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index ec7aa61..7bcb1ce 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2006-12-14 H.J. Lu + + * config/tc-i386.c (match_template): Simplify 3 and 4 operand + match. + 2006-12-13 H.J. Lu * config/tc-i386.c (build_modrm_byte): Set the Operand_PCrel diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 959afe6..3b54ed5 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2734,10 +2734,14 @@ match_template () else { /* Found a forward 2 operand match here. */ - if (t->operands > 2) - overlap2 = i.types[2] & operand_types[2]; - if (t->operands > 3) - overlap3 = i.types[3] & operand_types[3]; + switch (t->operands) + { + case 4: + overlap3 = i.types[3] & operand_types[3]; + case 3: + overlap2 = i.types[2] & operand_types[2]; + break; + } switch (t->operands) { -- 2.7.4