diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2007-10-23 22:52:09 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2007-10-23 22:52:09 +0000 |
commit | ad19981d72039a23e22b91c17b0a2c2c4fbb360b (patch) | |
tree | ff0e01f488b1d899486f8a2f4c859f1a6f0f440a /opcodes | |
parent | 62a24a2b2be8306da0caeb8bd8f6ac614723656b (diff) | |
download | gdb-ad19981d72039a23e22b91c17b0a2c2c4fbb360b.zip gdb-ad19981d72039a23e22b91c17b0a2c2c4fbb360b.tar.gz gdb-ad19981d72039a23e22b91c17b0a2c2c4fbb360b.tar.bz2 |
gas/testsuite/
2007-10-23 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/katmai.s: Remove cmpps opcode test.
* gas/i386/simd.s: Add tests for cmpss and cmpsd.
* gas/i386/x86-64-simd.s: Likewise.
* gas/i386/katmai.d: Updated.
* gas/i386/simd-intel.d: Likewise.
* gas/i386/simd-suffix.d: Likewise.
* gas/i386/simd.d: Likewise.
* gas/i386/x86-64-simd-intel.d: Likewise.
* gas/i386/x86-64-simd-suffix.d: Likewise.
* gas/i386/x86-64-simd.d: Likewise.
opcodes/
2007-10-23 H.J. Lu <hongjiu.lu@intel.com>
* i386-dis.c (OP_SIMD_Suffix): Renamed to ...
(CMP_Fixup): This. Rewrite.
(OPSIMD): Renamed to ...
(CMP): This. Updated.
(prefix_table): Update PREFIX_0FC2 entry.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 8 | ||||
-rw-r--r-- | opcodes/i386-dis.c | 50 |
2 files changed, 26 insertions, 32 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 9ca117e..169032c 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,11 @@ +2007-10-23 H.J. Lu <hongjiu.lu@intel.com> + + * i386-dis.c (OP_SIMD_Suffix): Renamed to ... + (CMP_Fixup): This. Rewrite. + (OPSIMD): Renamed to ... + (CMP): This. Updated. + (prefix_table): Update PREFIX_0FC2 entry. + 2007-10-22 H.J. Lu <hongjiu.lu@intel.com> * i386-dis.c (prefix_table): Reordered by opcode. diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index e4b7285..4e52288 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -95,7 +95,7 @@ static void OP_Mwait (int, int); static void NOP_Fixup1 (int, int); static void NOP_Fixup2 (int, int); static void OP_3DNowSuffix (int, int); -static void OP_SIMD_Suffix (int, int); +static void CMP_Fixup (int, int); static void BadOp (void); static void REP_Fixup (int, int); static void CMPXCHG8B_Fixup (int, int); @@ -340,7 +340,7 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr) #define EMCq { OP_EMC, q_mode } #define MXC { OP_MXC, 0 } #define OPSUF { OP_3DNowSuffix, 0 } -#define OPSIMD { OP_SIMD_Suffix, 0 } +#define CMP { CMP_Fixup, 0 } #define XMM0 { XMM_Fixup, 0 } /* Used handle "rep" prefix for string instructions. */ @@ -2091,10 +2091,10 @@ static const struct dis386 prefix_table[][4] = { /* PREFIX_0FC2 */ { - { "", { XM, EXx, OPSIMD } }, /* See OP_SIMD_SUFFIX. */ - { "", { XM, EXd, OPSIMD } }, - { "", { XM, EXx, OPSIMD } }, - { "", { XM, EXq, OPSIMD } }, + { "cmpps", { XM, EXx, CMP } }, + { "cmpss", { XM, EXd, CMP } }, + { "cmppd", { XM, EXx, CMP } }, + { "cmpsd", { XM, EXq, CMP } }, }, /* PREFIX_0FC7_REG_6 */ @@ -7737,42 +7737,28 @@ static const char *simd_cmp_op[] = { }; static void -OP_SIMD_Suffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) +CMP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { unsigned int cmp_type; FETCH_DATA (the_info, codep + 1); - obufp = obuf + strlen (obuf); cmp_type = *codep++ & 0xff; if (cmp_type < 8) { - char suffix1 = 'p', suffix2 = 's'; - used_prefixes |= (prefixes & PREFIX_REPZ); - if (prefixes & PREFIX_REPZ) - suffix1 = 's'; - else - { - used_prefixes |= (prefixes & PREFIX_DATA); - if (prefixes & PREFIX_DATA) - suffix2 = 'd'; - else - { - used_prefixes |= (prefixes & PREFIX_REPNZ); - if (prefixes & PREFIX_REPNZ) - suffix1 = 's', suffix2 = 'd'; - } - } - sprintf (scratchbuf, "cmp%s%c%c", - simd_cmp_op[cmp_type], suffix1, suffix2); - used_prefixes |= (prefixes & PREFIX_REPZ); - oappend (scratchbuf); + char suffix [3]; + char *p = obuf + strlen (obuf) - 2; + suffix[0] = p[0]; + suffix[1] = p[1]; + suffix[2] = '\0'; + sprintf (p, "%s%s", simd_cmp_op[cmp_type], suffix); } else { - /* We have a bad extension byte. Clean up. */ - op_out[0][0] = '\0'; - op_out[1][0] = '\0'; - BadOp (); + /* We have a reserved extension byte. Output it directly. */ + scratchbuf[0] = '$'; + print_operand_value (scratchbuf + 1, 1, cmp_type); + oappend (scratchbuf + intel_syntax); + scratchbuf[0] = '\0'; } } |