aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2007-10-12 22:26:55 +0000
committerH.J. Lu <hjl.tools@gmail.com>2007-10-12 22:26:55 +0000
commit9fcfb3d73eefbae03f2df3a0aac8367256eb7853 (patch)
tree1b8b9e33fe1fbcf397894dc5775ee0fa5c85f63d /gas
parent899cff7a33c091c54efd65010dc895342754896e (diff)
downloadgdb-9fcfb3d73eefbae03f2df3a0aac8367256eb7853.zip
gdb-9fcfb3d73eefbae03f2df3a0aac8367256eb7853.tar.gz
gdb-9fcfb3d73eefbae03f2df3a0aac8367256eb7853.tar.bz2
2007-10-12 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (process_operands): Simplify implicit xmm0 handling.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-i386.c22
2 files changed, 18 insertions, 9 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6bffb5c..82a5d36 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,10 @@
2007-10-12 H.J. Lu <hongjiu.lu@intel.com>
+ * config/tc-i386.c (process_operands): Simplify implicit xmm0
+ handling.
+
+2007-10-12 H.J. Lu <hongjiu.lu@intel.com>
+
* config/tc-i386.c (process_operands): Check the firstxmm0
field in opcode_modifier for instruction with a implicit
xmm0 as the first operand.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 8962980..0c430ea 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -4232,6 +4232,8 @@ process_operands (void)
if (i.tm.opcode_modifier.firstxmm0)
{
+ unsigned int j;
+
/* The first operand is implicit and must be xmm0. */
assert (i.reg_operands && UINTS_EQUAL (i.types[0], regxmm));
if (i.op[0].regs->reg_num != 0)
@@ -4244,17 +4246,19 @@ process_operands (void)
i.tm.name, register_prefix);
return 0;
}
- i.op[0] = i.op[1];
- i.op[1] = i.op[2];
- i.types[0] = i.types[1];
- i.types[1] = i.types[2];
+
+ for (j = 1; j < i.operands; j++)
+ {
+ i.op[j - 1] = i.op[j];
+ i.types[j - 1] = i.types[j];
+
+ /* We need to adjust fields in i.tm since they are used by
+ build_modrm_byte. */
+ i.tm.operand_types [j - 1] = i.tm.operand_types [j];
+ }
+
i.operands--;
i.reg_operands--;
-
- /* We need to adjust fields in i.tm since they are used by
- build_modrm_byte. */
- i.tm.operand_types [0] = i.tm.operand_types [1];
- i.tm.operand_types [1] = i.tm.operand_types [2];
i.tm.operands--;
}
else if (i.tm.opcode_modifier.regkludge)