aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2005-03-02 08:01:32 +0000
committerJan Beulich <jbeulich@novell.com>2005-03-02 08:01:32 +0000
commitc4a530c52970c9fdd3a6c0315503a058e132f073 (patch)
tree38ab01569199e6e441eb6b66bdae68498dc60af6 /opcodes
parent167c3097b24047b63c0565395014132d25391419 (diff)
downloadgdb-c4a530c52970c9fdd3a6c0315503a058e132f073.zip
gdb-c4a530c52970c9fdd3a6c0315503a058e132f073.tar.gz
gdb-c4a530c52970c9fdd3a6c0315503a058e132f073.tar.bz2
gas/
2005-03-02 Jan Beulich <jbeulich@novell.com> * config/tc-i386.c (build_modrm_byte): Add lock prefix for cr8...15 accesses. (parse_register): Allow cr8...15 in all modes. gas/testsuite/ 2005-03-02 Jan Beulich <jbeulich@novell.com> * gas/i386/cr-err.[ls]: New. * gas/i386/crx.[ds]: New. * gas/i386/i386.exp: Run new tests. opcodes/ 2005-03-02 Jan Beulich <jbeulich@novell.com> * i386-dis.c (print_insn): Suppress lock prefix printing for cr8...15 accesses. (OP_C): Consider lock prefix in non-64-bit modes.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog6
-rw-r--r--opcodes/i386-dis.c17
2 files changed, 19 insertions, 4 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index e8c62ad..21bd04e 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-02 Jan Beulich <jbeulich@novell.com>
+
+ * i386-dis.c (print_insn): Suppress lock prefix printing for cr8...15
+ accesses.
+ (OP_C): Consider lock prefix in non-64-bit modes.
+
2005-02-24 Alan Modra <amodra@bigpond.net.au>
* cris-dis.c (format_hex): Remove ineffective warning fix.
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 0e9ce49..51204ba 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -1956,7 +1956,7 @@ print_insn (bfd_vma pc, disassemble_info *info)
int i;
char *first, *second, *third;
int needcomma;
- unsigned char uses_SSE_prefix;
+ unsigned char uses_SSE_prefix, uses_LOCK_prefix;
int sizeflag;
const char *p;
struct dis_private priv;
@@ -2128,12 +2128,14 @@ print_insn (bfd_vma pc, disassemble_info *info)
dp = &dis386_twobyte[*++codep];
need_modrm = twobyte_has_modrm[*codep];
uses_SSE_prefix = twobyte_uses_SSE_prefix[*codep];
+ uses_LOCK_prefix = (*codep & ~0x02) == 0x20;
}
else
{
dp = &dis386[*codep];
need_modrm = onebyte_has_modrm[*codep];
uses_SSE_prefix = 0;
+ uses_LOCK_prefix = 0;
}
codep++;
@@ -2147,7 +2149,7 @@ print_insn (bfd_vma pc, disassemble_info *info)
oappend ("repnz ");
used_prefixes |= PREFIX_REPNZ;
}
- if (prefixes & PREFIX_LOCK)
+ if (!uses_LOCK_prefix && (prefixes & PREFIX_LOCK))
{
oappend ("lock ");
used_prefixes |= PREFIX_LOCK;
@@ -3993,9 +3995,16 @@ static void
OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
int add = 0;
- USED_REX (REX_EXTX);
if (rex & REX_EXTX)
- add = 8;
+ {
+ USED_REX (REX_EXTX);
+ add = 8;
+ }
+ else if (!mode_64bit && (prefixes & PREFIX_LOCK))
+ {
+ used_prefixes |= PREFIX_LOCK;
+ add = 8;
+ }
sprintf (scratchbuf, "%%cr%d", reg + add);
oappend (scratchbuf + intel_syntax);
}