aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-i386.c
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 /gas/config/tc-i386.c
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 'gas/config/tc-i386.c')
-rw-r--r--gas/config/tc-i386.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 37c4073..b116ee4 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -2868,6 +2868,13 @@ build_modrm_byte ()
if ((i.op[source].regs->reg_flags & RegRex) != 0)
i.rex |= REX_EXTX;
}
+ if (flag_code != CODE_64BIT && (i.rex & (REX_EXTX | REX_EXTZ)))
+ {
+ if (!((i.types[0] | i.types[1]) & Control))
+ abort ();
+ i.rex &= ~(REX_EXTX | REX_EXTZ);
+ add_prefix (LOCK_PREFIX_OPCODE);
+ }
}
else
{ /* If it's not 2 reg operands... */
@@ -5040,6 +5047,7 @@ parse_register (reg_string, end_op)
if (r != NULL
&& ((r->reg_flags & (RegRex64 | RegRex)) | (r->reg_type & Reg64)) != 0
+ && (r->reg_type != Control || !(cpu_arch_flags & CpuSledgehammer))
&& flag_code != CODE_64BIT)
return (const reg_entry *) NULL;